I want to create a command with options not defined in its signature (I directly pass the options to another command inside mine).
Currently, when I run my command without having its signature precisely defined, it throws an error:
The "--my-option-not-defined-in-signatue" option does not exist.
Is there a way to disable this check?
In the command constructor, you can disable those checks by using the method ignoreValidationErrors()
, like so:
public function __construct()
{
parent::__construct();
$this->ignoreValidationErrors();
}