mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
add a command to run all options
This commit is contained in:
parent
14f78f857d
commit
a0506536e7
1 changed files with 16 additions and 0 deletions
|
@ -20,6 +20,18 @@ class UpgradeShell extends Shell {
|
|||
$this->out('<warning>Dry-run mode enabled!</warning>', 1, Shell::QUIET);
|
||||
}
|
||||
}
|
||||
|
||||
function all() {
|
||||
foreach($this->OptionParser->subcommands() as $command) {
|
||||
$name = $command->name();
|
||||
if ($name === 'all') {
|
||||
continue;
|
||||
}
|
||||
$this->out('Running ' . $name);
|
||||
$this->$name();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update helpers.
|
||||
*
|
||||
|
@ -317,6 +329,10 @@ class UpgradeShell extends Shell {
|
|||
return parent::getOptionParser()
|
||||
->description("A shell to help automate upgrading from CakePHP 1.3 to 2.0. \n" .
|
||||
"Be sure to have a backup of your application before running these commands.")
|
||||
->addSubcommand('all', array(
|
||||
'help' => 'Run all upgrade commands.',
|
||||
'parser' => $subcommandParser
|
||||
))
|
||||
->addSubcommand('i18n', array(
|
||||
'help' => 'Update the i18n translation method calls.',
|
||||
'parser' => $subcommandParser
|
||||
|
|
Loading…
Reference in a new issue