Skip to content

TooManyArguments does not support methods in issueHandlers #10070

@GTony

Description

@GTony

Since 5.14 following the changes in #9981 it's not longer possible to pass a method to referencedFunction

As of version 5.13.1 our psalm.xml looked as follow.

<issueHandlers>
    <TooManyArguments>
        <errorLevel type="suppress">
            <referencedFunction name="Doctrine\DBAL\Query\QueryBuilder::select"/>
            ...
        </errorLevel>
    </TooManyArguments>
</issueHandlers>

But now running psalm will return this error as per the recent changes.

Invalid referencedFunction doctrine\dbal\query\querybuilder::select

As it now stands it's impossible to suppress TooManyArguments for anything other than basic function.

Should TooManyArguments support referencedMethod or should the regex on referencedFunction also support methods?

It's also possible I'm entirely in the wrong and I shouldn't suppress TooManyArguments error for methods.

To be noted, I am aware of the existence of a plugin to help psalm with some of Doctrine's issues, but this is not the problem right here.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions