From fdc5a493c0a8f32248bf3dca90966d19e6bd56d0 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Tue, 5 Oct 2021 14:25:00 +0200 Subject: [PATCH] Undo deprecation of `metadata_cache_driver` This allows projects to still choose to opt-in on caching the metadata. When the configuration key is not defined or used, the cache is created automatically. See #1393 --- DependencyInjection/Configuration.php | 7 +------ .../Compiler/CacheCompatibilityPassTest.php | 2 -- UPGRADE-2.5.md | 7 +++++++ 3 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 UPGRADE-2.5.md diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 1a1a60f85..d5582a450 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -731,12 +731,7 @@ private function getOrmCacheDriverNode(string $name): ArrayNodeDefinition ->scalarNode('pool')->end() ->end(); - if ($name === 'metadata_cache_driver') { - $node->setDeprecated(...$this->getDeprecationMsg( - 'The "metadata_cache_driver" configuration key is deprecated. Remove the configuration to have the cache created automatically.', - '2.3' - )); - } else { + if ($name !== 'metadata_cache_driver') { $node->addDefaultsIfNotSet(); } diff --git a/Tests/DependencyInjection/Compiler/CacheCompatibilityPassTest.php b/Tests/DependencyInjection/Compiler/CacheCompatibilityPassTest.php index f0aa01101..99da26473 100644 --- a/Tests/DependencyInjection/Compiler/CacheCompatibilityPassTest.php +++ b/Tests/DependencyInjection/Compiler/CacheCompatibilityPassTest.php @@ -57,10 +57,8 @@ public function registerContainerConfiguration(LoaderInterface $loader): void $this->addToAssertionCount(1); } - /** @group legacy */ public function testMetadataCacheConfigUsingPsr6ServiceDefinedByApplication(): void { - $this->expectDeprecation('%aThe "metadata_cache_driver" configuration key is deprecated.%a'); (new class (false) extends TestKernel { public function registerContainerConfiguration(LoaderInterface $loader): void { diff --git a/UPGRADE-2.5.md b/UPGRADE-2.5.md new file mode 100644 index 000000000..01f18746d --- /dev/null +++ b/UPGRADE-2.5.md @@ -0,0 +1,7 @@ +UPGRADE FROM 2.4 to 2.5 +======================= + +Configuration +-------- + * The `metadata_cache_driver` configuration key is no longer deprecated. +