composer/composer — Issue #218: Add Before/After Trigger on install/update command
Author: francoispluchino
Created: 2012-01-18 09:14:13+00:00
State: open

To execute a command or script before and/or after the vendors installation.
This command would be in the composer.json:

...

"trigger": {
"after": [
"php ./my_folder/my_custom_script.php"
]
}

...

We could also define a command for each type of OS:

...

"trigger": {
"after": [
"php ./my_folder/my_custom_script.php myarg1 myarg2" : ["windows"],
"./my_folder/my_custom_script.php myarg1 myarg2" : ["linux", "mac"],
]
}

...

In this way, it would be possible to initialize a complete project