mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Doctrine\Common\Cache\CacheProvider::getNamespaceVersion() could fail in case of corrupted cache entry #5655
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jocel1 on GitHub (Aug 24, 2017).
Originally assigned to: @lcobucci on GitHub.
Hi!
I'm hitting an issue with Doctrine\Common\Cache\CacheProvider::getNamespaceVersion() & a redis cache.
It seems at some point the redis cache has been corrupted, and the doFetch() returns a string instead of an int. In this case it throws an exception:
Return value of Doctrine\Common\Cache\CacheProvider::getNamespaceVersion() must be of the type integer, string returnedbecause the function is expected to return an int.
Why not adding an extra conversion like
?
Thanks!
@Ocramius commented on GitHub (Aug 24, 2017):
If you can add a test case, this can be patched in quite quickly
On 24 Aug 2017 2:29 PM, "Jocelyn Fournier" notifications@github.com wrote:
@jocel1 commented on GitHub (Aug 24, 2017):
@Ocramius I've just quickly added a test here: https://github.com/doctrine/doctrine2/pull/6646
I would have prefered in the cache repo, but I haven't figured out yet how to run phpunit from their.
@lcobucci commented on GitHub (Aug 24, 2017):
@jocel1 I've moved your test to doctrine/cache#231 and applied the fix, so I'll close this issue as
invalidsince it's not related to the ORM. Thanks for your contribution!