@ -34,7 +34,7 @@ use Composer\Json\JsonFile;
use Composer\Package\AliasPackage;
use Composer\Package\AliasPackage;
use Composer\Package\CompletePackage;
use Composer\Package\CompletePackage;
use Composer\Package\Link;
use Composer\Package\Link;
use Composer\Package\LinkConstraint\Version Constraint;
use Composer\Semver\Constraint\ Constraint;
use Composer\Package\Locker;
use Composer\Package\Locker;
use Composer\Package\PackageInterface;
use Composer\Package\PackageInterface;
use Composer\Package\RootPackageInterface;
use Composer\Package\RootPackageInterface;
@ -428,7 +428,7 @@ class Installer
& & $this->installationManager->isPackageInstalled($localRepo, $package)
& & $this->installationManager->isPackageInstalled($localRepo, $package)
) {
) {
$removedUnstablePackages[$package->getName()] = true;
$removedUnstablePackages[$package->getName()] = true;
$request->remove($package->getName(), new Version Constraint('=', $package->getVersion()));
$request->remove($package->getName(), new Constraint('=', $package->getVersion()));
}
}
}
}
}
}
@ -467,7 +467,7 @@ class Installer
foreach ($currentPackages as $curPackage) {
foreach ($currentPackages as $curPackage) {
if ($curPackage->getName() === $candidate) {
if ($curPackage->getName() === $candidate) {
if (!$this->isUpdateable($curPackage) & & !isset($removedUnstablePackages[$curPackage->getName()])) {
if (!$this->isUpdateable($curPackage) & & !isset($removedUnstablePackages[$curPackage->getName()])) {
$constraint = new Version Constraint('=', $curPackage->getVersion());
$constraint = new Constraint('=', $curPackage->getVersion());
$request->install($curPackage->getName(), $constraint);
$request->install($curPackage->getName(), $constraint);
}
}
break;
break;
@ -487,7 +487,7 @@ class Installer
if (isset($aliases[$package->getName()][$version])) {
if (isset($aliases[$package->getName()][$version])) {
$version = $aliases[$package->getName()][$version]['alias_normalized'];
$version = $aliases[$package->getName()][$version]['alias_normalized'];
}
}
$constraint = new Version Constraint('=', $version);
$constraint = new Constraint('=', $version);
$constraint->setPrettyString($package->getPrettyVersion());
$constraint->setPrettyString($package->getPrettyVersion());
$request->install($package->getName(), $constraint);
$request->install($package->getName(), $constraint);
}
}
@ -712,7 +712,7 @@ class Installer
$requires = array();
$requires = array();
foreach ($lockedRepository->getPackages() as $package) {
foreach ($lockedRepository->getPackages() as $package) {
$constraint = new Version Constraint('=', $package->getVersion());
$constraint = new Constraint('=', $package->getVersion());
$constraint->setPrettyString($package->getPrettyVersion());
$constraint->setPrettyString($package->getPrettyVersion());
$requires[$package->getName()] = $constraint;
$requires[$package->getName()] = $constraint;
}
}
@ -774,7 +774,7 @@ class Installer
{
{
$request = new Request();
$request = new Request();
$constraint = new Version Constraint('=', $rootPackage->getVersion());
$constraint = new Constraint('=', $rootPackage->getVersion());
$constraint->setPrettyString($rootPackage->getPrettyVersion());
$constraint->setPrettyString($rootPackage->getPrettyVersion());
$request->install($rootPackage->getName(), $constraint);
$request->install($rootPackage->getName(), $constraint);
@ -788,7 +788,7 @@ class Installer
// to prevent the solver trying to remove or update those
// to prevent the solver trying to remove or update those
$provided = $rootPackage->getProvides();
$provided = $rootPackage->getProvides();
foreach ($fixedPackages as $package) {
foreach ($fixedPackages as $package) {
$constraint = new Version Constraint('=', $package->getVersion());
$constraint = new Constraint('=', $package->getVersion());
$constraint->setPrettyString($package->getPrettyVersion());
$constraint->setPrettyString($package->getPrettyVersion());
// skip platform packages that are provided by the root package
// skip platform packages that are provided by the root package
@ -893,7 +893,7 @@ class Installer
}
}
// find similar packages (name/version) in all repositories
// find similar packages (name/version) in all repositories
$matches = $pool->whatProvides($package->getName(), new Version Constraint('=', $package->getVersion()));
$matches = $pool->whatProvides($package->getName(), new Constraint('=', $package->getVersion()));
foreach ($matches as $index => $match) {
foreach ($matches as $index => $match) {
// skip local packages
// skip local packages
if (!in_array($match->getRepository(), $repositories, true)) {
if (!in_array($match->getRepository(), $repositories, true)) {
@ -1003,7 +1003,7 @@ class Installer
foreach ($localRepo->getCanonicalPackages() as $package) {
foreach ($localRepo->getCanonicalPackages() as $package) {
// find similar packages (name/version) in all repositories
// find similar packages (name/version) in all repositories
$matches = $pool->whatProvides($package->getName(), new Version Constraint('=', $package->getVersion()));
$matches = $pool->whatProvides($package->getName(), new Constraint('=', $package->getVersion()));
foreach ($matches as $index => $match) {
foreach ($matches as $index => $match) {
// skip local packages
// skip local packages
if (!in_array($match->getRepository(), $repositories, true)) {
if (!in_array($match->getRepository(), $repositories, true)) {