get IClientRequestComposable based on ClientRequestComposers composer name
@param composerName
@return IClientRequestComposable composer
334631
public IClientRequestComposable getComposer(ClientRequestComposers composerName) {
        IClientRequestComposable composer = composersMap.get(composerName);
        if(composer == null) {
            initDefaultComposer(composerName);
        }
        return composersMap.get(composerName);
    }
1192158
private function getComposer(): string
	{
		$composer = $this->tempDir . $this->composer;

		$temp = $this->tempDir . $this->composerDir;
		if (!file_exists($temp)) {
			mkdir($temp);
		}

		$home = 'COMPOSER_HOME="' . $temp . '" ';

		if (!file_exists($composer)) {
			$expectedSignature = trim(file_get_contents('https://composer.github.io/installer.sig'));
			copy('https://getcomposer.org/installer', $this->tempDir . '/composer-setup.php');
			$actualSignature = hash_file('SHA384', $this->tempDir . '/composer-setup.php');
			if ($expectedSignature === $actualSignature) {
				$command = 'cd ' . $this->tempDir . ';'
					. $home . 'php composer-setup.php;';
				exec($command, $output);
				foreach ($output as $str) {
					if (!empty($str)) {
						Debugger::log($str, 'composer');
					}
				}
				unlink($this->tempDir . '/composer-setup.php');
			} else {
				Debugger::log('Invalid installer signature', 'composer');
			}
		}
		return $home . $composer;
	}
770605
public void setComposer(String composer)
	{
		if (allow(ID3V2))
		{
			id3v2.setTextFrame(ID3v2Frames.COMPOSER, composer);
		}
	}
226548
public static function composer()
    {
        $loaders = spl_autoload_functions();

        foreach ($loaders as $key => $loader) {
            if (is_array($loader) && ($loader[0] instanceof ClassLoader)) {
                return $loader;
            }
        }
    }
38448
public function setOptionComposerName($optionComposerName)
    {
        if (!empty($optionComposerName)) {
            $this->options->setComposerName($optionComposerName);
        } else {
            throw new \InvalidArgumentException('Package\'s composer name can\'t be empty', __LINE__);
        }
        return $this;
    }
874391
private static function getComposerHome(Composer $composer)
    {
        return null !== $composer->getConfig() && $composer->getConfig()->has('home')
            ? $composer->getConfig()->get('home')
            : '';
    }
1278883
private function findComposerVersion(string $packageName, string $projectDir): ?string
    {
        // A library app, but being ran from source so use git version.
        if (file_exists("$projectDir/vendor")) {
            return $this->findGitVersion($projectDir);
        }

        $composerFile = "$projectDir/../../../composer.lock";
        if (!file_exists($composerFile)) {
            return null;
        }
        $composer = Json::parse(file_get_contents($composerFile));

        foreach (['packages', 'packages-dev'] as $group) {
            foreach ($composer[$group] as $package) {
                if ($package['name'] === $packageName) {
                    return ltrim($package['version'] ?? null, 'v');
                }
            }
        }

        return null;
    }
926349
protected function getPackageNameByComposerJson($projectName)
    {
        $file = $this->cwd.'/'.$this->projectsDir.'/'.$projectName.'/composer.json';
        if (!file_exists($file)) {
            return;
        }

        $json = json_decode(file_get_contents($file));
        if (!isset($json->name) || !$this->isPackageName($json->name)) {
            return;
        }

        return $json->name;
    }
111289
public static function convertComposerJson($composer_json) {
    // Update version constraints in require.
    foreach ($composer_json['require'] as $package_name => $version_constraint) {
      if ($package_name == 'drupal/core') {
        continue;
      }
      if (strstr($package_name, 'drupal/')) {
        $composer_json['require'][$package_name] = self::convertVersionConstraint($version_constraint);
      }
    }

    // Change drupal/lightning to acquia/lightning.
    $composer_json['require']['acquia/lightning'] = '^2';
    unset($composer_json['require']['drupal/lightning']);

    // Update version constraints in require-dev.
    foreach ($composer_json['require-dev'] as $package_name => $version_constraint) {
      if (strstr($package_name, 'drupal/')) {
        $composer_json['require-dev'][$package_name] = self::convertVersionConstraint($version_constraint);
      }
    }

    // Remove https://packagist.drupal-composer.org.
    foreach ($composer_json['repositories'] as $key => $repository) {
      if ($repository['url'] == 'https://packagist.drupal-composer.org') {
        unset($composer_json['repositories'][$key]);
      }
    }

    // Add https://packages.drupal.org/8.
    $composer_json['repositories']['drupal'] = [
      'type' => 'composer',
      'url' => 'https://packages.drupal.org/8',
    ];

    return $composer_json;
  }
