class SuggestedPackagesReporter (View source)

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

Properties

protected array $suggestedPackages

Methods

__construct(IOInterface $io)

No description

array
getPackages()

No description

addPackage(string $source, string $target, string $reason)

Add suggested packages to be listed after install

addSuggestionsFromPackage(PackageInterface $package)

Add all suggestions from a package.

output(RepositoryInterface $installedRepo = null)

Output suggested packages.

Details

__construct(IOInterface $io)

Parameters

IOInterface $io

array getPackages()

Return Value

array Suggested packages with source, target and reason keys.

SuggestedPackagesReporter addPackage(string $source, string $target, string $reason)

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

Return Value

SuggestedPackagesReporter

SuggestedPackagesReporter addSuggestionsFromPackage(PackageInterface $package)

Add all suggestions from a package.

Parameters

PackageInterface $package

Return Value

SuggestedPackagesReporter

SuggestedPackagesReporter output(RepositoryInterface $installedRepo = null)

Output suggested packages.

Do not list the ones already installed if installed repository provided.

Parameters

RepositoryInterface $installedRepo Installed packages

Return Value

SuggestedPackagesReporter