Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
fabpot merged 1 commit intosymfony:masterfromnicolas-grekas:di-no-preload
Apr 24, 2020

Conversation

nicolas-grekas
Copy link
Member

QA
Branch?master
Bug fix?no
New feature?yes
Deprecations?no
Tickets-
LicenseMIT
Doc PR-

Suggested by@stof on Slack: this improves preloading by propagating thecontainer.no_preload tag to services that are referenced only by not-preloaded services.

The benefit is double:

  1. this fixes potential over-preloading
  2. this requires less work from the community: no need to add the tag anymore most of the time

As a corollary, listeners of console events are tagged withcontainer.no_preload automatically now.

}
}
if ($noPreload && \count($extractingDispatcher->listeners) === $noPreload) {
$container->getDefinition($id)->addTag($this->noPreloadTagName);
Copy link
Member

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 ?

Copy link
MemberAuthor

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.

@fabpot
Copy link
Member

Thank you@nicolas-grekas.

@fabpotfabpot merged commitac3bd14 intosymfony:masterApr 24, 2020
@nicolas-grekasnicolas-grekas deleted the di-no-preload branchApril 24, 2020 10:19
@nicolas-grekasnicolas-grekas modified the milestones:next,5.1May 4, 2020
@fabpotfabpot mentioned this pull requestMay 5, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@stofstofstof left review comments

@javiereguiluzjaviereguiluzjaviereguiluz approved these changes

@TobionTobionTobion approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
5.1
Development

Successfully merging this pull request may close these issues.

6 participants
@nicolas-grekas@fabpot@javiereguiluz@stof@Tobion@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp