Pārlūkot izejas kodu

Fix version check in BasePackage

Jordi Boggiano 14 gadi atpakaļ
vecāks
revīzija
27f02aba7d
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      src/Composer/Package/BasePackage.php

+ 2 - 1
src/Composer/Package/BasePackage.php

@@ -13,6 +13,7 @@
 namespace Composer\Package;
 namespace Composer\Package;
 
 
 use Composer\Package\LinkConstraint\LinkConstraintInterface;
 use Composer\Package\LinkConstraint\LinkConstraintInterface;
+use Composer\Package\LinkConstraint\VersionConstraint;
 use Composer\Repository\RepositoryInterface;
 use Composer\Repository\RepositoryInterface;
 
 
 /**
 /**
@@ -81,7 +82,7 @@ abstract class BasePackage implements PackageInterface
     public function matches($name, LinkConstraintInterface $constraint)
     public function matches($name, LinkConstraintInterface $constraint)
     {
     {
         if ($this->name === $name) {
         if ($this->name === $name) {
-            return $constraint->matches($this->getReleaseType(), $this->getVersion());
+            return $constraint->matches(new VersionConstraint('=', $this->getVersion(), $this->getReleaseType()));
         }
         }
 
 
         foreach ($this->getProvides() as $link) {
         foreach ($this->getProvides() as $link) {