use Composer\Repository\InstalledRepositoryInterface;
@ -32,11 +33,17 @@ class AutoloadGenerator
*/
private $eventDispatcher;
/**
* @var IOInterface
*/
private $io;
private $devMode = false;
public function __construct(EventDispatcher $eventDispatcher)
public function __construct(EventDispatcher $eventDispatcher, IOInterface $io=null)
{
$this->eventDispatcher = $eventDispatcher;
$this->io = $io;
}
public function setDevMode($devMode = true)
@ -197,6 +204,12 @@ EOF;
}
}
if ($this->io && count(ClassMapGenerator::$ambiguousReferences) > 0) {
foreach (ClassMapGenerator::$ambiguousReferences as $ambiguousReference) {
$this->io->write('<info>Warning: Ambiguous class "'.$ambiguousReference['class'].'" resolution; defined in "'.$ambiguousReference[0].'" and in "'.$ambiguousReference[1].'" files.</info>');