Skip to content

Commit

Permalink
Update from Sylius-Standard config
Browse files Browse the repository at this point in the history
  • Loading branch information
Prometee committed May 14, 2024
1 parent c3eaecc commit a35c891
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 45 deletions.
2 changes: 0 additions & 2 deletions tests/Application/config/packages/dev/framework.yaml

This file was deleted.

17 changes: 16 additions & 1 deletion tests/Application/config/packages/framework.yaml
Original file line number Diff line number Diff line change
@@ -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
26 changes: 15 additions & 11 deletions tests/Application/config/packages/prod/doctrine.yaml
Original file line number Diff line number Diff line change
@@ -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'

Expand Down
2 changes: 1 addition & 1 deletion tests/Application/config/packages/routing.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
framework:
router:
strict_requirements: ~
strict_requirements: true
10 changes: 6 additions & 4 deletions tests/Application/config/packages/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down
4 changes: 0 additions & 4 deletions tests/Application/config/packages/test/framework.yaml

This file was deleted.

41 changes: 30 additions & 11 deletions tests/Application/config/packages/test_cached/doctrine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 2 additions & 6 deletions tests/Application/config/packages/test_cached/monolog.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: error
imports:
- { resource: "../test/monolog.yaml" }
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
sylius_theme:
sources:
test: ~
imports:
- { resource: "../test/sylius_theme.yaml" }
2 changes: 0 additions & 2 deletions tests/Application/config/packages/test_cached/twig.yaml

This file was deleted.

12 changes: 12 additions & 0 deletions tests/Application/config/packages/twig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a35c891

Please sign in to comment.