function ProcessFactory::create

Same name and namespace in other branches
  1. 11.x core/modules/package_manager/tests/modules/fixture_manipulator/src/ProcessFactory.php \Drupal\fixture_manipulator\ProcessFactory::create()

File

core/modules/package_manager/tests/modules/fixture_manipulator/src/ProcessFactory.php, line 36

Class

ProcessFactory
Process factory that always sets the COMPOSER_MIRROR_PATH_REPOS env variable.

Namespace

Drupal\fixture_manipulator

Code

public function create(array $command, ?PathInterface $cwd = NULL, array $env = []) : ProcessInterface {
  $process = $this->decorated
    ->create($command, $cwd, $env);
  $env = $process->getEnv();
  $env['COMPOSER_MIRROR_PATH_REPOS'] = '1';
  $process->setEnv($env);
  return $process;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.