jenkins-bot has submitted this change and it was merged.

Change subject: Update composer/semver to 1.4.0
......................................................................


Update composer/semver to 1.4.0

https://github.com/composer/semver/compare/1.2.0...1.4.0
Change-Id: I4463dd4abe1972f4e3a4bcc6389dc861ecc8201a
---
M composer.json
M composer.lock
M composer/installed.json
M composer/semver/CHANGELOG.md
M composer/semver/src/Constraint/MultiConstraint.php
M composer/semver/src/VersionParser.php
6 files changed, 123 insertions(+), 73 deletions(-)

Approvals:
  BryanDavis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/composer.json b/composer.json
index ed732d3..d1e3a0d 100644
--- a/composer.json
+++ b/composer.json
@@ -9,7 +9,7 @@
        },
        "prefer-stable": true,
        "require": {
-               "composer/semver": "1.2.0",
+               "composer/semver": "1.4.0",
                "cssjanus/cssjanus": "1.1.2",
                "firebase/php-jwt": "3.0.0",
                "liuggio/statsd-php-client": "1.0.18",
diff --git a/composer.lock b/composer.lock
index 5a8b1b0..774d2dd 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,21 +4,21 @@
         "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";,
         "This file is @generated automatically"
     ],
-    "hash": "22fcab8860b814ed961cfd2720861e99",
-    "content-hash": "b29b7a10a50100ffa5b6a87ce5d1646c",
+    "hash": "98ef20959359e79119ac75c8179a68c9",
+    "content-hash": "e2d3458aabcffb6abc3662910d498632",
     "packages": [
         {
             "name": "composer/semver",
-            "version": "1.2.0",
+            "version": "1.4.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/composer/semver.git";,
-                "reference": "0faeb6e433f6b352f0dc55ec1faf5c6b605a35d3"
+                "reference": "84c47f3d8901440403217afc120683c7385aecb8"
             },
             "dist": {
                 "type": "zip",
-                "url": 
"https://api.github.com/repos/composer/semver/zipball/0faeb6e433f6b352f0dc55ec1faf5c6b605a35d3";,
-                "reference": "0faeb6e433f6b352f0dc55ec1faf5c6b605a35d3",
+                "url": 
"https://api.github.com/repos/composer/semver/zipball/84c47f3d8901440403217afc120683c7385aecb8";,
+                "reference": "84c47f3d8901440403217afc120683c7385aecb8",
                 "shasum": ""
             },
             "require": {
@@ -67,7 +67,7 @@
                 "validation",
                 "versioning"
             ],
-            "time": "2015-11-10 11:17:42"
+            "time": "2016-03-30 13:16:03"
         },
         {
             "name": "cssjanus/cssjanus",
diff --git a/composer/installed.json b/composer/installed.json
index fd99e9f..2f3e1a8 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -1,69 +1,5 @@
 [
     {
-        "name": "composer/semver",
-        "version": "1.2.0",
-        "version_normalized": "1.2.0.0",
-        "source": {
-            "type": "git",
-            "url": "https://github.com/composer/semver.git";,
-            "reference": "0faeb6e433f6b352f0dc55ec1faf5c6b605a35d3"
-        },
-        "dist": {
-            "type": "zip",
-            "url": 
"https://api.github.com/repos/composer/semver/zipball/0faeb6e433f6b352f0dc55ec1faf5c6b605a35d3";,
-            "reference": "0faeb6e433f6b352f0dc55ec1faf5c6b605a35d3",
-            "shasum": ""
-        },
-        "require": {
-            "php": "^5.3.2 || ^7.0"
-        },
-        "require-dev": {
-            "phpunit/phpunit": "^4.5 || ^5.0.5",
-            "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0"
-        },
-        "time": "2015-11-10 11:17:42",
-        "type": "library",
-        "extra": {
-            "branch-alias": {
-                "dev-master": "1.x-dev"
-            }
-        },
-        "installation-source": "dist",
-        "autoload": {
-            "psr-4": {
-                "Composer\\Semver\\": "src"
-            }
-        },
-        "notification-url": "https://packagist.org/downloads/";,
-        "license": [
-            "MIT"
-        ],
-        "authors": [
-            {
-                "name": "Nils Adermann",
-                "email": "nader...@naderman.de",
-                "homepage": "http://www.naderman.de";
-            },
-            {
-                "name": "Jordi Boggiano",
-                "email": "j.boggi...@seld.be",
-                "homepage": "http://seld.be";
-            },
-            {
-                "name": "Rob Bast",
-                "email": "rob.b...@gmail.com",
-                "homepage": "http://robbast.nl";
-            }
-        ],
-        "description": "Semver library that offers utilities, version 
constraint parsing and validation.",
-        "keywords": [
-            "semantic",
-            "semver",
-            "validation",
-            "versioning"
-        ]
-    },
-    {
         "name": "cssjanus/cssjanus",
         "version": "v1.1.2",
         "version_normalized": "1.1.2.0",
@@ -1763,5 +1699,69 @@
             "client",
             "search"
         ]
+    },
+    {
+        "name": "composer/semver",
+        "version": "1.4.0",
+        "version_normalized": "1.4.0.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/composer/semver.git";,
+            "reference": "84c47f3d8901440403217afc120683c7385aecb8"
+        },
+        "dist": {
+            "type": "zip",
+            "url": 
"https://api.github.com/repos/composer/semver/zipball/84c47f3d8901440403217afc120683c7385aecb8";,
+            "reference": "84c47f3d8901440403217afc120683c7385aecb8",
+            "shasum": ""
+        },
+        "require": {
+            "php": "^5.3.2 || ^7.0"
+        },
+        "require-dev": {
+            "phpunit/phpunit": "^4.5 || ^5.0.5",
+            "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0"
+        },
+        "time": "2016-03-30 13:16:03",
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "1.x-dev"
+            }
+        },
+        "installation-source": "dist",
+        "autoload": {
+            "psr-4": {
+                "Composer\\Semver\\": "src"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/";,
+        "license": [
+            "MIT"
+        ],
+        "authors": [
+            {
+                "name": "Nils Adermann",
+                "email": "nader...@naderman.de",
+                "homepage": "http://www.naderman.de";
+            },
+            {
+                "name": "Jordi Boggiano",
+                "email": "j.boggi...@seld.be",
+                "homepage": "http://seld.be";
+            },
+            {
+                "name": "Rob Bast",
+                "email": "rob.b...@gmail.com",
+                "homepage": "http://robbast.nl";
+            }
+        ],
+        "description": "Semver library that offers utilities, version 
constraint parsing and validation.",
+        "keywords": [
+            "semantic",
+            "semver",
+            "validation",
+            "versioning"
+        ]
     }
 ]
