Print number of classes contained within the generated classmap
to give the developer a better feeling about number of dependent classespull/7590/head
parent
81516098e5
commit
766ceccd00
|
@ -312,6 +312,8 @@ EOF;
|
||||||
'optimize' => (bool) $scanPsr0Packages,
|
'optimize' => (bool) $scanPsr0Packages,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return count($classMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function addClassMapCode($filesystem, $basePath, $vendorPath, $dir, $blacklist = null, $namespaceFilter = null, array $classMap = array())
|
private function addClassMapCode($filesystem, $basePath, $vendorPath, $dir, $blacklist = null, $namespaceFilter = null, array $classMap = array())
|
||||||
|
|
|
@ -61,11 +61,11 @@ EOT
|
||||||
$apcu = $input->getOption('apcu') || $config->get('apcu-autoloader');
|
$apcu = $input->getOption('apcu') || $config->get('apcu-autoloader');
|
||||||
|
|
||||||
if ($authoritative) {
|
if ($authoritative) {
|
||||||
$this->getIO()->writeError('<info>Generating optimized autoload files (authoritative)</info>');
|
$this->getIO()->writeError('<info>Generating optimized autoload files (authoritative)</info>', false);
|
||||||
} elseif ($optimize) {
|
} elseif ($optimize) {
|
||||||
$this->getIO()->writeError('<info>Generating optimized autoload files</info>');
|
$this->getIO()->writeError('<info>Generating optimized autoload files</info>', false);
|
||||||
} else {
|
} else {
|
||||||
$this->getIO()->writeError('<info>Generating autoload files</info>');
|
$this->getIO()->writeError('<info>Generating autoload files</info>', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
$generator = $composer->getAutoloadGenerator();
|
$generator = $composer->getAutoloadGenerator();
|
||||||
|
@ -73,6 +73,14 @@ EOT
|
||||||
$generator->setClassMapAuthoritative($authoritative);
|
$generator->setClassMapAuthoritative($authoritative);
|
||||||
$generator->setApcu($apcu);
|
$generator->setApcu($apcu);
|
||||||
$generator->setRunScripts(!$input->getOption('no-scripts'));
|
$generator->setRunScripts(!$input->getOption('no-scripts'));
|
||||||
$generator->dump($config, $localRepo, $package, $installationManager, 'composer', $optimize);
|
$numberOfClasses = $generator->dump($config, $localRepo, $package, $installationManager, 'composer', $optimize);
|
||||||
|
|
||||||
|
if ($authoritative) {
|
||||||
|
$this->getIO()->overwriteError('<info>Generating optimized autoload files (authoritative) containing '. $numberOfClasses .' classes</info>');
|
||||||
|
} elseif ($optimize) {
|
||||||
|
$this->getIO()->overwriteError('<info>Generating optimized autoload files containing '. $numberOfClasses .' classes</info>');
|
||||||
|
} else {
|
||||||
|
$this->getIO()->overwriteError('<info>Generating autoload files containing '. $numberOfClasses .' classes</info>');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue