-
Notifications
You must be signed in to change notification settings - Fork 3
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IBX-8190: Add Symfony's Serializer support #121
base: main
Are you sure you want to change the base?
Conversation
Since I consulted this approach I'll give some explanations too. Whole concept relies on using While analyzing how So, since the primary difference between Symfony normalization and our Visitor's processing is that Symfony returns data and Visitors pass around |
b39b477
to
0ddbb6d
Compare
src/bundle/DependencyInjection/Compiler/ValueObjectVisitorResolverPass.php
Outdated
Show resolved
Hide resolved
src/contracts/Input/Parser/Query/Criterion/BaseCriterionProcessor.php
Outdated
Show resolved
Hide resolved
e71209e
to
ab72638
Compare
{ | ||
use NormalizerAwareTrait; | ||
|
||
private const string CALLED_CONTEXT = __CLASS__ . '_CALLED'; |
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.
@alongosz we might want to standardize naming for encoder key, when it should be skipped in the next normalization pass, just like in your PR.
0d3387d
to
cc840b3
Compare
Quality Gate passedIssues Measures |
throw new \LogicException(sprintf( | ||
'Parent element at %s cannot be `null`.', | ||
__METHOD__, | ||
)); |
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.
If you make getParent()
part of the interface, you can declare that trying to getParent()
without one would give this exception.
Related PRs:
https://github.com/ibexa/scheduler/pull/111
Description:
AdapterNormalizer
A new normalizer with low priority is implemented called
AdapterNormalizer
that handles data normalization or visiting data using the existing visitors. Currently, the visitors are prioritized over incoming (new) normalizers.Unfortunately, the problem is that in order to visit value objects the
Visitor
andGenerator
have to be created and passed as arguments toValueObjectVisitor
instance.Ibexa\Contracts\Rest\Output\ValueObjectVisitorDispatcher
It is deleted now and the responsibility for finding a proper visitor is moved to the newly introduced
ValueObjectVisitorResolverInterface
.Ibexa\Contracts\Rest\OutputVisitor
The
visitValueObject
method has to behave exactly the same as before as it's used throughout the app so we should keep BC here. I don't think we can change it to use normalizer as it uses the original Visitor's generator.Concept made by Paweł.
For QA:
TBD
Documentation:
TBD