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
PropertyInfo incorrectly detects collection type for types not documented in docblock since 6.1 version. Deserialization then fails with error
In ArrayDenormalizer.php line 40:
[Symfony\Component\Serializer\Exception\InvalidArgumentException]
Data expected to be an array, int given.
This is because before, ConstructorExtractor has been called, but now this is no longer the case. Now, PhpstanExtractor is called, which resolves types documented in phpdoc only. I've checked a bit why is this the case and looks like on 6.0, this line is triggered
, while on 6.1 it isn't. But looks like real issue is that PhpStanExtractor is not returning null in getDocBlockFromProperty for such (non-documented) properties.
Symfony version(s) affected
6.1.0
Description
PropertyInfo incorrectly detects collection type for types not documented in docblock since 6.1 version. Deserialization then fails with error
This is because before, ConstructorExtractor has been called, but now this is no longer the case. Now, PhpstanExtractor is called, which resolves types documented in phpdoc only. I've checked a bit why is this the case and looks like on 6.0, this line is triggered
symfony/src/Symfony/Component/PropertyInfo/Extractor/PhpStanExtractor.php
Line 78 in 123b165
getDocBlockFromProperty
for such (non-documented) properties.How to reproduce
deserialize
into
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: