浏览代码

Support parsing stability flags on complex constraints

Fixes #3570
Christophe Coevoet 10 年之前
父节点
当前提交
d8813341c3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Composer/Package/Loader/RootPackageLoader.php

+ 1 - 1
src/Composer/Package/Loader/RootPackageLoader.php

@@ -131,7 +131,7 @@ class RootPackageLoader extends ArrayLoader
         $minimumStability = $stabilities[$minimumStability];
         foreach ($requires as $reqName => $reqVersion) {
             // parse explicit stability flags to the most unstable
-            if (preg_match('{^[^,\s]*?@('.implode('|', array_keys($stabilities)).')$}i', $reqVersion, $match)) {
+            if (preg_match('{^[^@]*?@('.implode('|', array_keys($stabilities)).')$}i', $reqVersion, $match)) {
                 $name = strtolower($reqName);
                 $stability = $stabilities[VersionParser::normalizeStability($match[1])];