composer/composer — pull request #2516 by MaxGfeller (2013-12-19 07:25:33+00:00)
Title: Allow users to define their own scripts

Composer already supports defining scripts to be run for specific events, like `post-install-cmd`, `post-create-project-cmd` etc. However it would be nice if users could define their own scripts which then can be run with `composer run`.

This is already possible with [npm](http://npmjs.org), although not [well documented](https://npmjs.org/doc/misc/npm-scripts.html). @substack wrote a [detailed article](http://substack.net/task_automation_with_npm_run) on how these scripts can be used for different tasks in your project.

It would be cool if composer supported this because their is no really popular tool for defining build-tasks in php.

Some use cases might be:
- Running tests: `"test": "vendor/bin/phpunit -c app"`
- Building your app: `"build": "vendor/bin/box"`
- Make a release: `"release": "composer run build && && git tag "`
- ...and [many more](http://substack.net/task_automation_with_npm_run)