748139
public static function getComposerManifest(string $manifestPath, string $configurationPath = null)
    {
        $composerManifest = static::readComposerManifest($manifestPath);
        if ($composerManifest === null) {
            return null;
        }

        if ($configurationPath !== null) {
            return ObjectAccess::getPropertyPath($composerManifest, $configurationPath);
        }
        return $composerManifest;
    }
687528
protected function findComposer()
    {
        $composerPhar = $this->workingPath .DS .'composer.phar';

        if ($this->files->exists($composerPhar)) {
            $executable = with(new PhpExecutableFinder)->find(false);

            return ProcessUtils::escapeArgument($executable) .' ' .$composerPhar;
        }

        return 'composer';
    }
805249
private function initializeRepos()
    {
        $composer = $this->getComposer(false);

        if ($composer) {
            return array(
                $composer->getRepositoryManager()->getLocalRepository(),
                new CompositeRepository($composer->getRepositoryManager()->getRepositories())
            );
        }

        $defaultRepos = Factory::createDefaultRepositories($this->getIO());

        return array(new CompositeRepository($defaultRepos));
    }
378584
public function createFromComposerJson($composer)
    {
        $sections = $this->getAutoloadSectionNames($composer);

        if (empty($sections)) {
            return array();
        }

        $validators = array();
        foreach ($sections as $section) {
            $validators[] = $this->createValidatorsFromSection($section, $composer[$section]);
        }

        return call_user_func_array('array_merge', $validators);
    }
760750
public function getDependencies($moduleName, $convertPackageNameToNamespace = true)
    {
        $modulePath = $this->getModulePath($moduleName);
        $dependencies = [];

        if ($modulePath) {

            $defaultDependencies = ['melis-core'];
            $dependencies = $defaultDependencies;
            $composerPossiblePath = [$modulePath . '/composer.json'];
            $composerFile = null;

            // search for the composer.json file
            foreach ($composerPossiblePath as $file) {
                if (file_exists($file)) {
                    $composerFile = file_get_contents($file);
                }
            }

            // if composer.json is found
            if ($composerFile) {

                $composer = json_decode($composerFile, true);
                $requires = isset($composer['require']) ? $composer['require'] : null;
                if ($requires) {
                    $requires = array_map(function ($a) {
                        // remove melisplatform prefix
                        return str_replace(['melisplatform/', ' '], '', trim($a));
                    }, array_keys($requires));

                    $dependencies = $requires;
                }
            }

            if ($convertPackageNameToNamespace) {
                $tmpDependencies = [];
                $toolSvc = $this->getServiceLocator()->get('MelisCoreTool');

                foreach ($dependencies as $dependency) {
                    $tmpDependencies[] = ucfirst($toolSvc->convertToNormalFunction($dependency));
                }

                $dependencies = $tmpDependencies;
            }
        }

        return $dependencies;
    }
1278878
public function GetComposer() {

		$filepath = "{$this->ProjectRoot}/composer.json";

		try { $composer = new Nether\Project\Composer($filepath); }
		catch(Exception $e) {
			$this->ShowMessage($e->getMessage());
			exit(0);
		}

		return $composer;
	}
520472
function () {
  var composerInstallDirectory = 'vendor';

  var exists = null;
  try {
    exists = fs.statSync(getComposerConfigPath());
  } catch (e) {}

  if (exists !== null) {
    var composerConfig = JSON.parse(fs.readFileSync(getComposerConfigPath()));
    if ('config' in composerConfig && 'vendor-dir' in composerConfig.config) {
      composerInstallDirectory = composerConfig.config['vendor-dir'];
    }
  }
  return composerInstallDirectory;
}
1099654
public static function getPackageVersion($composerName)
    {
        foreach (self::readComposerLock() as $composerLockData) {
            if (!isset($composerLockData['name'])) {
                continue;
            }
            if ($composerLockData['name'] === $composerName) {
                return preg_replace('/^v([0-9])/', '$1', $composerLockData['version'], 1);
            }
        }

        return '';
    }