function ProcessFactory::create

Same name in this branch
  1. 11.x core/modules/package_manager/src/ProcessFactory.php \Drupal\package_manager\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.