Description
PropertyInfoPropertyMetadataFactory
sets writable
to false on to-many relations (Doctrine Collection
), due to its inability to find the singular-named adder and remover methods - see symfony/symfony#18166; and in SerializerPropertyMetadataFactory
we do not change any existing false values on readable
/writable
, since we cannot know whether it's safe to do so. This leads to incorrect result - basically all to-many relations having writable
value of false. (Our functional testing does not catch this because Dummy::relatedDummies
is a public property.)
But this is a more general problem. How does a factory decorator know when it's okay / not okay to "overrule" the value set by its predecessor(s)? Does there need to be a confidence value attached? Or even a voting system like that of Symfony Security component? (I'm not sure if I'm going in the right direction...)