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

Breadcrumb

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

function CompletionTrait::suggestAvailablePackageInclPlatform

Suggest package names available on all configured repositories or platform packages from the ones available on the currently-running PHP

File

vendor/composer/composer/src/Composer/Command/CompletionTrait.php, line 214

Class

CompletionTrait
Adds completion to arguments and options.

Namespace

Composer\Command

Code

private function suggestAvailablePackageInclPlatform() : \Closure {
    return function (CompletionInput $input) : array {
        if (Preg::isMatch('{^(ext|lib|php)(-|$)|^com}', $input->getCompletionValue())) {
            $matches = $this->suggestPlatformPackage()($input);
        }
        else {
            $matches = [];
        }
        return array_merge($matches, $this->suggestAvailablePackage(99 - \count($matches))($input));
    };
}

API Navigation

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