diff --git a/app/AppKernel.php b/app/AppKernel.php index 77d68f0..3653692 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -12,7 +12,6 @@ class AppKernel extends Kernel new Symfony\Bundle\SecurityBundle\SecurityBundle(), new Symfony\Bundle\TwigBundle\TwigBundle(), new Symfony\Bundle\MonologBundle\MonologBundle(), - new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(), new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(), @@ -24,8 +23,8 @@ class AppKernel extends Kernel if (in_array($this->getEnvironment(), array('dev', 'test'))) { $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle(); $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); + $bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle(); $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); - $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); } return $bundles; diff --git a/app/DoctrineMigrations/Version20150302205121.php b/app/DoctrineMigrations/Version20150302205121.php index 7f4d312..637c634 100644 --- a/app/DoctrineMigrations/Version20150302205121.php +++ b/app/DoctrineMigrations/Version20150302205121.php @@ -2,7 +2,7 @@ namespace Application\Migrations; -use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; /** @@ -10,7 +10,7 @@ use Doctrine\DBAL\Schema\Schema; */ class Version20150302205121 extends AbstractMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); @@ -50,7 +50,7 @@ class Version20150302205121 extends AbstractMigration } } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); diff --git a/app/DoctrineMigrations/Version20150302213116.php b/app/DoctrineMigrations/Version20150302213116.php index b7a8634..93a0525 100644 --- a/app/DoctrineMigrations/Version20150302213116.php +++ b/app/DoctrineMigrations/Version20150302213116.php @@ -2,7 +2,7 @@ namespace Application\Migrations; -use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; /** @@ -10,7 +10,7 @@ use Doctrine\DBAL\Schema\Schema; */ class Version20150302213116 extends AbstractMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); @@ -46,7 +46,7 @@ class Version20150302213116 extends AbstractMigration $this->addSql('RENAME TABLE paste TO copypastes'); } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); diff --git a/app/DoctrineMigrations/Version20150302223210.php b/app/DoctrineMigrations/Version20150302223210.php index eaaef21..5d4a75c 100644 --- a/app/DoctrineMigrations/Version20150302223210.php +++ b/app/DoctrineMigrations/Version20150302223210.php @@ -2,7 +2,7 @@ namespace Application\Migrations; -use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; /** @@ -10,7 +10,7 @@ use Doctrine\DBAL\Schema\Schema; */ class Version20150302223210 extends AbstractMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); @@ -24,7 +24,7 @@ class Version20150302223210 extends AbstractMigration $this->addSql('CREATE INDEX IDX_DBA4BEBE82F1BAF4 ON copypastes (language_id)'); } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); diff --git a/app/DoctrineMigrations/Version20150303224825.php b/app/DoctrineMigrations/Version20150303224825.php index 4460679..25712e1 100644 --- a/app/DoctrineMigrations/Version20150303224825.php +++ b/app/DoctrineMigrations/Version20150303224825.php @@ -2,7 +2,7 @@ namespace Application\Migrations; -use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; /** @@ -10,12 +10,12 @@ use Doctrine\DBAL\Schema\Schema; */ class Version20150303224825 extends AbstractMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $this->addSql('UPDATE copypastes SET secret=NULL WHERE secret=\'\''); } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->addSql('UPDATE copypastes SET secret=\'\' WHERE secret=NULL'); } diff --git a/app/DoctrineMigrations/Version20150305184842.php b/app/DoctrineMigrations/Version20150305184842.php index 4eac22a..56d0292 100644 --- a/app/DoctrineMigrations/Version20150305184842.php +++ b/app/DoctrineMigrations/Version20150305184842.php @@ -2,7 +2,7 @@ namespace Application\Migrations; -use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; /** @@ -10,13 +10,13 @@ use Doctrine\DBAL\Schema\Schema; */ class Version20150305184842 extends AbstractMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $this->addSql('UPDATE copypastes SET date_expire=NULL WHERE date_expire=\'0000-00-00 00:00:00\''); } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->addSql('UPDATE copypastes SET date_expire=\'0000-00-00 00:00:00\' WHERE date_expire=NULL'); } diff --git a/app/DoctrineMigrations/Version20150316014139.php b/app/DoctrineMigrations/Version20150316014139.php index d28ba5c..e49e2ef 100644 --- a/app/DoctrineMigrations/Version20150316014139.php +++ b/app/DoctrineMigrations/Version20150316014139.php @@ -2,7 +2,7 @@ namespace Application\Migrations; -use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; /** @@ -12,7 +12,7 @@ use Doctrine\DBAL\Schema\Schema; */ class Version20150316014139 extends AbstractMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); @@ -21,7 +21,7 @@ class Version20150316014139 extends AbstractMigration $this->addSql('CREATE INDEX idx_preferred ON languages (is_preferred)'); } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); diff --git a/src/Skobkin/Bundle/CopyPasteBundle/Resources/views/Form/fields.html.twig b/app/Resources/views/Form/fields.html.twig similarity index 100% rename from src/Skobkin/Bundle/CopyPasteBundle/Resources/views/Form/fields.html.twig rename to app/Resources/views/Form/fields.html.twig diff --git a/src/Skobkin/Bundle/CopyPasteBundle/Resources/views/Form/form_paste_create.html.twig b/app/Resources/views/Form/form_paste_create.html.twig similarity index 100% rename from src/Skobkin/Bundle/CopyPasteBundle/Resources/views/Form/form_paste_create.html.twig rename to app/Resources/views/Form/form_paste_create.html.twig diff --git a/app/Resources/views/Paste/new.html.twig b/app/Resources/views/Paste/new.html.twig new file mode 100644 index 0000000..d9e1999 --- /dev/null +++ b/app/Resources/views/Paste/new.html.twig @@ -0,0 +1,6 @@ +{% extends 'base.html.twig' %} + +{% block content %} + {# This form recieves form_create object from current context #} + {% include 'Form/form_paste_create.html.twig' %} +{% endblock %} diff --git a/src/Skobkin/Bundle/CopyPasteBundle/Resources/views/Copypaste/show.html.twig b/app/Resources/views/Paste/show.html.twig similarity index 96% rename from src/Skobkin/Bundle/CopyPasteBundle/Resources/views/Copypaste/show.html.twig rename to app/Resources/views/Paste/show.html.twig index dff9048..41c03f0 100644 --- a/src/Skobkin/Bundle/CopyPasteBundle/Resources/views/Copypaste/show.html.twig +++ b/app/Resources/views/Paste/show.html.twig @@ -1,4 +1,4 @@ -{% extends '::base.html.twig' %} +{% extends 'base.html.twig' %} {% block content %}