Merge pull request #7590 from staabm/dump-nbclasses
Print number of classes contained within the generated classmappull/7623/head
commit
987bd5dd7c
|
@ -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>Generated optimized autoload files (authoritative) containing '. $numberOfClasses .' classes</info>');
|
||||||
|
} elseif ($optimize) {
|
||||||
|
$this->getIO()->overwriteError('<info>Generated optimized autoload files containing '. $numberOfClasses .' classes</info>');
|
||||||
|
} else {
|
||||||
|
$this->getIO()->overwriteError('<info>Generated autoload files containing '. $numberOfClasses .' classes</info>');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue