1
0
Fork 0

Fix version check in BasePackage

pull/1/head
Jordi Boggiano 2011-05-22 09:07:35 +02:00
parent a67a1637e1
commit 27f02aba7d
1 changed files with 2 additions and 1 deletions

View File

@ -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) {