Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[DI] skip preloading dependencies of non-preloaded services#36535
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
f7f9d1b
to13e7af3
Compare} | ||
} | ||
if ($noPreload && \count($extractingDispatcher->listeners) === $noPreload) { | ||
$container->getDefinition($id)->addTag($this->noPreloadTagName); |
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.
What if a class is both a subscriber and tagged with additionalkernel.listener
tags ?
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.
Then we don't really care IMHO: it should be exceptional, thus not worth any extra complexity. And the outcome is minor anyway.
Uh oh!
There was an error while loading.Please reload this page.
Thank you@nicolas-grekas. |
Suggested by@stof on Slack: this improves preloading by propagating the
container.no_preload
tag to services that are referenced only by not-preloaded services.The benefit is double:
As a corollary, listeners of console events are tagged with
container.no_preload
automatically now.