diff --git a/src/Command/RemoteCommandProxy.php b/src/Command/RemoteCommandProxy.php index c1dda6629d..aede9487f3 100644 --- a/src/Command/RemoteCommandProxy.php +++ b/src/Command/RemoteCommandProxy.php @@ -5,6 +5,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use Drush\Symfony\IndiscriminateInputDefinition; use Drush\Preflight\RedispatchHook; @@ -30,6 +31,9 @@ public function __construct($name, RedispatchHook $redispatchHook) parent::__construct($name); $this->redispatchHook = $redispatchHook; + // Put in a special input definition to avoid option validation errors. + $this->setDefinition(new IndiscriminateInputDefinition()); + // Put in a placeholder array arguement to avoid validation errors. $this->addArgument( 'arguments', diff --git a/src/Preflight/PreflightArgs.php b/src/Preflight/PreflightArgs.php index 548ef232d1..cdf668d0cf 100644 --- a/src/Preflight/PreflightArgs.php +++ b/src/Preflight/PreflightArgs.php @@ -5,7 +5,7 @@ use Consolidation\Config\ConfigInterface; use Symfony\Component\Console\Input\ArgvInput; -use Drush\Preflight\LessStrictArgvInput; +use Drush\Symfony\LessStrictArgvInput; /** * Storage for arguments preprocessed during preflight. diff --git a/src/Symfony/IndiscriminateInputDefinition.php b/src/Symfony/IndiscriminateInputDefinition.php new file mode 100644 index 0000000000..959c2d22e8 --- /dev/null +++ b/src/Symfony/IndiscriminateInputDefinition.php @@ -0,0 +1,49 @@ +