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(