if (!$link->getConstraint()->matches(new VersionConstraint('=', $package->getVersion()))) {
// Solver was not handling this well so we will
// handle it here where we can do something
// nice in the way of output.
throw new \UnexpectedValueException('Package '.$package->getName().' can not be updated because its version constraint ('.$link->getPrettyConstraint().') is not compatible with previously installed version ('.$package->getPrettyVersion().')');
}
// This package is installed internally, no need to
// install it again.
continue;
}
foreach ($installedPackages as $package) {
if ($package->getName() === $link->getTarget()) {
$request->update($package->getName(), new VersionConstraint('=', $package->getVersion()));
if (!$link->getConstraint()->matches(new VersionConstraint('=', $package->getVersion()))) {
// Solver was not handling this well so we will
// handle it here where we can do something
// nice in the way of output.
throw new \UnexpectedValueException('Package '.$package->getName().' can not be installed because its version constraint ('.$link->getPrettyConstraint().') is not compatible with previously installed version ('.$package->getPrettyVersion().')');
}
// This package is installed internally, no need to