From 0492290a3b0eed4dae20c119e07f25e3ad62af64 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 6 Jan 2012 04:12:25 +0100 Subject: [PATCH] [Console] added a missing method (closes #3043) --- src/Symfony/Component/Console/Command/Command.php | 10 ++++++++++ src/Symfony/Component/Console/Command/HelpCommand.php | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index 2d55c387fa..dbf269e1fa 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -67,6 +67,16 @@ class Command } } + /** + * Ignores validation errors. + * + * This is mainly useful for the help command. + */ + public function ignoreValidationErrors() + { + $this->ignoreValidationErrors = true; + } + /** * Sets the application instance for this command. * diff --git a/src/Symfony/Component/Console/Command/HelpCommand.php b/src/Symfony/Component/Console/Command/HelpCommand.php index 62f2d49ace..e2da0d7876 100644 --- a/src/Symfony/Component/Console/Command/HelpCommand.php +++ b/src/Symfony/Component/Console/Command/HelpCommand.php @@ -32,7 +32,7 @@ class HelpCommand extends Command */ protected function configure() { - $this->ignoreValidationErrors = true; + $this->ignoreValidationErrors(); $this ->setDefinition(array(