Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PSR violations #364

Closed
villfa opened this issue Sep 19, 2022 · 0 comments · Fixed by #365
Closed

Fix PSR violations #364

villfa opened this issue Sep 19, 2022 · 0 comments · Fixed by #365

Comments

@villfa
Copy link
Collaborator

villfa commented Sep 19, 2022

Since Composer 2.4.0, a new --strict-psr flag has been added to dump-autoload to check for PSR violations.

Here the result for churn-php:

# composer dump-autoload --optimize --strict-psr

Generating optimized autoload files
Class Churn\Tests\Integration\Command\Assets\TestAfterAnalysisHook located in ./tests/Integration/Command/Assets/hooks.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Integration\Command\Assets\TestAfterFileAnalysisHook located in ./tests/Integration/Command/Assets/hooks.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Integration\Command\Assets\TestBeforeAnalysisHook located in ./tests/Integration/Command/Assets/hooks.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Unit\Assessors\CyclomaticComplexity\CyclomaticComplexityAssessorTest located in ./tests/Unit/Assessor/CyclomaticComplexityAssessorTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Event\Event\AfterAnalysisEventTest located in ./tests/Unit/Event/Event/AfterAnalysisEventTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Event\Event\AfterFileAnalysisEventTest located in ./tests/Unit/Event/Event/AfterFileAnalysisEventTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Result\HighestScoresTest located in ./tests/Unit/Result/HighestScoresTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Result\ResultAccumulatorTest located in ./tests/Unit/Result/ResultAccumulatorTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Result\ResultTest located in ./tests/Unit/Result/ResultTest.php does not comply with psr-4 autoloading standard. Skipping.

Once these violations will be fixed, it'd be great to run this command in the CI to prevent new violations to appear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant