-
-
Notifications
You must be signed in to change notification settings - Fork 84
Description
Symfony version(s) affected
6.4.x
Description
To render multiple HTML pages using Twig, we likely need to reset Webpack Encore's tag renderer and entrypoint lookup services. Without resetting these services, some files may miss their entrypoints because the tag renderer assumes they have already been rendered. While there is a reset method for the tag renderer, it doesn't reset the entrypoint lookup. The entrypoint lookup does have a reset method, but we do not have access to the service locator, so we cannot determine the available packages.
How to reproduce
This issue is not tied to a specific bug but to a missing feature. We need the ability to reset both the Webpack Encore tag renderer and the entrypoint lookup when rendering multiple HTML pages using Twig. Currently, we can reset the tag renderer, but the entrypoint lookup cannot be reset without access to the service locator, which prevents us from managing multiple page renders properly.
Possible Solution
Use ReflectionApi to access the service locator inside the entrypoint collection interface?
Additional Context
No response