silverorange / ambiguous-class-name-detector
Command-line tool to check for ambiguous class names with Composer's generated class map.
Installs: 5 391
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 18
Forks: 3
Open Issues: 0
Requires
- php: >=7.1.0
- ext-json: *
- ext-mbstring: *
Requires (Dev)
- phpunit/phpunit: ^10.5.19
- silverorange/coding-standard: ^1.1.0
This package is auto-updated.
Last update: 2024-10-09 20:23:15 UTC
README
Command-line tool to detect ambiguous class names when using the class map autoload mechanism with Composer.
This tool is intended to be used in a CI environment and should fail if ambiguous class names are introduced in a project.
Development
This tool uses composer. To test during
development, make sure you have the required packages installed by running
composer install
.
You can run the tool using ./bin/check-for-ambiguous-class-names
.
This project uses prettier for automatic code formatting. To format files in
the src/
directory, run yarn install
and then yarn make-pretty
.
Installation
Add to your project's development dependencies with:
composer require --dev silverorange/ambiguous-class-name-detector
Then add composer run check-for-ambiguous-class-names
to your CI pipeline. If
ambiguous class names are detected, the command will exit with a non-zero
value and report the ambiguous class names.