Skip to content

Commit

Permalink
Add missing path argument to the various tasks.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Aug 26, 2013
1 parent 36ff2f6 commit b1638a7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/Cake/Console/Command/UpgradeShell.php
Expand Up @@ -74,7 +74,7 @@ public function all() {
* @return void
*/
public function locations() {
$this->_getPath();
$path = $this->_getPath();

$moves = array(
'Test' . DS . 'Case' => 'Test' . DS . 'TestCase'
Expand Down Expand Up @@ -278,7 +278,7 @@ protected function _mapClassName($matches) {
* @return void
*/
public function namespaces() {
$path = isset($this->args[0]) ? $this->args[0] : APP;
$path = $this->_getPath();
$ns = $this->params['namespace'];

if ($ns === 'App' && isset($this->params['plugin'])) {
Expand Down Expand Up @@ -613,23 +613,23 @@ public function getOptionParser() {
"Be sure to have a backup of your application before running these commands."))
->addSubcommand('all', [
'help' => __d('cake_console', 'Run all upgrade commands.'),
'parser' => ['options' => compact('plugin', 'dryRun')]
'parser' => ['options' => compact('plugin', 'dryRun'), 'arguments' => compact('path')]
])
->addSubcommand('locations', [
'help' => __d('cake_console', 'Move files/directories around. Run this *before* adding namespaces with the namespaces command.'),
'parser' => ['options' => compact('plugin', 'dryRun', 'git'), 'arguments' => compact('path')]
])
->addSubcommand('namespaces', [
'help' => __d('cake_console', 'Add namespaces to files based on their file path. Only run this *after* you have moved files with locations.'),
'parser' => ['options' => compact('plugin', 'dryRun', 'namespace', 'exclude')]
'parser' => ['options' => compact('plugin', 'dryRun', 'namespace', 'exclude'), 'arguments' => compact('path')]
])
->addSubcommand('app_uses', [
'help' => __d('cake_console', 'Replace App::uses() with use statements'),
'parser' => ['options' => compact('plugin', 'dryRun')]
'parser' => ['options' => compact('plugin', 'dryRun'), 'arguments' => compact('path')]
])
->addSubcommand('rename_classes', [
'help' => __d('cake_console', 'Rename classes that have been moved/renamed. Run after replacing App::uses().'),
'parser' => ['options' => compact('plugin', 'dryRun', 'exclude')]
'parser' => ['options' => compact('plugin', 'dryRun'), 'arguments' => compact('path')]
])
->addSubcommand('fixtures', [
'help' => __d('cake_console', 'Update fixtures to use new index/constraint features. This is necessary before running tests.'),
Expand Down

0 comments on commit b1638a7

Please sign in to comment.