mirror of
https://github.com/composer/composer
synced 2025-05-10 17:12:51 +00:00
PoolBuilder: make io non-nullable, NullIO can be used instead
This commit is contained in:
parent
71c3c63b54
commit
c270d3cfa6
5 changed files with 29 additions and 29 deletions
|
@ -17,6 +17,7 @@ use Composer\DependencyResolver\PoolBuilder;
|
|||
use Composer\DependencyResolver\Request;
|
||||
use Composer\EventDispatcher\EventDispatcher;
|
||||
use Composer\IO\IOInterface;
|
||||
use Composer\IO\NullIO;
|
||||
use Composer\Package\BasePackage;
|
||||
use Composer\Package\Version\VersionParser;
|
||||
use Composer\Repository\CompositeRepository;
|
||||
|
@ -186,9 +187,9 @@ class RepositorySet
|
|||
*
|
||||
* @return Pool
|
||||
*/
|
||||
public function createPool(Request $request, EventDispatcher $eventDispatcher = null, IOInterface $io = null)
|
||||
public function createPool(Request $request, IOInterface $io, EventDispatcher $eventDispatcher = null)
|
||||
{
|
||||
$poolBuilder = new PoolBuilder($this->acceptableStabilities, $this->stabilityFlags, $this->rootAliases, $this->rootReferences, $eventDispatcher, $io);
|
||||
$poolBuilder = new PoolBuilder($this->acceptableStabilities, $this->stabilityFlags, $this->rootAliases, $this->rootReferences, $io, $eventDispatcher);
|
||||
|
||||
foreach ($this->repositories as $repo) {
|
||||
if (($repo instanceof InstalledRepositoryInterface || $repo instanceof InstalledRepository) && !$this->allowInstalledRepositories) {
|
||||
|
@ -237,6 +238,6 @@ class RepositorySet
|
|||
$request->requireName($packageName);
|
||||
}
|
||||
|
||||
return $this->createPool($request);
|
||||
return $this->createPool($request, new NullIO());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue