FairPackageResolver
readonly class \
- Implements
- PackageResolverInterface
Resolves packages from the FAIR metadata documents TER serves: one request per extension lists its releases with their requirements, artifact URL and checksum, which answers which package a version of an extension is.
The extensions handed out keep the "ter" remote identifier, so downloading one still goes through the registered remote for it, which fetches the archive and verifies it against the checksum the document named.
Internal
This class is a specific ExtensionManager implementation and is not part of the Public TYPO3 API.
Table of Contents
Interfaces
- PackageResolverInterface
- Pins down which exact package a download, an update or a dependency means.
Methods
- __construct() : mixed
- findByVersionRangeAndExtensionKeyOrderedByVersion() : Extension[]
- Left to another resolver, see {@see findHighestAvailableVersion()}.
- findHighestAvailableVersion() : Extension|null
- A FAIR document names neither the review state of a release nor its upload comment. Which version is offered for an update - never an insecure one - is therefore left to another resolver.
- findOneByExtensionKeyAndVersion() : Extension|null
- A release without a sha256 checksum is not resolved: downloading would skip verifying the archive, while the imported list carries a checksum.
- getByPackageIdentifier() : Extension
- The package a full remote identity addresses.
Methods
__construct()
public
__construct(FairPackageClient $client, FairPackageMapper $mapper[, string $remoteIdentifier = 'ter' ]) : mixed
Parameters
- $client : FairPackageClient
- $mapper : FairPackageMapper
- $remoteIdentifier : string = 'ter'
findByVersionRangeAndExtensionKeyOrderedByVersion()
Left to another resolver, see {@see findHighestAvailableVersion()}.
public
findByVersionRangeAndExtensionKeyOrderedByVersion(string $extensionKey[, int $lowestVersion = 0 ][, int $highestVersion = 0 ][, bool $includeCurrentVersion = true ]) : Extension[]
Parameters
- $extensionKey : string
- $lowestVersion : int = 0
- $highestVersion : int = 0
- $includeCurrentVersion : bool = true
Return values
Extension[]findHighestAvailableVersion()
A FAIR document names neither the review state of a release nor its upload comment. Which version is offered for an update - never an insecure one - is therefore left to another resolver.
public
findHighestAvailableVersion(string $extensionKey) : Extension|null
Parameters
- $extensionKey : string
Return values
Extension|nullfindOneByExtensionKeyAndVersion()
A release without a sha256 checksum is not resolved: downloading would skip verifying the archive, while the imported list carries a checksum.
public
findOneByExtensionKeyAndVersion(string $extensionKey, string $version) : Extension|null
Parameters
- $extensionKey : string
- $version : string
-
(example: 4.3.10)
Tags
Return values
Extension|nullgetByPackageIdentifier()
The package a full remote identity addresses.
public
getByPackageIdentifier(PackageIdentifier $packageIdentifier) : Extension
Parameters
- $packageIdentifier : PackageIdentifier