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

[FrameworkBundle] fix wiring of annotations.cached_reader#46427

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
nicolas-grekas merged 1 commit intosymfony:4.4fromnicolas-grekas:annotread
May 23, 2022

Conversation

@nicolas-grekas
Copy link
Member

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#46202
LicenseMIT
Doc PR-

Alsofixes#26088 (comment)

Instead of trying to hack the compilation of the container to prevent it from inliningannotations.cached_reader, this PR relies on ancontainer.do_not_inline tag that just does that, prevent inlining so that removing passes can reliably fetch the corresponding services from the container by id or by tag.

Copy link
Member

@chalasrchalasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nice.

@chalasr
Copy link
Member

(would be even better with a test case if possible)

nicolas-grekas reacted with thumbs up emoji

Copy link
Member

@stofstof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Would be great to add a test fetching the annotation reader public service from the container as a functional test


$tagsToKeep =$container->hasParameter('container.behavior_describing_tags')
?$container->getParameter('container.behavior_describing_tags')
: ['container.do_not_inline','container.service_locator','container.service_subscriber'];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

should those be merged with the parameter instead ?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I don't think so: giving full control to the parameter is more flexible to me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

but does it really make sense to disable core ones ? It would mean that if a project customizes the list, they would not benefit from new additions done in the core like this bugfix until they discover this internal change to the default value.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This tag is already used inResolveInstanceofConditionalsPass where ishas to containcontainer.service_locator and other core tags. This code doesn't introduce anything new to me, convention-wise (since this parameter works by convention).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

ok

@nicolas-grekas
Copy link
MemberAuthor

Test added.

Status: needs review

@nicolas-grekasnicolas-grekas merged commit11a87ad intosymfony:4.4May 23, 2022
@nicolas-grekasnicolas-grekas deleted the annotread branchMay 23, 2022 12:39
This was referencedMay 27, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof left review comments

@chalasrchalasrchalasr approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

4 participants

@nicolas-grekas@chalasr@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp