1
0
Fork 0

Fix --no-plugins not working in certain edge cases

pull/7515/head
Jordi Boggiano 2018-08-03 15:23:04 +02:00
parent 73f14c0c7c
commit 0fdf746ebe
3 changed files with 3 additions and 3 deletions

View File

@ -130,7 +130,7 @@ abstract class BaseCommand extends Command
$disablePlugins = $input->hasParameterOption('--no-plugins');
$composer = $this->getComposer(false, $disablePlugins);
if (null === $composer) {
$composer = Factory::createGlobal($this->getIO(), false);
$composer = Factory::createGlobal($this->getIO(), $disablePlugins);
}
if ($composer) {
$preCommandRunEvent = new PreCommandRunEvent(PluginEvents::PRE_COMMAND_RUN, $input, $this->getName());

View File

@ -60,7 +60,7 @@ EOT
$platformRepo = new PlatformRepository;
$io = $this->getIO();
if (!($composer = $this->getComposer(false))) {
$composer = Factory::create($this->getIO(), array());
$composer = Factory::create($this->getIO(), array(), $input->hasParameterOption('--no-plugins'));
}
$localRepo = $composer->getRepositoryManager()->getLocalRepository();
$installedRepo = new CompositeRepository(array($localRepo, $platformRepo));

View File

@ -89,7 +89,7 @@ EOT
list($errors, $publishErrors, $warnings) = $validator->validate($file, $checkAll);
$lockErrors = array();
$composer = Factory::create($io, $file);
$composer = Factory::create($io, $file, $input->hasParameterOption('--no-plugins'));
$locker = $composer->getLocker();
if ($locker->isLocked() && !$locker->isFresh()) {
$lockErrors[] = 'The lock file is not up to date with the latest changes in composer.json, it is recommended that you run `composer update`.';