Thanks to visit codestin.com
Credit goes to github.com

Skip to content

lint:container command fails on named argument service #52768

Closed
@simonberger

Description

@simonberger

Symfony version(s) affected

5.4.31

Description

I receive an error like:

[ERROR] Invalid definition for service "service.one": argument 1 of
"ServiceOne::__construct()" accepts                    
         "Psr\Log\LoggerInterface", "null" passed.           

When executing

bin/console lint:container

In debugging I noticed it comes from CheckTypeDeclarationsPass where ::checkTypeDeclarations expects a numbered list of arguments. I wonder why that just now fails as we have some more of these already, but anyway.

I checked the class in Symfony 6 and 7 and noticed @nicolas-grekas fixed that in PR #49944 which does sound like something different in general. Picking just the change of the for loop would fix the command for me.

How to reproduce

Create a service with named arguments (not sure if this itself is really enough)

Possible Solution

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions