Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.2k
[Serializer] UseNormalizerInterface
instead ofObjectNormalizer
#18779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
serializer/custom_normalizer.rst Outdated
class TopicNormalizer implements NormalizerInterface | ||
{ | ||
public function __construct( | ||
private UrlGeneratorInterface $router, | ||
privateObjectNormalizer $normalizer, | ||
privateNormalizerInterface $normalizer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think this leads to a cyclic dependency, if I remember correctly when I documented something similar 🤔 You may base yourself on those ones I think!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Indeed, if forgot about that part, I copied the#18602 PR contents, thanks!
Btw, this is deprecated since 6.1 (and not 6.4), should we update the 6.4 branch as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'd say yes, I guess thismay be managed during upmerge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yes we will handle it while unmerging this PR 👍
e4c705b
to07280cd
CompareNormalizerInterface
instead ofObjectNormalizer
@OskarStark if you think this is ready, please merge it. I don't feel confident merging things related to the serializer. Thanks! |
Uh oh!
There was an error while loading.Please reload this page.
07280cd
to3e9af1b
CompareThank you@mtarld. |
As mentioned insymfony/maker-bundle#1252 (comment), the documentation is telling to use a concrete implementation of the
NormalizerInteface
.This is not the best in terms of OOP, and moreover doesn't work since Symfony 6.1 and the introduction of
TraceableNormalizer
.