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

Breadcrumb

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

function SuggestedPackagesReporter::addPackage

Add suggested packages to be listed after install

Could be used to add suggested packages both from the installer or from CreateProjectCommand.

Parameters

string $source Source package which made the suggestion:

string $target Target package to be suggested:

string $reason Reason the target package to be suggested:

1 call to SuggestedPackagesReporter::addPackage()
SuggestedPackagesReporter::addSuggestionsFromPackage in vendor/composer/composer/src/Composer/Installer/SuggestedPackagesReporter.php
Add all suggestions from a package.

File

vendor/composer/composer/src/Composer/Installer/SuggestedPackagesReporter.php, line 65

Class

SuggestedPackagesReporter
Add suggested packages from different places to output them in the end.

Namespace

Composer\Installer

Code

public function addPackage(string $source, string $target, string $reason) : SuggestedPackagesReporter {
    $this->suggestedPackages[] = [
        'source' => $source,
        'target' => $target,
        'reason' => $reason,
    ];
    return $this;
}

API Navigation

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