Skip to content

Drush commands fail - Symfony Process expects array #256

@cboyden-ucb

Description

@cboyden-ucb

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions