Пример #1
0
 /**
  * ConvertShell::startup()
  *
  * @return void
  */
 public function startup()
 {
     $this->params['git'] = null;
     $this->params['tgit'] = null;
     $this->params['svn'] = null;
     parent::startup();
 }
Пример #2
0
 /**
  * Get the option parser
  *
  * @return ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $subcommandParser = array('options' => array('plugin' => array('short' => 'p', 'help' => 'The plugin to update. Only the specified plugin will be updated.', 'default' => ''), 'custom' => array('short' => 'c', 'help' => 'Custom path to update recursivly.', 'default' => ''), 'ext' => array('short' => 'e', 'help' => 'The extension(s) to search. A pipe delimited list, or a preg_match compatible subpattern', 'default' => 'php|ctp|thtml|inc|tpl'), 'git' => array('short' => 'g', 'help' => 'Use git command for moving files around.', 'boolean' => true), 'tgit' => array('short' => 't', 'help' => 'Use tortoise git command for moving files around.', 'boolean' => true), 'svn' => array('short' => 's', 'help' => 'Use svn command for moving files around.', 'boolean' => true), 'dry-run' => array('short' => 'd', 'help' => 'Dry run the update, no files will actually be modified.', 'boolean' => true), 'log' => array('short' => 'l', 'help' => 'Log all ouput to file log.txt in TMP dir', 'boolean' => true), 'interactive' => array('short' => 'i', 'help' => 'Run it interactively and ask before each each command', 'boolean' => true)));
     return parent::getOptionParser()->addSubcommand('search', array('help' => 'search plugin corrections', 'parser' => $subcommandParser))->addSubcommand('except', array('help' => 'all except locations and defined commands', 'parser' => $subcommandParser))->addSubcommand('custom', array('help' => 'custom', 'parser' => $subcommandParser))->addSubcommand('controllers2', array('help' => 'more controller stuff', 'parser' => $subcommandParser))->addSubcommand('auth', array('help' => 'auth', 'parser' => $subcommandParser))->addSubcommand('packages', array('help' => 'lib packages', 'parser' => $subcommandParser))->addSubcommand('session', array('help' => 'make sesssion static', 'parser' => $subcommandParser))->addSubcommand('template', array('help' => 'adjust baked templates', 'parser' => $subcommandParser))->addSubcommand('view', array('help' => 'adjust view stuff', 'parser' => $subcommandParser))->addSubcommand('helpers', array('help' => 'adjust helpers stuff', 'parser' => $subcommandParser))->addSubcommand('tests2', array('help' => 'fix test methods', 'parser' => $subcommandParser))->addSubcommand('flash', array('help' => 'flash messages', 'parser' => $subcommandParser))->addSubcommand('domains', array('help' => '__() domains', 'parser' => $subcommandParser))->addSubcommand('classes', array('help' => 'class names', 'parser' => $subcommandParser))->addSubcommand('doc_blocks', array('help' => 'update/correct doc blocks', 'parser' => $subcommandParser))->addSubcommand('tools_data', array('help' => 'Tools plugin to Data plugin stuff', 'parser' => $subcommandParser))->addSubcommand('datetime', array('help' => 'niceDate() to localDate()', 'parser' => $subcommandParser))->addSubcommand('shim', array('help' => 'Upgrade to Shim plugin now.', 'parser' => $subcommandParser))->addSubcommand('cake3', array('help' => 'Upgrade to Cake3 now - last command of the 2.x shell', 'parser' => $subcommandParser));
 }
 /**
  * CorrectShell::getOptionParser()
  *
  * @return ConsoleOptionParser
  */
 public function getOptionParser()
 {
     $subcommandParser = array('options' => array('plugin' => array('short' => 'p', 'help' => 'The plugin to update. Only the specified plugin will be updated.', 'default' => ''), 'dry-run' => array('short' => 'd', 'help' => 'Dry run the update, no files will actually be modified.', 'boolean' => true), 'log' => array('short' => 'l', 'help' => 'Log all ouput to file log.txt in TMP dir', 'boolean' => true), 'ext' => array('short' => 'e', 'help' => 'The extension(s) to search. A pipe delimited list, or a preg_match compatible subpattern', 'default' => 'php|ctp'), 'interactive' => array('short' => 'i', 'help' => 'Run it interactively and ask before each each command', 'boolean' => true)));
     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 correctional commands', 'parser' => $subcommandParser))->addSubcommand('stable', array('help' => 'Run all stable Correct commands.', 'parser' => $subcommandParser))->addSubcommand('unstable', array('help' => 'Run all unstable Correct commands.', 'parser' => $subcommandParser))->addSubcommand('reference', array('help' => 'Update reference', 'parser' => $subcommandParser))->addSubcommand('amp', array('help' => '=& fix', 'parser' => $subcommandParser))->addSubcommand('request', array('help' => 'clientIp corrections', 'parser' => $subcommandParser))->addSubcommand('variables', array('help' => 'variables corrections', 'parser' => $subcommandParser))->addSubcommand('functions', array('help' => 'function name corrections', 'parser' => $subcommandParser))->addSubcommand('i18n', array('help' => 'i18n simplifications', 'parser' => $subcommandParser))->addSubcommand('vis', array('help' => 'visibility (public, protected)', 'parser' => $subcommandParser))->addSubcommand('forms', array('help' => 'post to itself by default', 'parser' => $subcommandParser))->addSubcommand('conventions', array('help' => 'usual php5/cakephp2 conventions for coding', 'parser' => $subcommandParser))->addSubcommand('conventions2', array('help' => 'usual php5/cakephp2 conventions for coding', 'parser' => $subcommandParser))->addSubcommand('conventions3', array('help' => 'usual php5/cakephp2 conventions for coding', 'parser' => $subcommandParser))->addSubcommand('conventions4', array('help' => 'usual php5/cakephp2 conventions for coding', 'parser' => $subcommandParser))->addSubcommand('conventions_experimental', array('help' => 'experimental conventions (careful!)', 'parser' => $subcommandParser))->addSubcommand('helper', array('help' => 'helper fix', 'parser' => $subcommandParser))->addSubcommand('auth', array('help' => 'auth fix', 'parser' => $subcommandParser))->addSubcommand('classes', array('help' => 'classes', 'parser' => $subcommandParser))->addSubcommand('mail', array('help' => 'mail fix', 'parser' => $subcommandParser))->addSubcommand('umlauts', array('help' => 'umlauts fixes in utf8', 'parser' => $subcommandParser))->addSubcommand('doc_blocks', array('help' => 'doc block updates', 'parser' => $subcommandParser))->addSubcommand('tests', array('help' => 'test case updates', 'parser' => $subcommandParser))->addSubcommand('html5', array('help' => 'html5 updates', 'parser' => $subcommandParser))->addSubcommand('header', array('help' => 'header change', 'parser' => $subcommandParser))->addSubcommand('performance', array('help' => 'performance updates', 'parser' => $subcommandParser))->addSubcommand('specialchars', array('help' => 'Resolve specialchars issues', 'parser' => $subcommandParser))->addSubcommand('pagination', array('help' => 'Correct pagination default order', 'parser' => $subcommandParser))->addSubcommand('whitespace', array('help' => 'Resolve whitespace issues', 'parser' => $subcommandParser));
 }