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] add tagscontainer.preload/.no_preload to declare extra classes to preload/services to not preload#36195

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-preload-tag
Apr 5, 2020

Conversation

nicolas-grekas
Copy link
Member

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

To allow fine-grained declaration of sidekick classes in DI extensions.
Follows#36103

rvanlaak and versh23 reacted with thumbs up emoji
@nicolas-grekasnicolas-grekas added this to thenext milestoneMar 24, 2020
@nicolas-grekasnicolas-grekas changed the title[DI] add tag "container.preload" tag to declare sidekick classes to preload[DI] add tag "container.preload" to declare sidekick classes to preloadMar 25, 2020
@nicolas-grekasnicolas-grekasforce-pushed thedi-preload-tag branch 2 times, most recently from82543d0 tof15656eCompareMarch 25, 2020 08:34
@michaljusiega
Copy link
Contributor

Soclass_exists is no longer needed in favor ofcontainer.preload tag do add classes to*.preload.php dumped file ?

@stof
Copy link
Member

@michaljusiega AFAIU, the class_exists were solving 2 issues:

  • discovery of classes to be preloaded
  • compatibility with preloading is some specific cases related to anonymous classes which break if the class is not loaded

This PR provides an alternative solution to the first issue (thoughclass_exists will still work). For the second problem,class_exists is still the proper solution IMO, as that's not about the Symfony preload dumper by itself, but about compat with preloading.

@nicolas-grekasnicolas-grekas changed the title[DI] add tag "container.preload" to declare sidekick classes to preload[DI] add tagscontainer.preload/.no_preload to declare extra classes to preload/services to not preloadMar 25, 2020
@nicolas-grekas
Copy link
MemberAuthor

nicolas-grekas commentedMar 25, 2020
edited
Loading

I updated the PR to now also provide acontainer.no_preload tag.
I added it to eg. console commands.

@michaljusiega: what@stof said:class_exists() are better options for portability and for locality.container.preload serves adding preloading info to third party packages that don't (want to) useclass_exists(), and also in programmatic situations where a bundle's logic might known better about fine grained preloading, depending on the configuration.

@nicolas-grekasnicolas-grekasforce-pushed thedi-preload-tag branch 2 times, most recently fromb62ee86 tob075b40CompareMarch 25, 2020 17:46
@michaljusiega
Copy link
Contributor

@nicolas-grekas,@stof I understand. Thanks!

@nicolas-grekasnicolas-grekasforce-pushed thedi-preload-tag branch 3 times, most recently fromc0121bf to966ad2dCompareApril 4, 2020 09:54
@fabpot
Copy link
Member

Thank you@nicolas-grekas.

@fabpotfabpot merged commit3b38f38 intosymfony:masterApr 5, 2020
@nicolas-grekasnicolas-grekas deleted the di-preload-tag branchApril 5, 2020 16:59
@nicolas-grekasnicolas-grekas removed this from thenext milestoneMay 4, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@rosierrosierrosier left review comments

@fabpotfabpotfabpot 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@michaljusiega@stof@fabpot@rosier@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp