From c6cc531abae6c63a856102c28d05b056c4a038d0 Mon Sep 17 00:00:00 2001 From: liszkapawel <88146754+liszkapawel@users.noreply.github.com> Date: Sat, 23 Sep 2023 13:50:21 +0200 Subject: [PATCH 1/2] Change doctrine config in prod environment --- .../config/packages/prod/doctrine.yaml | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/tests/Application/config/packages/prod/doctrine.yaml b/tests/Application/config/packages/prod/doctrine.yaml index 2f16f0f..1b89a0c 100644 --- a/tests/Application/config/packages/prod/doctrine.yaml +++ b/tests/Application/config/packages/prod/doctrine.yaml @@ -1,27 +1,32 @@ 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' + framework: cache: pools: From e8de6ba44290f51aef632770ba5237931fbfe574 Mon Sep 17 00:00:00 2001 From: liszkapawel <88146754+liszkapawel@users.noreply.github.com> Date: Sat, 23 Sep 2023 14:03:12 +0200 Subject: [PATCH 2/2] Change doctrine config in test_cached environment --- .../config/packages/test_cached/doctrine.yaml | 41 ++++++++++++++----- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/tests/Application/config/packages/test_cached/doctrine.yaml b/tests/Application/config/packages/test_cached/doctrine.yaml index 4952860..55ea750 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