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

Breadcrumb

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

function BaseCommand::getComposer

Parameters

bool $required Should be set to false, or use `requireComposer` instead:

bool|null $disablePlugins If null, reads --no-plugins as default:

bool|null $disableScripts If null, reads --no-scripts as default:

Return value

Composer|null

Throws

\RuntimeException

Deprecated

since Composer 2.3.0 use requireComposer or tryComposer depending on whether you have $required set to true or false

File

vendor/composer/composer/src/Composer/Command/BaseCommand.php, line 78

Class

BaseCommand
Base class for Composer commands

Namespace

Composer\Command

Code

public function getComposer(bool $required = true, ?bool $disablePlugins = null, ?bool $disableScripts = null) {
    if ($required) {
        return $this->requireComposer($disablePlugins, $disableScripts);
    }
    return $this->tryComposer($disablePlugins, $disableScripts);
}
RSS feed
Powered by Drupal