Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e35ad89

Browse files
committed
Throw exception if incompatible version of psr/simple-cache is used
1 parent b8656d4 commit e35ad89

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/Cache/Psr16Cache.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
use Symfony\Component\Cache\Exception\InvalidArgumentException;
2020
use Symfony\Component\Cache\Traits\ProxyTrait;
2121

22+
if (null !== (new \ReflectionMethod(CacheInterface::class, 'get'))->getReturnType()) {
23+
throw new \LogicException('psr/simple-cache 3.0+ is not compatible with this version of symfony/cache. Please upgrade symfony/cache to 6.0+ or downgrade psr/simple-cache to 1.x or 2.x.');
24+
}
25+
2226
/**
2327
* Turns a PSR-6 cache into a PSR-16 one.
2428
*

0 commit comments

Comments
 (0)