diff --git a/src/Composer/Command/ValidateCommand.php b/src/Composer/Command/ValidateCommand.php index b942a1f40d05..971a9b34f8f7 100644 --- a/src/Composer/Command/ValidateCommand.php +++ b/src/Composer/Command/ValidateCommand.php @@ -96,8 +96,8 @@ protected function execute(InputInterface $input, OutputInterface $output) $lockErrors = array(); $composer = Factory::create($io, $file, $input->hasParameterOption('--no-plugins')); - $checkLock = $checkLock && $composer->getConfig()->getBool('lock'); // config.lock = false ~= implicit --no-check-lock - $checkLock = $checkLock || $input->getOption('check-lock'); // --check-lock overrides + // config.lock = false ~= implicit --no-check-lock; --check-lock overrides + $checkLock = ($checkLock && $composer->getConfig()->getBool('lock')) || $input->getOption('check-lock'); $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` or `composer update `.';