|
@@ -23,6 +23,7 @@ use Composer\Repository\PlatformRepository;
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
use Symfony\Component\Console\Input\InputOption;
|
|
use Symfony\Component\Console\Input\InputOption;
|
|
use Symfony\Component\Console\Output\OutputInterface;
|
|
use Symfony\Component\Console\Output\OutputInterface;
|
|
|
|
+use Composer\DependencyResolver\Operation\ReplaceOperation;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @author Jordi Boggiano <j.boggiano@seld.be>
|
|
* @author Jordi Boggiano <j.boggiano@seld.be>
|
|
@@ -132,7 +133,10 @@ EOT
|
|
// TODO this belongs in the solver, but this will do for now to report top-level deps missing at least
|
|
// TODO this belongs in the solver, but this will do for now to report top-level deps missing at least
|
|
foreach ($request->getJobs() as $job) {
|
|
foreach ($request->getJobs() as $job) {
|
|
if ('install' === $job['cmd']) {
|
|
if ('install' === $job['cmd']) {
|
|
- foreach ($installedRepo->getPackages() as $package) {
|
|
|
|
|
|
+ foreach ($installedRepo->getPackages() as $package ) {
|
|
|
|
+ if ($installedRepo->hasPackage($package) && !$package->isPlatform() && !$installationManager->isPackageInstalled($package)) {
|
|
|
|
+ $operations[$job['packageName']] = new ReplaceOperation($package, \Composer\DependencyResolver\Solver::RULE_PACKAGE_NOT_EXIST);
|
|
|
|
+ }
|
|
if (in_array($job['packageName'], $package->getNames())) {
|
|
if (in_array($job['packageName'], $package->getNames())) {
|
|
continue 2;
|
|
continue 2;
|
|
}
|
|
}
|