1
0
Fork 0
mirror of synced 2025-04-01 12:26:11 +03:00

[2.0] Fixing more glitches found with CLI refactoring

This commit is contained in:
guilhermeblanco 2009-12-22 16:17:35 +00:00
parent 217d41698e
commit bd6ed7cc76
5 changed files with 10 additions and 16 deletions

View file

@ -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);

View file

@ -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);
}

View file

@ -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 ' .

View file

@ -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. ' .

View file

@ -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.'
);
}