-
-
Notifications
You must be signed in to change notification settings - Fork 196
Closed
Description
Currently it's not possible to call other scripts defined in composer.json
from auto-scripts
definition. ScriptExecutor
supports only Symfony commands, PHP scripts or raw scripts. Consider something like this:
{
"scripts": {
"auto-scripts": {
"prepare-environment": "composer-script"
},
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
],
"prepare-environment": [
"./bin/console cache:clear",
// ... other scripts
],
}
}
This would allow building better reusable scripts and automatic processes. Calling composer prepare-environment
is much more clear than composer auto-scripts
(with "cache:clear": "symfony-cmd"
inside).
Alternative solution would be making auto-scripts
configurable, so Flex would execute scripts from custom script like:
{
"scripts": {
"prepare-environment": {
"cache:clear": "symfony-cmd"
},
"post-install-cmd": [
"@prepare-environment"
],
"post-update-cmd": [
"@prepare-environment"
],
},
"extra": {
"symfony": {
"auto-scripts-source": "prepare-environment"
},
}
}
Metadata
Metadata
Assignees
Labels
No labels