Explorar o código

Handle the = comparison operator for versions the same as ==

Nils Adermann %!s(int64=14) %!d(string=hai) anos
pai
achega
03642a40b4
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/Composer/Package/LinkConstraint/VersionConstraint.php

+ 4 - 0
src/Composer/Package/LinkConstraint/VersionConstraint.php

@@ -32,6 +32,10 @@ class VersionConstraint extends SpecificConstraint
      */
     public function __construct($operator, $version)
     {
+        if ('=' === $operator) {
+            $operator = '==';
+        }
+
         // TODO add third parameter releaseType and match that too
         // TODO add fourth parameter devSnapshot and match that too
         $this->operator = $operator;