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

Breadcrumb

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

function Request::requireName

File

vendor/composer/composer/src/Composer/DependencyResolver/Request.php, line 65

Class

Request
@author Nils Adermann <naderman@naderman.de>

Namespace

Composer\DependencyResolver

Code

public function requireName(string $packageName, ?ConstraintInterface $constraint = null) : void {
    $packageName = strtolower($packageName);
    if ($constraint === null) {
        $constraint = new MatchAllConstraint();
    }
    if (isset($this->requires[$packageName])) {
        throw new \LogicException('Overwriting requires seems like a bug (' . $packageName . ' ' . $this->requires[$packageName]
            ->getPrettyString() . ' => ' . $constraint->getPrettyString() . ', check why it is happening, might be a root alias');
    }
    $this->requires[$packageName] = $constraint;
}

API Navigation

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