stolt / package-analyser
The package analyser is a utility tool that analyses a PHP project/micro-package for its structure.
Requires
- php: ^8.2
- laravel-zero/framework: ^11.0
- nunomaduro/termwind: ^2.0
Requires (Dev)
- laravel/pint: ^1.17
- mockery/mockery: ^1.6
- pestphp/pest: ^2.22
- stolt/lean-package-validator: ^4.0.0
README
The package analyser is a utility tool that analyses a 🐘 project/micro-📦 for its structure, and provides tips on best practices for such one. It's also my first TUI (Terminal User Interface) written in Laravel Zero, so bear with me.
Installation
The package analyser TUI should be installed globally through Composer.
composer global require --dev stolt/package-analyser
Make sure that the path to your global vendor binaries directory is in your $PATH
.
You can determine the location of your global vendor binaries directory via
composer global config bin-dir --absolute
. This way the package-analyser
executable can be located.
Usage
Run the package analyser TUI within or against a 🐘 project/micro-package directory, and it will analyse the given package and provide tips on best practices when required.
package-analyser analyse [<path-to-package-directory>]
Available options
The --write-report
option will write a HTML report in the current directory based on the provided package.
The --violations-threshold
option defines the threshold on which the package analysis is considered invalid
and produces a non-zero exit code. Defaults to 0
.
Running tests
composer test
License
This library and its TUI are licensed under the MIT license. Please see LICENSE.md for more details.
Changelog
Please see CHANGELOG.md for more details.
Contributing
Please see CONTRIBUTING.md for more details.