Skip to content

[console] ProcessBuilder is removed in Symfony 4, hence Drupal 9 #4330

@yookoala

Description

@yookoala

Problem/Motivation

Running drupal database:client will run into this error:

Error: Class "Symfony\Component\Process\ProcessBuilder" not found in Drupal\Console\Command\Database\ClientCommand->execute() (line 66 of /home/foobar/public_html/vendor/drupal/console/src/Command/Database/ClientCommand.php).

This is because the ProcessBuilder was deprecated in Symfony 3.4 and was removed in Symfony 4.0. Instead, Process should be used directly.

How to reproduce

  1. Install a Drupal 9 site.
  2. Install Drupal Console on it.
  3. Run drupal database:client

Solution

Replace the ProcessBuilder call with Process.
Example: pact-foundation/pact-php#61

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions