You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$this->expiries is used in ArrayAdapter.php:300 to determine cache hit. If hash is found in $this->expiries but missing in $this->keys it generate a NOTICE.
How to reproduce
Use this Doctrine configuration with an Entity containing a Closure.
orm:
entity_managers:
default:
second_level_cache:
enabled: true
regions:
array_persistence:
# Store with Cache/Adapter/ArrayAdapter
cache_driver: pool
Possible Solution
On serialize($value); catch Exception, clean expiries with unset.
Incoming Pull Request.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
* 6.4:
Add tests
bug #60121[Cache] ArrayAdapter serialization exception clean $expiries
Fix#60160: ChainAdapter accepts CacheItemPoolInterface, so it should work with adapter of CacheItemPoolInterface other than \Symfony\Component\Cache\Adapter\AdapterInterface
* 7.2:
Add tests
bug #60121[Cache] ArrayAdapter serialization exception clean $expiries
Fix#60160: ChainAdapter accepts CacheItemPoolInterface, so it should work with adapter of CacheItemPoolInterface other than \Symfony\Component\Cache\Adapter\AdapterInterface
Symfony version(s) affected
7.3 (since 5.0)
Description
In ArrayAdapter.php:339, if
$value
contains a Closure, an Exception is triggered and$this->values
get cleaned.$this->expiries
is used in ArrayAdapter.php:300 to determine cache hit. If hash is found in$this->expiries
but missing in$this->keys
it generate a NOTICE.How to reproduce
Use this Doctrine configuration with an Entity containing a Closure.
Possible Solution
On
serialize($value);
catch Exception, clean expiries with unset.Incoming Pull Request.
Additional Context
No response
The text was updated successfully, but these errors were encountered: