Static analysis tools for PHP projects
Provides php-cs-fixer
, phpstan
, psalm
, rector
, & twigcs
as isolated
composer installs within your project. This eliminates the need to worry about
any underlying conflicts with tool dependencies and your own project dependencies.
All commands are run from your root project directory. e.g. path/to/your-project
-
Run
composer install -d tools
-
Run
git submodule add https://github.com/rushlow-development/php-tools tools
. This will "clone" thephp-tools
repo intopath-to-project/tools
. -
Run
tools/bin/install
which will runcomposer upgrade
in each of the tool directories. -
Copy and paste the contents of
scripts.json
into yourroot
composer.json file. This will allow you to runcomposer tools:run
from your project root directory.
I'd like to use composer plugins / custom installers to automate this. Allowing one
to run composer require --dev rushlow-development/php-tools
and then the tools
would be installed as needed...