Skip to content

Commit

Permalink
Remove deprecated calls in Cake\Shell
Browse files Browse the repository at this point in the history
  • Loading branch information
antograssiot committed Jan 11, 2017
1 parent 37fd8d3 commit 9422f62
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Shell/CommandListShell.php
Expand Up @@ -139,7 +139,7 @@ public function getOptionParser()
{
$parser = parent::getOptionParser();

$parser->description(
$parser->setDescription(
'Get the list of available shells for this CakePHP application.'
)->addOption('xml', [
'help' => 'Get the listing as XML.',
Expand Down
4 changes: 2 additions & 2 deletions src/Shell/CompletionShell.php
Expand Up @@ -116,7 +116,7 @@ public function getOptionParser()
{
$parser = parent::getOptionParser();

$parser->description(
$parser->setDescription(
'Used by shells like bash to autocomplete command name, options and arguments'
)->addSubcommand('commands', [
'help' => 'Output a list of available commands',
Expand Down Expand Up @@ -151,7 +151,7 @@ public function getOptionParser()
]
])->addSubcommand('fuzzy', [
'help' => 'Guess autocomplete'
])->epilog([
])->setEpilog([
'This command is not intended to be called manually',
]);

Expand Down
2 changes: 1 addition & 1 deletion src/Shell/I18nShell.php
Expand Up @@ -147,7 +147,7 @@ public function getOptionParser()
]
];

$parser->description(
$parser->setDescription(
'I18n Shell generates .pot files(s) with translations.'
)->addSubcommand('extract', [
'help' => 'Extract the po translations from your application',
Expand Down
6 changes: 3 additions & 3 deletions src/Shell/OrmCacheShell.php
Expand Up @@ -71,7 +71,7 @@ public function clear($name = null)
if (empty($name)) {
$tables = $schema->listTables();
}
$configName = $schema->cacheMetadata();
$configName = $schema->getCacheMetadata();

foreach ($tables as $table) {
$this->_io->verbose(sprintf(
Expand Down Expand Up @@ -102,7 +102,7 @@ protected function _getSchema()
'as it does not implement a "schemaCollection()" method.',
$this->params['connection']
);
$this->error($msg);
$this->abort($msg);

return false;
}
Expand All @@ -112,7 +112,7 @@ protected function _getSchema()
$source->cacheMetadata(true);
}

return $source->schemaCollection();
return $source->getSchemaCollection();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Shell/RoutesShell.php
Expand Up @@ -109,7 +109,7 @@ public function generate()
public function getOptionParser()
{
$parser = parent::getOptionParser();
$parser->description(
$parser->setDescription(
'Get the list of routes connected in this application. ' .
'This tool also lets you test URL generation and URL parsing.'
)->addSubcommand('check', [
Expand Down
2 changes: 1 addition & 1 deletion src/Shell/ServerShell.php
Expand Up @@ -150,7 +150,7 @@ public function getOptionParser()
{
$parser = parent::getOptionParser();

$parser->description([
$parser->setDescription([
'PHP Built-in Server for CakePHP',
'<warning>[WARN] Don\'t use this in a production environment</warning>',
])->addOption('host', [
Expand Down

0 comments on commit 9422f62

Please sign in to comment.