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 order of arguments when mixing positional and named ones#49126

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:5.4fromnicolas-grekas:di-args-order
Jan 27, 2023

Conversation

@nicolas-grekas
Copy link
Member

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

@msteltenpool
Copy link

Tried to see if this would fix the latest builds. The below issue popped up, need to dive a bit deeper to understand and isolate this new issue.

Invalid constructor argument 2 for service "[REMOVED]": argument 1 must be defined before. Check your     service definition.

@msteltenpool
Copy link

services.yaml

services:    # default configuration for services in *this* file    _defaults:        public: true        bind:            $a: 'A'    App\Controller\IndexController:        arguments:            $b: 'B'            $c: 'C'

IndexController.php

class IndexController{    public function __construct($b, $a, $c)    {    }}

Result:

!!  In DefinitionErrorExceptionPass.php line 54:!!                                                                                 !!    Invalid constructor argument 2 for service "App\Controller\IndexController"  !!    : argument 1 must be defined before. Check your service definition.

@nicolas-grekas
Copy link
MemberAuthor

Thanks for checking. I'd need a reproducer to figure out what I missed. 🙏

@nicolas-grekas
Copy link
MemberAuthor

Got it thanks. PR updated.

@msteltenpool
Copy link

Confirmed. No issues any more on my end. Thanks!

nicolas-grekas reacted with thumbs up emoji

@nicolas-grekasnicolas-grekas merged commit387a6b0 intosymfony:5.4Jan 27, 2023
@nicolas-grekasnicolas-grekas deleted the di-args-order branchJanuary 27, 2023 11:34
This was referencedFeb 1, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof approved these changes

@dunglasdunglasAwaiting requested review from dunglasdunglas is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

4 participants

@nicolas-grekas@msteltenpool@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp