$io->writeError(sprintf('<warning>Warning: This development build of composer is over 60 days old. It is recommended to update it by running "%s self-update" to get the latest version.</warning>', $_SERVER['PHP_SELF']));
}
}
if (getenv('COMPOSER_NO_INTERACTION')) {
$input->setInteractive(false);
}
if (getenv('COMPOSER_NO_INTERACTION')) {
$input->setInteractive(false);
}
// switch working dir
if ($newWorkDir = $this->getNewWorkingDir($input)) {
$oldWorkingDir = getcwd();
chdir($newWorkDir);
if ($io->isDebug() >= 4) {
$io->writeError('Changed CWD to ' . getcwd());
// switch working dir
if ($newWorkDir = $this->getNewWorkingDir($input)) {
$oldWorkingDir = getcwd();
chdir($newWorkDir);
if ($io->isDebug() >= 4) {
$io->writeError('Changed CWD to ' . getcwd());
}
}
}
// add non-standard scripts as own commands
$file = Factory::getComposerFile();
if (is_file($file) && is_readable($file) && is_array($composer = json_decode(file_get_contents($file), true))) {
if (isset($composer['scripts']) && is_array($composer['scripts'])) {
foreach ($composer['scripts'] as $script => $dummy) {
if (!defined('Composer\Script\ScriptEvents::'.str_replace('-', '_', strtoupper($script)))) {
if ($this->has($script)) {
$io->writeError('<warning>A script named '.$script.' would override a native Composer function and has been skipped</warning>');