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] Fix "Cannot replace arguments" errors caused by ResolveAutowireInlineAttributesPass#54908

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
derrabus merged 1 commit intosymfony:7.1fromnicolas-grekas:di-inline-child
May 13, 2024

Conversation

@nicolas-grekas
Copy link
Member

QA
Branch?7.1
Bug fix?yes
New feature?no
Deprecations?no
IssuesFix#54823
LicenseMIT

dmaicher reacted with thumbs up emoji
}

$dummy =$value;
while (null ===$dummy->getClass() &&$dummyinstanceof ChildDefinition) {
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

this is dead code: definitions with no class are already skipped before (and that's legit for child definitions too)


foreach ($parametersas$index =>$parameter) {
if ($isChildDefinition) {
$index ='index_'.$index;
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Renaming of indexes for child definitions is what caused the issue.
The patch fixes this using named arguments instead, which means using Definition::setArgument() instead of replaceArgument() when resolving child definitions.

Copy link
Member

@GromNaNGromNaN left a comment

Choose a reason for hiding this comment

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

This fixes the issue and the test is perfect.

Copy link
Member

@derrabusderrabus left a comment

Choose a reason for hiding this comment

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

This patch fixes the issue for me. Thank you!

@derrabus
Copy link
Member

Thank you Nicolas for taking care of this regression.

nicolas-grekas reacted with heart emoji

@derrabusderrabus merged commit08ea87b intosymfony:7.1May 13, 2024
@nicolas-grekasnicolas-grekas deleted the di-inline-child branchMay 13, 2024 19:20
@fabpotfabpot mentioned this pull requestMay 17, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@GromNaNGromNaNGromNaN approved these changes

@derrabusderrabusderrabus approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

7.1

Development

Successfully merging this pull request may close these issues.

[DependencyInjection] Can not replace arguments if none have been configured yet - InlineAutowire

4 participants

@nicolas-grekas@derrabus@GromNaN@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp