Skip to content

Commit

Permalink
implicit "--no-check-lock" (10715, --no-check-lock; 1/?)
Browse files Browse the repository at this point in the history
... config.lock = false is an implicit --no-check-lock ...

issue: 10715
  • Loading branch information
ktomk committed Apr 12, 2022
1 parent 9bfd059 commit 59a541d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Composer/Command/ValidateCommand.php
Expand Up @@ -95,6 +95,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

$lockErrors = array();
$composer = Factory::create($io, $file, $input->hasParameterOption('--no-plugins'));
$checkLock = $checkLock && (bool)$composer->getConfig()->get('lock'); // config.lock = false ~= implicit --no-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 <package name>`.';
Expand Down

0 comments on commit 59a541d

Please sign in to comment.