[2.0] Fixing more glitches found with CLI refactoring
This commit is contained in:
parent
217d41698e
commit
bd6ed7cc76
5 changed files with 10 additions and 16 deletions
|
@ -42,7 +42,9 @@ class HelpTask extends AbstractTask
|
|||
*/
|
||||
public function buildDocumentation()
|
||||
{
|
||||
// Does nothing
|
||||
$doc = $this->getDocumentation();
|
||||
$doc->setName('help')
|
||||
->setDescription('Exposes helpful information about all available tasks.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,14 +55,6 @@ class HelpTask extends AbstractTask
|
|||
$this->run();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function basicHelp()
|
||||
{
|
||||
$this->run();
|
||||
}
|
||||
|
||||
/**
|
||||
* Exposes the available tasks
|
||||
*
|
||||
|
@ -74,7 +68,7 @@ class HelpTask extends AbstractTask
|
|||
|
||||
// Switch between ALL available tasks and display the basic Help of each one
|
||||
$availableTasks = $cliController->getAvailableTasks();
|
||||
unset($availableTasks['Core:Help']);
|
||||
//unset($availableTasks['Core:Help']);
|
||||
|
||||
ksort($availableTasks);
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ class RunSqlTask extends AbstractTask
|
|||
$resultSet = $em->getConnection()->executeUpdate($arguments['sql']);
|
||||
}
|
||||
|
||||
$maxDepth = isset($args['arguments']) ? $arguments['depth'] : 7;
|
||||
$maxDepth = isset($arguments['depth']) ? $arguments['depth'] : 7;
|
||||
|
||||
Debug::dump($resultSet, $maxDepth);
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ class ClearCacheTask extends AbstractTask
|
|||
// id, regex, prefix or suffix.
|
||||
if (
|
||||
(isset($arguments['query']) || isset($arguments['metadata'])) && (isset($arguments['id']) ||
|
||||
isset($args['regex']) || isset($args['prefix']) || isset($args['suffix']))
|
||||
isset($arguments['regex']) || isset($arguments['prefix']) || isset($arguments['suffix']))
|
||||
) {
|
||||
throw new CliException(
|
||||
'When clearing the query or metadata cache do not ' .
|
||||
|
|
|
@ -59,7 +59,7 @@ class GenerateProxiesTask extends AbstractTask
|
|||
|
||||
if ($metadataDriver instanceof \Doctrine\ORM\Mapping\Driver\AnnotationDriver) {
|
||||
if (isset($arguments['class-dir'])) {
|
||||
$metadataDriver->setClassDirectory($args['class-dir']);
|
||||
$metadataDriver->setClassDirectory($arguments['class-dir']);
|
||||
} else {
|
||||
throw new CliException(
|
||||
'The supplied configuration uses the annotation metadata driver. ' .
|
||||
|
|
|
@ -131,13 +131,13 @@ class SchemaToolTask extends AbstractTask
|
|||
}
|
||||
|
||||
if ($isCompleteUpdate && ($isCreate || $isDrop || $isUpdate)) {
|
||||
throw new CliException('You cannot use --update with --create, --drop or --update.');
|
||||
throw new CliException('You cannot use --complete-update with --create, --drop or --update.');
|
||||
}
|
||||
|
||||
if ( ! ($isCreate || $isDrop || $isUpdate || $isCompleteUpdate)) {
|
||||
throw new CliException(
|
||||
'You must specify at a minimum one of the options ' .
|
||||
'(--create, --drop, --update, --re-create or --complete-update).'
|
||||
'You must specify at a minimum one of the options: ' .
|
||||
'--create, --drop, --update, --re-create or --complete-update.'
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue