From 755570002a015921083675eef82306469ae7a138 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 7 Oct 2024 10:32:25 +0200 Subject: [PATCH] Fix invalid version string "9999999.9999999" --- src/Flex.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Flex.php b/src/Flex.php index a45ce90df..30be50649 100644 --- a/src/Flex.php +++ b/src/Flex.php @@ -391,6 +391,10 @@ public function recordOperations(InstallerEvent $event) $versionParser = new VersionParser(); $packages = []; foreach ($this->lock->all() as $name => $info) { + if ('9999999.9999999' === $info['version']) { + // Fix invalid versions found in some lock files + $info['version'] = '99999.9999999'; + } $packages[] = new Package($name, $versionParser->normalize($info['version']), $info['version']); }