jhedstrom / DrupalDriver

A collection of drivers for controlling Drupal.
GNU General Public License v2.0
64 stars 95 forks source link

Drush commands fail - Symfony Process expects array #256

Open cboyden-ucb opened 1 year ago

cboyden-ucb commented 1 year ago

After upgrading to the Behat Drupal extension 4.2.1, I am seeing test failures due to an exception when running the "drush" command. Behind the scenes, symfony/process was upgraded from v4.4.36 to v6.0.11.

When` I run drush "cc" "views"
# Drupal\DrupalExtension\Context\DrushContext::assertDrushCommandWithArgument()

Type error: Symfony\Component\Process\Process::__construct(): Argument #1 ($command) must be of type array,
string given, called in vendor/drupal/drupal-driver/src/Drupal/Driver/DrushDriver.php on line 417 
(Behat\Testwork\Call\Exception\FatalThrowableError)

Drupal core seems to have fixed this in https://www.drupal.org/project/drupal/issues/3162045 by taking advantage of an addition to symfony/process, using Process::fromShellCommandline instead of Process. This should probably work here too.

cboyden commented 1 year ago

This would be fixed by #251