function ProcessFactory::getComposerHomePath

Returns the path to use as the COMPOSER_HOME environment variable.

Return value

string The path which should be used as COMPOSER_HOME.

1 call to ProcessFactory::getComposerHomePath()
ProcessFactory::create in core/modules/package_manager/src/ProcessFactory.php

File

core/modules/package_manager/src/ProcessFactory.php, line 72

Class

ProcessFactory
Defines a process factory which sets the COMPOSER_HOME environment variable.

Namespace

Drupal\package_manager

Code

private function getComposerHomePath() : string {
    $home_path = $this->fileSystem
        ->getTempDirectory();
    $home_path .= '/package_manager_composer_home-';
    $home_path .= $this->configFactory
        ->get('system.site')
        ->get('uuid');
    $this->fileSystem
        ->prepareDirectory($home_path, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS);
    return $home_path;
}

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