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
…ctNormalizer (NekaKawaii)
This PR was submitted for the 4.2 branch but it was merged into the 3.4 branch instead (closes#30749).
Discussion
----------
[Serializer] Added check of constuctor modifiers to AbstractNormalizer
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30748
| License | MIT
If constructor is not public, instantiate target object without constructor to prevent errors like `Access to non-public constructor of class Target`
Commits
-------
eb0e14c [Serializer] Added check of constuctor modifiers to AbstractNormalizer
Symfony version(s) affected: 4.2
Description
When target class has private or protected modifier to
__constuct
function denormalizer tries to instantiate object and fails.How to reproduce
Possible Solution
Add a check whether constructor is public or return instance created without constructor otherwise.
The text was updated successfully, but these errors were encountered: