Description
Symfony version(s) affected: 4.3.1
Description
Since upgrade from 4.2.9 to 4.3.1, a Warning is sent on PropertyInfoCacheExtractor::extract
Warning : array_key_exists() expects parameter 2 to be array, null given => /var/www/project/apps/api/vendor/symfony/property-info/PropertyInfoCacheExtractor.php::124
How to reproduce
Not clear yet, I didn't narrow what the problem is yet, I don't have the problem on other project that use almost the same stack.
In test mode, it crashes because of sensibility, it works on prod mode.
Since this PR I presume #30525.
Possible Solution
On ligne 114, there is a first check:
if (\array_key_exists($encodedMethod, $this->arrayCache) && \array_key_exists($serializedArguments, $this->arrayCache[$encodedMethod])) {
On ligne 124, there is not:
if (\array_key_exists($serializedArguments, $data[$encodedMethod])) {
So we should add a check \array_key_exists($encodedMethod, $data)
. And maybe trace back what to do with it, as I have a lot of empty cache set because of that.