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

Breadcrumb

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

function RootPackageLoader::extractReferences

@internal

Parameters

array<string, string> $requires:

array<string, string> $references:

Return value

array<string, string>

3 calls to RootPackageLoader::extractReferences()
RequireCommand::doUpdate in vendor/composer/composer/src/Composer/Command/RequireCommand.php
RootPackageLoader::load in vendor/composer/composer/src/Composer/Package/Loader/RootPackageLoader.php
@inheritDoc
UpdateCommand::execute in vendor/composer/composer/src/Composer/Command/UpdateCommand.php
Executes the current command.

File

vendor/composer/composer/src/Composer/Package/Loader/RootPackageLoader.php, line 298

Class

RootPackageLoader
ArrayLoader built for the sole purpose of loading the root package

Namespace

Composer\Package\Loader

Code

public static function extractReferences(array $requires, array $references) : array {
    foreach ($requires as $reqName => $reqVersion) {
        $reqVersion = Preg::replace('{^([^,\\s@]+) as .+$}', '$1', $reqVersion);
        if (Preg::isMatchStrictGroups('{^[^,\\s@]+?#([a-f0-9]+)$}', $reqVersion, $match) && 'dev' === VersionParser::parseStability($reqVersion)) {
            $name = strtolower($reqName);
            $references[$name] = $match[1];
        }
    }
    return $references;
}

API Navigation

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