Skip to content

Commit 2cce49d

Browse files
authored
Remove AttributesSniff to fix conflict with Slevomat ReferenceUsedNamesOnly (#43)
The AttributesSniff required FQCN (fully qualified class names) for PHP 8 attributes, e.g. `#[\PHPUnit\Framework\Attributes\DataProvider('foo')]`. However, this conflicts with SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly which requires using short names via use statements. When both rules are active, the auto-fixer enters an infinite loop: 1. AttributesSniff converts to FQCN 2. ReferenceUsedNamesOnly converts back to short name with use statement 3. Go to step 1 Removing the AttributesSniff resolves this conflict and aligns with the modern PHP convention of using short names with use statements for better readability and IDE support.
1 parent d4dc874 commit 2cce49d

File tree

4 files changed

+0
-222
lines changed

4 files changed

+0
-222
lines changed

PhpCollective/Sniffs/Commenting/AttributesSniff.php

Lines changed: 0 additions & 100 deletions
This file was deleted.

tests/PhpCollective/Sniffs/Commenting/AttributesSniffTest.php

Lines changed: 0 additions & 22 deletions
This file was deleted.

tests/_data/Attributes/after.php

Lines changed: 0 additions & 50 deletions
This file was deleted.

tests/_data/Attributes/before.php

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)