Search code examples
composer-phpphpcodesnifferphpmd

What is the best place for tools like phpcpd, phpmd, php_codesniffer


What is the best place for tools like phpcpd, phpmd, php_codesniffer to include them in composer require-dev section or install as phar archive somewhere in the system?

When they are included in require-dev often it is not possible to update for newer version because of some old components in the project. If installed as phar, it is harder to track versions of this tools and harder to check if these tools are installed.


Solution

  • The best is composer! require-dev section, because that ensures every uses has the same version.

    When I download you package, and you use e.g. PHPUnit phar 4.9 and I will have PHPUnit phar 6.0, it will probably fail. And we would have long conversation, where the bug is :).