symplify / coding-standard

Coding Standard rules for PHP projects with focus on Clean Architecture
MIT License
347 stars 20 forks source link

Added failling test #18

Closed staabm closed 10 months ago

staabm commented 1 year ago

as requested in https://github.com/easy-coding-standard/easy-coding-standard/issues/68

samsonasik commented 1 year ago

@staabm the autoload somehow overlapped between:

which make can't fix directly to src.

Removing easy-coding-standard from require-dev seems got error:

Next PHPUnit\TextUI\RuntimeException: Class "Symplify\EasyCodingStandard\Testing\PHPUnit\AbstractCheckerTestCase" not found in /Users/samsonasik/www/coding-standard/vendor/phpunit/phpunit/src/TextUI/Command.php:99

easy-coding-standard may need to be require-dev with --no-update to ensure no overlapped autoload.

samsonasik commented 1 year ago

@staabm @TomasVotruba I am thinking that on easy-coding-standard, the autoload need to be enhanced, and @staabm was correct on PR;

just need adjustment that both src and packages need to be registered to autoload part, which of course BC break if user want to get prefixed vendor of easy-coding-standard's vendor/ classes, the scoper autoload need to be loaded manually.

samsonasik commented 1 year ago

@staabm I think the safer solution is copy Symplify\EasyCodingStandard\Testing\PHPUnit\AbstractCheckerTestCase here, and remove symplify/easy-coding-standard from require-dev, so the autoload won't overlapped between vendor and src.

TomasVotruba commented 10 months ago

Closing for lack of solution, to keep issue tracker focus on unclear issues that needs our attention. Feel free to send PR with the fix so we can merge it instantly without staling :+1:

Thank you for understanding :slightly_smiling_face: