diff --git a/Util/LockerUtil.php b/Util/LockerUtil.php index 8712bcc..12ce7ed 100644 --- a/Util/LockerUtil.php +++ b/Util/LockerUtil.php @@ -36,7 +36,7 @@ public static function getLocker(IOInterface $io, RepositoryManager $rm, Install { $lockFile = str_replace('.json', '.lock', $composerFile); // @codeCoverageIgnoreStart - return \defined('Composer\Composer::RUNTIME_API_VERSION') && '2.0.0' === Composer::RUNTIME_API_VERSION + return \defined('Composer\Composer::RUNTIME_API_VERSION') && version_compare(Composer::RUNTIME_API_VERSION, '2.0.0', '>=') ? new Locker($io, new JsonFile($lockFile, null, $io), $im, file_get_contents($composerFile)) : new Locker($io, new JsonFile($lockFile, null, $io), $rm, $im, file_get_contents($composerFile)); }