class UpdateChecker (View source)

The update checker class is provided a Link object representing a package and uses the Composer API to determine the next available updates for the package.

Constants

TYPE_AVAILABLE

Update types (see ComposerPackageVersion

TYPE_LATEST

Properties

protected VersionSelector $versionSelector

Methods

public
string[]
checkForUpdates(PackageInterface $package, string $constraint)

Checks the given package for available and latest updates, and writes them to data models if found

protected
VersionSelector
getVersionSelector(Composer $composer)

No description

protected
bool|PackageInterface
findLatestPackage(PackageInterface $package, string $constraint, string $installedVersion, Composer $composer, bool $minorOnly = false)

Given a package, this finds the latest package matching it

Details

string[] checkForUpdates(PackageInterface $package, string $constraint)

Checks the given package for available and latest updates, and writes them to data models if found

Parameters

PackageInterface $package
string $constraint

Return Value

string[]

protected VersionSelector getVersionSelector(Composer $composer)

No description

Parameters

Composer $composer

Return Value

VersionSelector

protected bool|PackageInterface findLatestPackage(PackageInterface $package, string $constraint, string $installedVersion, Composer $composer, bool $minorOnly = false)

Given a package, this finds the latest package matching it

Based on Composer's ShowCommand::findLatestPackage

Parameters

PackageInterface $package
string $constraint
string $installedVersion
Composer $composer
bool $minorOnly

Return Value

bool|PackageInterface