diff --git a/composer/semver/CHANGELOG.md b/composer/semver/CHANGELOG.md
index dd0ab51..a1d29d2 100644
--- a/composer/semver/CHANGELOG.md
+++ b/composer/semver/CHANGELOG.md
@@ -3,6 +3,15 @@
 All notable changes to this project will be documented in this file.
 This project adheres to [Semantic Versioning](http://semver.org/).
 
+### [1.4.0] 2016-03-30
+
+  * Added: getters on MultiConstraint - 
[composer/semver#35](https://github.com/composer/semver/pull/35).
+
+### [1.3.0] 2016-02-25
+
+  * Fixed: stability parsing - 
[composer/composer#1234](https://github.com/composer/composer/issues/4889).
+  * Changed: collapse contiguous constraints when possible.
+
 ### [1.2.0] 2015-11-10
 
   * Changed: allow multiple numerical identifiers in 'pre-release' version 
part.
@@ -40,6 +49,8 @@
     - Namespace: `Composer\Test\Package\LinkConstraint` -> 
`Composer\Test\Semver\Constraint`
   * Changed: code style using php-cs-fixer.
 
+[1.4.0]: https://github.com/composer/semver/compare/1.3.0...1.4.0
+[1.3.0]: https://github.com/composer/semver/compare/1.2.0...1.3.0
 [1.2.0]: https://github.com/composer/semver/compare/1.1.0...1.2.0
 [1.1.0]: https://github.com/composer/semver/compare/1.0.0...1.1.0
 [1.0.0]: https://github.com/composer/semver/compare/0.1.0...1.0.0
diff --git a/composer/semver/src/Constraint/MultiConstraint.php 
b/composer/semver/src/Constraint/MultiConstraint.php
index 0d769b7..0c547af 100644
--- a/composer/semver/src/Constraint/MultiConstraint.php
+++ b/composer/semver/src/Constraint/MultiConstraint.php
@@ -36,6 +36,30 @@
     }
 
     /**
+     * @return ConstraintInterface[]
+     */
+    public function getConstraints()
+    {
+        return $this->constraints;
+    }
+
+    /**
+     * @return bool
+     */
+    public function isConjunctive()
+    {
+        return $this->conjunctive;
+    }
+
+    /**
+     * @return bool
+     */
+    public function isDisjunctive()
+    {
+        return !$this->conjunctive;
+    }
+
+    /**
      * @param ConstraintInterface $provider
      *
      * @return bool
diff --git a/composer/semver/src/VersionParser.php 
b/composer/semver/src/VersionParser.php
index d932f94..e6408ba 100644
--- a/composer/semver/src/VersionParser.php
+++ b/composer/semver/src/VersionParser.php
@@ -56,7 +56,7 @@
             return 'dev';
         }
 
-        preg_match('{' . self::$modifierRegex . '$}i', strtolower($version), 
$match);
+        preg_match('{' . self::$modifierRegex . '(?:\+.*)?$}i', 
strtolower($version), $match);
         if (!empty($match[3])) {
             return 'dev';
         }
@@ -259,6 +259,21 @@
 
         if (1 === count($orGroups)) {
             $constraint = $orGroups[0];
+        } elseif (2 === count($orGroups)
+            // parse the two OR groups and if they are contiguous we collapse
+            // them into one constraint
+            && $orGroups[0] instanceof MultiConstraint
+            && $orGroups[1] instanceof MultiConstraint
+            && ($a = (string) $orGroups[0])
+            && substr($a, 0, 3) === '[>=' && (false !== ($posA = strpos($a, 
'<', 4)))
+            && ($b = (string) $orGroups[1])
+            && substr($b, 0, 3) === '[>=' && (false !== ($posB = strpos($b, 
'<', 4)))
+            && substr($a, $posA + 2, -1) === substr($b, 4, $posB - 5)
+        ) {
+            $constraint = new MultiConstraint(array(
+                new Constraint('>=', substr($a, 4, $posA - 5)),
+                new Constraint('<', substr($b, $posB + 2, -1)),
+            ));
         } else {
             $constraint = new MultiConstraint($orGroups, false);
         }

-- 
To view, visit https://gerrit.wikimedia.org/r/277345
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4463dd4abe1972f4e3a4bcc6389dc861ecc8201a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vendor
Gerrit-Branch: master
Gerrit-Owner: Reedy <re...@wikimedia.org>
Gerrit-Reviewer: BryanDavis <bda...@wikimedia.org>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to