-
Notifications
You must be signed in to change notification settings - Fork 17
IBX-10116: Fixed ibexa_render()
not using decorated fragment renders
#579
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-10116: Fixed ibexa_render()
not using decorated fragment renders
#579
Conversation
|
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.
TBH it's rather unexpected that a decorated service doesn't fully hide the original one when it comes to tags, but that's probably by design.
What worries me is how certain are we that the services order is going to be always the same for every projects' container? Does it depend on the bundle order in config/bundles.php
?
No, just tested by putting You did see my comment that it is also done like this in Symfony, right? https://github.com/symfony/http-kernel/blob/v5.4.48/DependencyInjection/LazyLoadingFragmentHandler.php#L44-L47 |
ibexa_render()
not using decorated fragment renders
3a521f9
to
284fad4
Compare
58b05b1
to
284fad4
Compare
284fad4
to
779ffdc
Compare
|
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.
Reproduced and retested with custom controller.
Description:
Decorations of the fragment renders are not available for the
ibexa_render()
renderers (Ibexa\Core\MVC\Symfony\Templating\RenderLocationStrategy). This is because all renders are taggedkernel.fragment_renderer
, both the original services, and the decorating ones! As the renders are stored in a hash array, the original services overwrites the decorating ones.The result is that for instance the siteaccess is not serialized in esi calls when using
ibexa_render()
( but it is if usingrender_esi(Controller())
This PR uses same approach as https://github.com/symfony/http-kernel/blob/v5.4.48/DependencyInjection/LazyLoadingFragmentHandler.php#L44-L47
For QA:
See ticket for How-to-reproduce instructions
Documentation: