From 28954f036e54560189e07dcac9a53ebcdadfad0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 4 Sep 2023 23:54:43 +0200 Subject: [PATCH] Upgrade recipes: doctrine-annotation --- config/packages/doctrine.yaml | 29 +++++++++++++++++++++++++++-- config/packages/prod/doctrine.yaml | 17 ----------------- config/packages/test/doctrine.yaml | 4 ---- symfony.lock | 8 +++----- 4 files changed, 30 insertions(+), 28 deletions(-) delete mode 100644 config/packages/prod/doctrine.yaml delete mode 100644 config/packages/test/doctrine.yaml diff --git a/config/packages/doctrine.yaml b/config/packages/doctrine.yaml index cbd9546..2f7112e 100644 --- a/config/packages/doctrine.yaml +++ b/config/packages/doctrine.yaml @@ -12,7 +12,7 @@ doctrine: geometry: string # IMPORTANT: You MUST configure your server version, # either here or in the DATABASE_URL env var (see .env file) - #server_version: '14' + #server_version: '15' orm: auto_generate_proxy_classes: true naming_strategy: doctrine.orm.naming_strategy.default @@ -20,7 +20,32 @@ doctrine: mappings: App: is_bundle: false - type: annotation dir: '%kernel.project_dir%/src/Entity' prefix: 'App\Entity' alias: App + +when@test: + doctrine: + dbal: + # "TEST_TOKEN" is typically set by ParaTest + dbname_suffix: '_test%env(default::TEST_TOKEN)%' + +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 diff --git a/config/packages/prod/doctrine.yaml b/config/packages/prod/doctrine.yaml deleted file mode 100644 index 17299e2..0000000 --- a/config/packages/prod/doctrine.yaml +++ /dev/null @@ -1,17 +0,0 @@ -doctrine: - orm: - auto_generate_proxy_classes: false - 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 diff --git a/config/packages/test/doctrine.yaml b/config/packages/test/doctrine.yaml deleted file mode 100644 index 2ace640..0000000 --- a/config/packages/test/doctrine.yaml +++ /dev/null @@ -1,4 +0,0 @@ -doctrine: - dbal: - # "TEST_TOKEN" is typically set by ParaTest - dbname: 'main_test%env(default::TEST_TOKEN)%' diff --git a/symfony.lock b/symfony.lock index fd56740..7a1fced 100644 --- a/symfony.lock +++ b/symfony.lock @@ -46,17 +46,15 @@ "version": "v0.5.3" }, "doctrine/doctrine-bundle": { - "version": "2.7", + "version": "2.10", "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", - "version": "2.3", - "ref": "b8ddff356705ad8e704ea75b6872ce89a15d614d" + "version": "2.4", + "ref": "013b823e7fee65890b23e40f31e6667a1ac519ac" }, "files": [ "config/packages/doctrine.yaml", - "config/packages/prod/doctrine.yaml", - "config/packages/test/doctrine.yaml", "src/Entity/.gitignore", "src/Repository/.gitignore" ]