Also mark @putenv and @php deprecated/forbidden as script names to avoid clashes
parent
1b5b5c48bf
commit
cc3b53bc2e
|
@ -252,8 +252,10 @@ class ArrayLoader implements LoaderInterface
|
||||||
foreach ($config['scripts'] as $event => $listeners) {
|
foreach ($config['scripts'] as $event => $listeners) {
|
||||||
$config['scripts'][$event] = (array) $listeners;
|
$config['scripts'][$event] = (array) $listeners;
|
||||||
}
|
}
|
||||||
if (isset($config['scripts']['composer'])) {
|
foreach (array('composer', 'php', 'putenv') as $reserved) {
|
||||||
trigger_error('The `composer` script name is reserved for internal use, please avoid defining it', E_USER_DEPRECATED);
|
if (isset($config['scripts'][$reserved])) {
|
||||||
|
trigger_error('The `'.$reserved.'` script name is reserved for internal use, please avoid defining it', E_USER_DEPRECATED);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$package->setScripts($config['scripts']);
|
$package->setScripts($config['scripts']);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue