Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
[Serializer] Add default object class resolver #31026
The commit 1d8b5af introduce a BC break because before that commit the
To fix the BC break and preserve the new feature, I suggest to create a default object class resolver if it is not set by the developer.
Do you have some case where the object is a class and not an object ?
I'm not sure we want to do that, as the current signature https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php#L237 specify an object (and not a string or object).
I have the problem on a project I'm working on.
I know that the interface specify that the argument need to be an object.
But the class isn't specify as
So it create an implicit contract for existing apps. And the change can break some projects whereas we want to make a bugfix update of Symfony.