Skip to content

Commit

Permalink
Undo deprecation of metadata_cache_driver
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ruudk committed Oct 5, 2021
1 parent aaafed3 commit fdc5a49
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
7 changes: 1 addition & 6 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
7 changes: 7 additions & 0 deletions UPGRADE-2.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
UPGRADE FROM 2.4 to 2.5
=======================

Configuration
--------
* The `metadata_cache_driver` configuration key is no longer deprecated.

0 comments on commit fdc5a49

Please sign in to comment.