diff --git a/tests/Application/config/packages/dev/framework.yaml b/tests/Application/config/packages/dev/framework.yaml deleted file mode 100644 index 4b116def..00000000 --- a/tests/Application/config/packages/dev/framework.yaml +++ /dev/null @@ -1,2 +0,0 @@ -framework: - profiler: { only_exceptions: false } diff --git a/tests/Application/config/packages/framework.yaml b/tests/Application/config/packages/framework.yaml index 9b445011..6cca3a73 100644 --- a/tests/Application/config/packages/framework.yaml +++ b/tests/Application/config/packages/framework.yaml @@ -1,6 +1,21 @@ framework: + translator: { fallbacks: ["%locale%"] } secret: '%env(APP_SECRET)%' - form: true + form: + enabled: true + legacy_error_messages: false csrf_protection: true session: handler_id: ~ + +when@dev: + framework: + profiler: { only_exceptions: false } + +when@test: &framework_test + framework: + test: true + session: + storage_factory_id: session.storage.factory.mock_file + +when@test_cached: *framework_test diff --git a/tests/Application/config/packages/prod/doctrine.yaml b/tests/Application/config/packages/prod/doctrine.yaml index 2f16f0fd..55ea750a 100644 --- a/tests/Application/config/packages/prod/doctrine.yaml +++ b/tests/Application/config/packages/prod/doctrine.yaml @@ -1,24 +1,28 @@ doctrine: orm: - metadata_cache_driver: - type: service - id: doctrine.system_cache_provider - query_cache_driver: - type: service - id: doctrine.system_cache_provider - result_cache_driver: - type: service - id: doctrine.result_cache_provider + entity_managers: + default: + metadata_cache_driver: + type: service + id: doctrine.system_cache_provider + query_cache_driver: + type: service + id: doctrine.system_cache_provider + result_cache_driver: + type: service + id: doctrine.result_cache_provider services: doctrine.result_cache_provider: - class: Symfony\Component\Cache\DoctrineProvider + class: Doctrine\Common\Cache\Psr6\DoctrineProvider public: false + factory: ['Doctrine\Common\Cache\Psr6\DoctrineProvider', 'wrap'] arguments: - '@doctrine.result_cache_pool' doctrine.system_cache_provider: - class: Symfony\Component\Cache\DoctrineProvider + class: Doctrine\Common\Cache\Psr6\DoctrineProvider public: false + factory: [ 'Doctrine\Common\Cache\Psr6\DoctrineProvider', 'wrap' ] arguments: - '@doctrine.system_cache_pool' diff --git a/tests/Application/config/packages/routing.yaml b/tests/Application/config/packages/routing.yaml index 368bc7f4..4116679a 100644 --- a/tests/Application/config/packages/routing.yaml +++ b/tests/Application/config/packages/routing.yaml @@ -1,3 +1,3 @@ framework: router: - strict_requirements: ~ + strict_requirements: true diff --git a/tests/Application/config/packages/security.yaml b/tests/Application/config/packages/security.yaml index 9663702c..db9b3767 100644 --- a/tests/Application/config/packages/security.yaml +++ b/tests/Application/config/packages/security.yaml @@ -93,20 +93,22 @@ security: target: sylius_shop_homepage invalidate_session: false - dev: - pattern: ^/(_(profiler|wdt)|css|images|js)/ - security: false - image_resolver: pattern: ^/media/cache/resolve security: false + dev: + pattern: ^/(_(profiler|wdt)|css|images|js)/ + security: false + access_control: - { path: "%sylius.security.admin_regex%/_partial", role: PUBLIC_ACCESS, ips: [127.0.0.1, ::1] } - { path: "%sylius.security.admin_regex%/_partial", role: ROLE_NO_ACCESS } - { path: "%sylius.security.shop_regex%/_partial", role: PUBLIC_ACCESS, ips: [127.0.0.1, ::1] } - { path: "%sylius.security.shop_regex%/_partial", role: ROLE_NO_ACCESS } + - { path: "%sylius.security.admin_regex%/forgotten-password", role: PUBLIC_ACCESS } + - { path: "%sylius.security.admin_regex%/login", role: PUBLIC_ACCESS } - { path: "%sylius.security.shop_regex%/login", role: PUBLIC_ACCESS } diff --git a/tests/Application/config/packages/test/framework.yaml b/tests/Application/config/packages/test/framework.yaml deleted file mode 100644 index fc1d3c13..00000000 --- a/tests/Application/config/packages/test/framework.yaml +++ /dev/null @@ -1,4 +0,0 @@ -framework: - test: ~ - session: - storage_factory_id: session.storage.factory.mock_file diff --git a/tests/Application/config/packages/test_cached/doctrine.yaml b/tests/Application/config/packages/test_cached/doctrine.yaml index 49528606..55ea750a 100644 --- a/tests/Application/config/packages/test_cached/doctrine.yaml +++ b/tests/Application/config/packages/test_cached/doctrine.yaml @@ -2,15 +2,34 @@ doctrine: orm: entity_managers: default: - result_cache_driver: - type: memcached - host: localhost - port: 11211 - query_cache_driver: - type: memcached - host: localhost - port: 11211 metadata_cache_driver: - type: memcached - host: localhost - port: 11211 + type: service + id: doctrine.system_cache_provider + query_cache_driver: + type: service + id: doctrine.system_cache_provider + result_cache_driver: + type: service + id: doctrine.result_cache_provider + +services: + doctrine.result_cache_provider: + class: Doctrine\Common\Cache\Psr6\DoctrineProvider + public: false + factory: ['Doctrine\Common\Cache\Psr6\DoctrineProvider', 'wrap'] + arguments: + - '@doctrine.result_cache_pool' + doctrine.system_cache_provider: + class: Doctrine\Common\Cache\Psr6\DoctrineProvider + public: false + factory: [ 'Doctrine\Common\Cache\Psr6\DoctrineProvider', 'wrap' ] + arguments: + - '@doctrine.system_cache_pool' + +framework: + cache: + pools: + doctrine.result_cache_pool: + adapter: cache.app + doctrine.system_cache_pool: + adapter: cache.system diff --git a/tests/Application/config/packages/test_cached/monolog.yaml b/tests/Application/config/packages/test_cached/monolog.yaml index 7e2b9e3a..71bef591 100644 --- a/tests/Application/config/packages/test_cached/monolog.yaml +++ b/tests/Application/config/packages/test_cached/monolog.yaml @@ -1,6 +1,2 @@ -monolog: - handlers: - main: - type: stream - path: "%kernel.logs_dir%/%kernel.environment%.log" - level: error +imports: + - { resource: "../test/monolog.yaml" } diff --git a/tests/Application/config/packages/test_cached/sylius_theme.yaml b/tests/Application/config/packages/test_cached/sylius_theme.yaml index 4d34199f..9fb4c94b 100644 --- a/tests/Application/config/packages/test_cached/sylius_theme.yaml +++ b/tests/Application/config/packages/test_cached/sylius_theme.yaml @@ -1,3 +1,2 @@ -sylius_theme: - sources: - test: ~ +imports: + - { resource: "../test/sylius_theme.yaml" } diff --git a/tests/Application/config/packages/test_cached/twig.yaml b/tests/Application/config/packages/test_cached/twig.yaml deleted file mode 100644 index 8c6e0b40..00000000 --- a/tests/Application/config/packages/test_cached/twig.yaml +++ /dev/null @@ -1,2 +0,0 @@ -twig: - strict_variables: true diff --git a/tests/Application/config/packages/twig.yaml b/tests/Application/config/packages/twig.yaml index 3b315dcc..18af2f43 100644 --- a/tests/Application/config/packages/twig.yaml +++ b/tests/Application/config/packages/twig.yaml @@ -2,3 +2,15 @@ twig: paths: ['%kernel.project_dir%/templates'] debug: '%kernel.debug%' strict_variables: '%kernel.debug%' + +services: + _defaults: + public: false + autowire: true + autoconfigure: true + + Twig\Extra\Intl\IntlExtension: ~ + +when@test_cached: + twig: + strict_variables: true