Browse Source

[Console] added a missing method (closes #3043)

Fabien Potencier 13 years ago
parent
commit
0492290a3b

+ 10 - 0
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.
      *

+ 1 - 1
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(