From 27f02aba7dd78fe19af0c811884f356d1e11b56a Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 22 May 2011 09:07:35 +0200 Subject: [PATCH] Fix version check in BasePackage --- src/Composer/Package/BasePackage.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Composer/Package/BasePackage.php b/src/Composer/Package/BasePackage.php index 2e8b2ca3b..7ffea71e5 100644 --- a/src/Composer/Package/BasePackage.php +++ b/src/Composer/Package/BasePackage.php @@ -13,6 +13,7 @@ namespace Composer\Package; use Composer\Package\LinkConstraint\LinkConstraintInterface; +use Composer\Package\LinkConstraint\VersionConstraint; use Composer\Repository\RepositoryInterface; /** @@ -81,7 +82,7 @@ abstract class BasePackage implements PackageInterface public function matches($name, LinkConstraintInterface $constraint) { 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) {