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
MissingConstructorArgumentsException: "Cannot create an instance of "App\Model\Course" from serialized data because its constructor requires the following parameters to be present : "$totalLessons"." at AbstractNormalizer.php line 417.
Possible Solution
The name converter is applied to the constructor argument, so totalLessons become total_lessons and the exception is thrown.
Additional Context
Is this correct? Do we apply different logic depending only on whether we are using properties or a constructor?
The text was updated successfully, but these errors were encountered:
Symfony version(s) affected
7.1
Description
A different name conversion strategy is used during denormalization, depending on whether you use properties or a constructor.
How to reproduce
Given this normalizer, with the following class:
Now let's use the constructor:
Possible Solution
The name converter is applied to the constructor argument, so
totalLessons
becometotal_lessons
and the exception is thrown.Additional Context
Is this correct? Do we apply different logic depending only on whether we are using properties or a constructor?
The text was updated successfully, but these errors were encountered: