Skip to content

Commit

Permalink
Adjust configs
Browse files Browse the repository at this point in the history
  • Loading branch information
GSadee committed Oct 31, 2024
1 parent 84b7bbd commit a84218d
Show file tree
Hide file tree
Showing 14 changed files with 81 additions and 89 deletions.
15 changes: 0 additions & 15 deletions config/packages/_sylius.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ imports:
parameters:
sylius_core.public_dir: '%kernel.project_dir%/public'

when@dev:
sylius_api:
enabled: true

sylius_addressing:
resources:
address:
Expand Down Expand Up @@ -258,14 +254,3 @@ sylius_user:
user:
classes:
model: App\Entity\User\UserOAuth

sylius_shop:
product_grid:
include_all_descendants: true

sylius_theme:
sources:
filesystem:
scan_depth: 1
directories:
- "%kernel.project_dir%/themes"
57 changes: 27 additions & 30 deletions config/packages/doctrine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,33 @@ doctrine:
controller_resolver:
auto_mapping: false

framework:
cache:
pools:
doctrine.result_cache_pool:
adapter: cache.app
doctrine.system_cache_pool:
adapter: cache.system

when@prod:
doctrine:
orm:
auto_generate_proxy_classes: false
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
query_cache_driver:
type: pool
pool: doctrine.system_cache_pool
result_cache_driver:
type: pool
pool: doctrine.result_cache_pool
framework:
cache:
pools:
doctrine.result_cache_pool:
adapter: cache.app
doctrine.system_cache_pool:
adapter: cache.system

when@test:
doctrine:
dbal:
Expand All @@ -45,7 +72,6 @@ when@test_cached:
result_cache_driver:
type: service
id: doctrine.result_cache_provider

services:
doctrine.result_cache_provider:
class: Doctrine\Common\Cache\Psr6\DoctrineProvider
Expand All @@ -59,32 +85,3 @@ when@test_cached:
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


when@prod:
doctrine:
orm:
auto_generate_proxy_classes: false
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
query_cache_driver:
type: pool
pool: doctrine.system_cache_pool
result_cache_driver:
type: pool
pool: doctrine.result_cache_pool

framework:
cache:
pools:
doctrine.result_cache_pool:
adapter: cache.app
doctrine.system_cache_pool:
adapter: cache.system
52 changes: 26 additions & 26 deletions config/packages/monolog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@ monolog:
channels:
- deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists

when@prod:
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
excluded_http_codes: [404, 405]
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
nested:
type: stream
path: php://stderr
level: debug
formatter: monolog.formatter.json
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine"]
deprecation:
type: stream
channels: [deprecation]
path: php://stderr
formatter: monolog.formatter.json

when@dev:
monolog:
handlers:
Expand All @@ -23,7 +47,7 @@ when@dev:
process_psr_3_messages: false
channels: ["!event", "!doctrine", "!console"]

when@test: &test
when@test: &monolog_test
monolog:
handlers:
main:
Expand All @@ -36,28 +60,4 @@ when@test: &test
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug

when@test_cached: *test

when@prod:
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
excluded_http_codes: [404, 405]
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
nested:
type: stream
path: php://stderr
level: debug
formatter: monolog.formatter.json
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine"]
deprecation:
type: stream
channels: [deprecation]
path: php://stderr
formatter: monolog.formatter.json
when@test_cached: *monolog_test
4 changes: 2 additions & 2 deletions config/packages/nelmio_alice.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
when@dev: &dev
when@dev: &nelmio_alice_dev
nelmio_alice:
functions_blacklist:
- 'current'
Expand All @@ -9,4 +9,4 @@ when@dev: &dev
- 'md5'
- 'sha1'

when@test: *dev
when@test: *nelmio_alice_dev
4 changes: 0 additions & 4 deletions config/packages/payum.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions config/packages/sylius_admin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
when@test: &sylius_admin_test
sylius_admin:
notifications:
hub_enabled: false

when@test_cached: *sylius_admin_test
3 changes: 3 additions & 0 deletions config/packages/sylius_api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
when@dev:
sylius_api:
enabled: true
3 changes: 3 additions & 0 deletions config/packages/sylius_shop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sylius_shop:
product_grid:
include_all_descendants: true
11 changes: 9 additions & 2 deletions config/packages/sylius_theme.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
when@test: &test
sylius_theme:
sources:
filesystem:
scan_depth: 1
directories:
- "%kernel.project_dir%/themes"

when@test: &sylius_theme_test
sylius_theme:
sources:
test: ~

when@test_cached: *test
when@test_cached: *sylius_theme_test
4 changes: 2 additions & 2 deletions config/packages/sylius_uploader.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
when@test: &test
when@test: &sylius_uploader_test
services:
sylius.generator.image_path:
class: Sylius\Behat\Service\Generator\UploadedImagePathGenerator

when@test_cached: *test
when@test_cached: *sylius_uploader_test
3 changes: 0 additions & 3 deletions config/packages/test/sylius_admin.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions config/packages/test_cached/sylius_admin.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion config/packages/workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
framework:
workflows: null
workflows: ~
4 changes: 2 additions & 2 deletions config/routes/sylius_test_plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
when@test: &test
when@test: &plugin_test
sylius_test_plugin_main:
path: /test/main
controller: Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction
defaults:
template: "@SyliusTestPlugin/main.html.twig"

when@test_cached: *test
when@test_cached: *plugin_test

0 comments on commit a84218d

Please sign in to comment.