]> git.pld-linux.org Git - packages/satis.git/blob - versionparser.patch
parse rpm-like tags: 1.2-3
[packages/satis.git] / versionparser.patch
1 parse rpm-like tags: 1.2-3
2
3 --- vendor/composer/composer/src/Composer/Package/Version/VersionParser.php~    2015-04-28 09:19:17.000000000 +0300
4 +++ vendor/composer/composer/src/Composer/Package/Version/VersionParser.php     2015-04-28 09:19:19.020725756 +0300
5 @@ -117,6 +117,11 @@
6              return 'dev-'.substr($version, 4);
7          }
8  
9 +               // XXX: convert 1.2-3 to 1.2-p3
10 +               if (preg_match('/^(\d+[\d.]+)-(\d+)$/', $version, $m)) {
11 +                       $version = "{$m[1]}-p{$m[2]}";
12 +               }
13 +
14          // match classical versioning
15          if (preg_match('{^v?(\d{1,3})(\.\d+)?(\.\d+)?(\.\d+)?'.self::$modifierRegex.'$}i', $version, $matches)) {
16              $version = $matches[1]
This page took 0.062785 seconds and 3 git commands to generate.