1
0
Fork 0

Merge pull request #8200 from nicolas-grekas/solver-clear

Free $solver asap
pull/8197/head
Nils Adermann 2019-06-23 11:57:58 +02:00 committed by GitHub
commit abbbe78ac9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -473,6 +473,8 @@ class Installer
$solver = new Solver($policy, $pool, $installedRepo, $this->io); $solver = new Solver($policy, $pool, $installedRepo, $this->io);
try { try {
$operations = $solver->solve($request, $this->ignorePlatformReqs); $operations = $solver->solve($request, $this->ignorePlatformReqs);
$ruleSetSize = $solver->getRuleSetSize();
$solver = null;
} catch (SolverProblemsException $e) { } catch (SolverProblemsException $e) {
$this->io->writeError('<error>Your requirements could not be resolved to an installable set of packages.</error>', true, IOInterface::QUIET); $this->io->writeError('<error>Your requirements could not be resolved to an installable set of packages.</error>', true, IOInterface::QUIET);
$this->io->writeError($e->getMessage()); $this->io->writeError($e->getMessage());
@ -489,7 +491,7 @@ class Installer
$this->eventDispatcher->dispatchInstallerEvent(InstallerEvents::POST_DEPENDENCIES_SOLVING, $this->devMode, $policy, $pool, $installedRepo, $request, $operations); $this->eventDispatcher->dispatchInstallerEvent(InstallerEvents::POST_DEPENDENCIES_SOLVING, $this->devMode, $policy, $pool, $installedRepo, $request, $operations);
$this->io->writeError("Analyzed ".count($pool)." packages to resolve dependencies", true, IOInterface::VERBOSE); $this->io->writeError("Analyzed ".count($pool)." packages to resolve dependencies", true, IOInterface::VERBOSE);
$this->io->writeError("Analyzed ".$solver->getRuleSetSize()." rules to resolve dependencies", true, IOInterface::VERBOSE); $this->io->writeError("Analyzed ".$ruleSetSize." rules to resolve dependencies", true, IOInterface::VERBOSE);
// execute operations // execute operations
if (!$operations) { if (!$operations) {