From 115de64e5bb9d7f9151ecf15e15a0d988563528e Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 4 Oct 2018 14:07:20 +0200 Subject: Jump to Symfony 3.4 Thanks to the BC compatibility, almost nothing have to be changed. All changes are related to new bundle version of: - SensioFrameworkExtraBundle - DoctrineFixturesBundle --- app/AppKernel.php | 2 +- app/config/config.yml | 5 +++++ app/config/config_test.yml | 1 + app/config/security.yml | 3 +++ app/config/services.yml | 6 ------ app/config/services_test.yml | 38 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 48 insertions(+), 7 deletions(-) create mode 100644 app/config/services_test.yml (limited to 'app') diff --git a/app/AppKernel.php b/app/AppKernel.php index 40726f05..546794de 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -32,6 +32,7 @@ class AppKernel extends Kernel new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(), new FOS\JsRoutingBundle\FOSJsRoutingBundle(), new BD\GuzzleSiteAuthenticatorBundle\BDGuzzleSiteAuthenticatorBundle(), + new OldSound\RabbitMqBundle\OldSoundRabbitMqBundle(), // wallabag bundles new Wallabag\CoreBundle\WallabagCoreBundle(), @@ -39,7 +40,6 @@ class AppKernel extends Kernel new Wallabag\UserBundle\WallabagUserBundle(), new Wallabag\ImportBundle\WallabagImportBundle(), new Wallabag\AnnotationBundle\WallabagAnnotationBundle(), - new OldSound\RabbitMqBundle\OldSoundRabbitMqBundle(), ]; if (in_array($this->getEnvironment(), ['dev', 'test'], true)) { diff --git a/app/config/config.yml b/app/config/config.yml index 0c2b6a1d..951cdf71 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -357,3 +357,8 @@ jms_serializer: # see: https://github.com/schmittjoh/JMSSerializerBundle/pull/494 datetime: default_format: "Y-m-d\\TH:i:sO" # ATOM + +# see https://github.com/symfony/symfony-standard/pull/1133 +sensio_framework_extra: + router: + annotations: false diff --git a/app/config/config_test.yml b/app/config/config_test.yml index fc067ff4..11e0feb7 100644 --- a/app/config/config_test.yml +++ b/app/config/config_test.yml @@ -1,6 +1,7 @@ imports: - { resource: config_dev.yml } - { resource: parameters_test.yml } + - { resource: services_test.yml } framework: test: ~ diff --git a/app/config/security.yml b/app/config/security.yml index 02afc9ea..98f43011 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -31,12 +31,15 @@ security: fos_oauth: true stateless: true anonymous: true + provider: fos_userbundle login_firewall: + logout_on_user_change: true pattern: ^/login$ anonymous: ~ secured_area: + logout_on_user_change: true pattern: ^/ form_login: provider: fos_userbundle diff --git a/app/config/services.yml b/app/config/services.yml index 7b85d846..25bbe5dc 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -2,12 +2,6 @@ parameters: lexik_form_filter.get_filter.doctrine_orm.class: Wallabag\CoreBundle\Event\Subscriber\CustomDoctrineORMSubscriber services: - # used for tests - filesystem_cache: - class: Doctrine\Common\Cache\FilesystemCache - arguments: - - "%kernel.cache_dir%/doctrine/metadata" - twig.extension.text: class: Twig_Extensions_Extension_Text tags: diff --git a/app/config/services_test.yml b/app/config/services_test.yml new file mode 100644 index 00000000..a300f75d --- /dev/null +++ b/app/config/services_test.yml @@ -0,0 +1,38 @@ +services: + # see https://github.com/symfony/symfony/issues/24543 + fos_user.user_manager.test: + alias: fos_user.user_manager + public: true + + fos_user.security.login_manager.test: + alias: fos_user.security.login_manager + public: true + + wallabag_core.entry_repository.test: + alias: wallabag_core.entry_repository + public: true + + wallabag_user.user_repository.test: + alias: wallabag_user.user_repository + public: true + + filesystem_cache: + class: Doctrine\Common\Cache\FilesystemCache + arguments: + - "%kernel.cache_dir%/doctrine/metadata" + + # fixtures + Wallabag\AnnotationBundle\DataFixtures\ORM\: + resource: '../../src/Wallabag/AnnotationBundle/DataFixtures/ORM/*' + tags: ['doctrine.fixture.orm'] + autowire: true + + Wallabag\CoreBundle\DataFixtures\ORM\: + resource: '../../src/Wallabag/CoreBundle/DataFixtures/ORM/*' + tags: ['doctrine.fixture.orm'] + autowire: true + + Wallabag\UserBundle\DataFixtures\ORM\: + resource: '../../src/Wallabag/UserBundle/DataFixtures/ORM/*' + tags: ['doctrine.fixture.orm'] + autowire: true -- cgit v1.2.3