X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FcheckComposerLockUpToDate.php;h=e5b4c13ec72e75a145844c0183a52ff6c3017a1d;hp=9ec61dc04f5a8a81ffca802e7163918f7fb19a33;hb=a6d396bba9f57b16eac80218c30f5340f967f695;hpb=7ed96f4de2411d21cce4572e1fac7d3a8d2d0b77 diff --git a/maintenance/checkComposerLockUpToDate.php b/maintenance/checkComposerLockUpToDate.php index 9ec61dc04f..e5b4c13ec7 100644 --- a/maintenance/checkComposerLockUpToDate.php +++ b/maintenance/checkComposerLockUpToDate.php @@ -25,7 +25,7 @@ class CheckComposerLockUpToDate extends Maintenance { $lockLocation = "$IP/vendor/composer.lock"; if ( !file_exists( $lockLocation ) ) { $this->error( - 'Could not find composer.lock file. Have you run "composer install"?', + 'Could not find composer.lock file. Have you run "composer install --no-dev"?', 1 ); } @@ -34,11 +34,7 @@ class CheckComposerLockUpToDate extends Maintenance { $lock = new ComposerLock( $lockLocation ); $json = new ComposerJson( $jsonLocation ); - if ( $lock->getHash() === $json->getHash() ) { - $this->output( "Your composer.lock file is up to date with current dependencies!\n" ); - return; - } - // Out of date, lets figure out which dependencies are old + // Check all the dependencies to see if any are old $found = false; $installed = $lock->getInstalledDependencies(); foreach ( $json->getRequiredDependencies() as $name => $version ) { @@ -57,16 +53,13 @@ class CheckComposerLockUpToDate extends Maintenance { if ( $found ) { $this->error( 'Error: your composer.lock file is not up to date. ' . - 'Run "composer update" to install newer dependencies', + 'Run "composer update --no-dev" to install newer dependencies', 1 ); } else { - // The hash is the entire composer.json file, - // so it can be updated without any of the dependencies changing // We couldn't find any out-of-date dependencies, so assume everything is ok! $this->output( "Your composer.lock file is up to date with current dependencies!\n" ); } - } }