Skip to content

Commit

Permalink
deprecate doctrine/cache integration (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaicher authored Nov 27, 2023
1 parent 175b471 commit 688eea6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ private function registerStaticCache(
$cache->setClass(Psr6StaticArrayCache::class);
$cache->setArgument(0, $namespace); // make sure we have no key collisions
} elseif (is_a($originalCacheServiceDefinition->getClass(), Cache::class, true)) {
@trigger_error(
sprintf('Configuring "%s" cache instances is deprecated since dama/doctrine-test-bundle v7.3.0 and will not be supported in 8.0. Upgrade to PSR-6 caches instead.', Cache::class),
E_USER_DEPRECATED
);
$cache->setClass(StaticArrayCache::class);
$cache->addMethodCall('setNamespace', [$namespace]); // make sure we have no key collisions
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

use Doctrine\Common\Cache\CacheProvider;

/**
* @deprecated since dama/doctrine-test-bundle v7.3.0 and will be removed in v8.0.0. Use Psr6StaticArrayCache instead.
*/
class StaticArrayCache extends CacheProvider
{
/**
Expand Down

0 comments on commit 688eea6

Please sign in to comment.