Projects accumulate a README section listing the commands nobody remembers: the linter with its config path, the test suite with its flags, the cache clear that has to run in a particular order. Composer already has a place to put them.
{
"scripts": {
"test": "phpunit --colors=always",
"lint": "phpcs --standard=phpcs.xml src",
"check": ["@lint", "@test"],
"post-install-cmd": "php bin/clear-cache"
}
}
A script can reference another with @name, so a composite task stays readable. Composer also puts vendor/bin on the path for the duration, which is why the commands above need no prefix. The lifecycle hooks — post-install-cmd, post-update-cmd — are the useful half: they make setup steps impossible to forget rather than merely documented.