-
-
Notifications
You must be signed in to change notification settings - Fork 341
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
[TwigComponent] Fix ux:icon & ux:map renders #2210
Conversation
Can you link the Blackfire profiles delta plz? |
ec7ccd7
to
24c1cb2
Compare
Thank you Simon. |
@@ -108,6 +110,10 @@ class_exists(AbstractArgument::class) ? new AbstractArgument(\sprintf('Added in | |||
$container->register('.ux.twig_component.twig.component_runtime', ComponentRuntime::class) | |||
->setArguments([ | |||
new Reference('ux.twig_component.component_renderer'), | |||
service_locator([ | |||
'ux:icon' => service('.ux_icons.twig_icon_runtime')->nullOnInvalid(), | |||
'ux:map' => service('ux_map.twig_runtime')->nullOnInvalid(), |
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.
chiming here a bit late: this doesn't work
a service locator must point to non-null references
when these are turned into nulls, XmlDumper explodes (and that's a symptom of this code, which is not "legal")
Also, from a design pov, this looks super hardcoded. How can one pass more things to the locator?
This should use a tagged locator instead.
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.
This was spotted by the CI BTW:
https://github.com/symfony/ux/actions/runs/11071829929/job/30764609180
Change implementation to avoid many dispatched events for nothing
Add a conflict in symfony/ux-map and symfony/ux-icons to synchronise the 3 packages to 2.21
Performance gain around 20%