1
0
Fork 0

Also do the change in ReinstallCommand

pull/9942/head
Jordi Boggiano 2021-06-05 16:15:09 +02:00
parent eac069bf36
commit cbb1504910
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 3 additions and 3 deletions

View File

@ -69,6 +69,7 @@ EOT
$io = $this->getIO(); $io = $this->getIO();
$composer = $this->getComposer(true, $input->getOption('no-plugins')); $composer = $this->getComposer(true, $input->getOption('no-plugins'));
$composer->getEventDispatcher()->setRunScripts(!$input->getOption('no-scripts'));
$localRepo = $composer->getRepositoryManager()->getLocalRepository(); $localRepo = $composer->getRepositoryManager()->getLocalRepository();
$packagesToReinstall = array(); $packagesToReinstall = array();
@ -142,8 +143,8 @@ EOT
$downloadManager->setPreferSource($preferSource); $downloadManager->setPreferSource($preferSource);
$downloadManager->setPreferDist($preferDist); $downloadManager->setPreferDist($preferDist);
$installationManager->execute($localRepo, $uninstallOperations, true, !$input->getOption('no-scripts')); $installationManager->execute($localRepo, $uninstallOperations, true);
$installationManager->execute($localRepo, $installOperations, true, !$input->getOption('no-scripts')); $installationManager->execute($localRepo, $installOperations, true);
if (!$input->getOption('no-autoloader')) { if (!$input->getOption('no-autoloader')) {
$optimize = $input->getOption('optimize-autoloader') || $config->get('optimize-autoloader'); $optimize = $input->getOption('optimize-autoloader') || $config->get('optimize-autoloader');
@ -154,7 +155,6 @@ EOT
$generator = $composer->getAutoloadGenerator(); $generator = $composer->getAutoloadGenerator();
$generator->setClassMapAuthoritative($authoritative); $generator->setClassMapAuthoritative($authoritative);
$generator->setApcu($apcu, $apcuPrefix); $generator->setApcu($apcu, $apcuPrefix);
$generator->setRunScripts(!$input->getOption('no-scripts'));
$generator->setIgnorePlatformRequirements($ignorePlatformReqs); $generator->setIgnorePlatformRequirements($ignorePlatformReqs);
$generator->dump($config, $localRepo, $package, $installationManager, 'composer', $optimize); $generator->dump($config, $localRepo, $package, $installationManager, 'composer', $optimize);
} }