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

[DependencyInjection] Resolve ChildDefinition in AbstractRecursivePass#44418

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

Conversation

@fancyweb
Copy link
Contributor

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

At leastAttributeAutoconfigurationPass (5.4 new pass) relies onAbstractRecursivePass and is executed beforeResolveChildDefinitionsPass so child definitions are not necessary resolved inAbstractRecursivePass. Doing it on 4.4 to have the same behavior on all maintained branches.

Itfixes#44342 in a better way because the final class of the factory can be resolved.

if ($factory) {
[$class,$method] =$factory;

if ('__construct' ===$method) {
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Let's throw as soon as possible?


try {
if (!$r =$this->container->getReflectionClass($class)) {
if (null ===$class) {
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

This is a minor DX improvement. If the class is null this message looks better to me thanInvalid service "foo": class "" does not exist. (seegetReflectionMethod() below where we already check if a class is set or not).

@fancywebfancywebforce-pushed thedi/resolve-factory-parent-abrp branch from86febb1 toacbee81CompareDecember 11, 2021 14:54
@nicolas-grekas
Copy link
Member

Thank you@fancyweb.

@nicolas-grekasnicolas-grekas merged commit67f7917 intosymfony:4.4Dec 11, 2021
This was referencedDec 29, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

3 participants

@fancyweb@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp