mirror of
https://github.com/composer/composer
synced 2025-05-11 09:32:55 +00:00
Merge remote-tracking branch 'cw-ozaki/no-script-dump-autoload'
Conflicts: src/Composer/Autoload/AutoloadGenerator.php src/Composer/Command/DumpAutoloadCommand.php
This commit is contained in:
commit
c0b49d09f3
3 changed files with 28 additions and 6 deletions
|
@ -30,6 +30,7 @@ class DumpAutoloadCommand extends Command
|
|||
->setAliases(array('dumpautoload'))
|
||||
->setDescription('Dumps the autoloader')
|
||||
->setDefinition(array(
|
||||
new InputOption('no-scripts', null, InputOption::VALUE_NONE, 'Skips the execution of all scripts defined in composer.json file.'),
|
||||
new InputOption('optimize', 'o', InputOption::VALUE_NONE, 'Optimizes PSR0 and PSR4 packages to be loaded with classmaps too, good for production.'),
|
||||
new InputOption('classmap-authoritative', 'a', InputOption::VALUE_NONE, 'Autoload classes from the classmap only. Implicitly enables `--optimize`.'),
|
||||
new InputOption('no-dev', null, InputOption::VALUE_NONE, 'Disables autoload-dev rules.'),
|
||||
|
@ -65,6 +66,7 @@ EOT
|
|||
$generator = $composer->getAutoloadGenerator();
|
||||
$generator->setDevMode(!$input->getOption('no-dev'));
|
||||
$generator->setClassMapAuthoritative($authoritative);
|
||||
$generator->setRunScripts(!$input->getOption('no-scripts'));
|
||||
$generator->dump($config, $localRepo, $package, $installationManager, 'composer', $optimize);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue