function Factory::getComposerFile
14 calls to Factory::getComposerFile()
- Application::doRun in vendor/
composer/ composer/ src/ Composer/ Console/ Application.php - Runs the current application.
- BumpCommand::doBump in vendor/
composer/ composer/ src/ Composer/ Command/ BumpCommand.php - ConfigCommand::getComposerConfigFile in vendor/
composer/ composer/ src/ Composer/ Command/ ConfigCommand.php - Get the local composer.json, global config.json, or the file passed by the user
- DiagnoseCommand::checkComposerSchema in vendor/
composer/ composer/ src/ Composer/ Command/ DiagnoseCommand.php - Factory::create in vendor/
composer/ composer/ src/ Composer/ Factory.php
File
-
vendor/
composer/ composer/ src/ Composer/ Factory.php, line 224
Class
- Factory
- Creates a configured instance of composer.
Namespace
ComposerCode
public static function getComposerFile() : string {
$env = Platform::getEnv('COMPOSER');
if (is_string($env)) {
$env = trim($env);
if ('' !== $env) {
if (is_dir($env)) {
throw new \RuntimeException('The COMPOSER environment variable is set to ' . $env . ' which is a directory, this variable should point to a composer.json or be left unset.');
}
return $env;
}
}
return './composer.json';
}