From 73c109c5614af6def86a5ead2fef1dc47d16d298 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 25 Aug 2021 21:09:11 +0200 Subject: [PATCH] Make sure that names with wildcards which are not preceded by dots are also seen as package names and not version constraints --- src/Composer/Package/Version/VersionParser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Package/Version/VersionParser.php b/src/Composer/Package/Version/VersionParser.php index e2b70b959..e956af145 100644 --- a/src/Composer/Package/Version/VersionParser.php +++ b/src/Composer/Package/Version/VersionParser.php @@ -51,7 +51,7 @@ class VersionParser extends SemverVersionParser for ($i = 0, $count = count($pairs); $i < $count; $i++) { $pair = preg_replace('{^([^=: ]+)[=: ](.*)$}', '$1 $2', trim($pairs[$i])); - if (false === strpos($pair, ' ') && isset($pairs[$i + 1]) && false === strpos($pairs[$i + 1], '/') && !PlatformRepository::isPlatformPackage($pairs[$i + 1])) { + if (false === strpos($pair, ' ') && isset($pairs[$i + 1]) && false === strpos($pairs[$i + 1], '/') && !preg_match('{(?