Skip to main content

Tooling

Composer bin Plugin​

For all of our tooling we use the Composer bin plugin, to avoid that the dependencies of your tools don't interfere with your application.

Install the library as a dev dependency:

composer req --dev bamarni/composer-bin-plugin

Then enable the tool in your composer.json:

{
"extra": {
"bamarni-bin": {
"bin-links": false,
"forward-command": true
}
}
}

You should ignore the nested vendor directories in your .gitignore and the composer.lock:

/vendor-bin/*/composer.lock
/vendor-bin/*/vendor
Best Practice

Ignoring the composer.lock has the advantage, that the CI will always install the latest versions -> you will never have outdated code style & linting results.

PHPUnit​

If you need to use PHPUnit, you should use the PHPUnit bridge from Symfony, so that the dependencies of PHPUnit (which have a large overlap with a common Symfony application) don't interfere with your project.

Run your tests with:

./vendor/bin/simple-phpunit