Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Factory.php

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

... See full list

File

vendor/composer/composer/src/Composer/Factory.php, line 224

Class

Factory
Creates a configured instance of composer.

Namespace

Composer

Code

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';
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal