Skip to content

Rules registered twice through CodeQualityLevel and CodingStyleLevel #9037

@UweOhse

Description

@UweOhse

Bug Report

When trying to use ... ->withCodeQualityLevel(99)->withCodingStyleLevel(99)
i receive the following error with the current rector version (b5af1e).

[ERROR] Following rules are registered twice: Rector\CodingStyle\Rector\ClassMethod\FuncGetArgsToVariadicParamRector,
Rector\CodingStyle\Rector\FuncCall\CallUserFuncToMethodCallRector,
Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector

Both CodingStyle and CodeQuality make use of the same rules, which causes this conflict.

I removed the first throw() in src/Validation/RectorConfigValidator.php for the time being, and didn't notice any problems.

Minimal PHP Code Causing Issue

https://getrector.com/demo/17f598b4-6eb8-4e71-97a7-038df3a7e01a

Expected Behaviour

?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions