Output the size of the pool after dependency resolution for users

main
Nils Adermann 9 years ago
parent 22737e31a7
commit 07e1d227c9

@ -31,7 +31,7 @@ use Composer\Package\PackageInterface;
* @author Nils Adermann <naderman@naderman.de> * @author Nils Adermann <naderman@naderman.de>
* @author Jordi Boggiano <j.boggiano@seld.be> * @author Jordi Boggiano <j.boggiano@seld.be>
*/ */
class Pool class Pool implements \Countable
{ {
const MATCH_NAME = -1; const MATCH_NAME = -1;
const MATCH_NONE = 0; const MATCH_NONE = 0;
@ -160,6 +160,14 @@ class Pool
return $this->packages[$id - 1]; return $this->packages[$id - 1];
} }
/**
* Returns how many packages have been loaded into the pool
*/
public function count()
{
return count($this->packages);
}
/** /**
* Searches all packages providing the given package name and match the constraint * Searches all packages providing the given package name and match the constraint
* *

@ -511,6 +511,10 @@ class Installer
return max(1, $e->getCode()); return max(1, $e->getCode());
} }
if ($this->io->isVerbose()) {
$this->io->writeError("Analyzed ".count($pool)." packages to resolve dependencies");
}
// force dev packages to be updated if we update or install from a (potentially new) lock // force dev packages to be updated if we update or install from a (potentially new) lock
$operations = $this->processDevPackages($localRepo, $pool, $policy, $repositories, $installedRepo, $lockedRepository, $installFromLock, $withDevReqs, 'force-updates', $operations); $operations = $this->processDevPackages($localRepo, $pool, $policy, $repositories, $installedRepo, $lockedRepository, $installFromLock, $withDevReqs, 'force-updates', $operations);

Loading…
Cancel
Save