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
Description
Normalizers and encoders implementing \Symfony\Component\Serializer\SerializerAwareInterface may become inconsistent when multiple serializers are defined.
How to reproduce
Create custom definition of serializer service (autoconfigured, autowired).
Create custom defintion of PropertyNormalizer service (autoconfigured, autowired) and pass it to the serializer from step 1.
Create custom denormalizer and pass it to the custom serializer from step 1 (DON'T autoconfigure or autowire it).
Into the existing serializer service definition (@serializer) is the PropertyNormalizer service mentioned above automatically passed because it is autocofigured. A that's the problem (I guess) because the instance of PropertyNormalizer firstly receives through the \Symfony\Component\Serializer\SerializerAwareTrait::setSerializer new definition of serializer and when the generic @serializer is instatiated the custom serializer inside PropertyNormalizer is overwritten by it but without the custom NON-tagged denormalizer. And that's causing problems when (de)normalizing data...
The text was updated successfully, but these errors were encountered:
Symfony version(s) affected: 4.3.0
Description
Normalizers and encoders implementing
\Symfony\Component\Serializer\SerializerAwareInterface
may become inconsistent when multiple serializers are defined.How to reproduce
PropertyNormalizer
service (autoconfigured, autowired) and pass it to the serializer from step 1.Into the existing serializer service definition (
@serializer
) is thePropertyNormalizer
service mentioned above automatically passed because it is autocofigured. A that's the problem (I guess) because the instance ofPropertyNormalizer
firstly receives through the\Symfony\Component\Serializer\SerializerAwareTrait::setSerializer
new definition of serializer and when the generic@serializer
is instatiated the custom serializer insidePropertyNormalizer
is overwritten by it but without the custom NON-tagged denormalizer. And that's causing problems when (de)normalizing data...The text was updated successfully, but these errors were encountered: