DependencyUtility

class \TYPO3\CMS\Extensionmanager\Utility\DependencyUtility

Implements
SingletonInterface

Utility for dealing with dependencies

Table of Contents

Interfaces

SingletonInterface
"empty" interface for singletons (marker interface pattern)

Properties

$availableExtensions  : array
$dependencyErrors  : array
$extensionRepository  : ExtensionRepository
$listUtility  : ListUtility
$managementService  : ExtensionManagementService
$skipDependencyCheck  : bool

Methods

checkDependencies()  : mixed
Checks dependencies for special cases (currently typo3 and php)
getDependencyErrors()  : array
Return the dependency errors
hasDependencyErrors()  : bool
Returns TRUE if a dependency error was found
injectExtensionRepository()  : mixed
injectListUtility()  : mixed
injectManagementService()  : mixed
setSkipDependencyCheck()  : mixed
checkExtensionDependency()  : bool
Main controlling function for checking dependencies Dependency check is done in the following way: - installed extension in matching version ? - return true - available extension in matching version ? - mark for installation - remote (TER) extension in matching version? - mark for download
checkPhpDependency()  : bool
Returns true if current php version fulfills extension requirements
checkTypo3Dependency()  : bool
Returns true if current TYPO3 version fulfills extension requirements
downloadExtensionFromRemote()  : mixed
Handles checks to find a compatible extension version from TER to fulfill given dependency
getCompatibleExtension()  : Extension|null
Get the latest compatible version of an extension that's compatible with the current core and PHP version.
getLatestCompatibleExtensionByDependency()  : Extension|null
Get the latest compatible version of an extension that fulfills the given dependency from TER
isAvailableVersionCompatible()  : bool
Checks whether the available version is compatible
isDependentExtensionAvailable()  : bool
Checks whether the needed extension is available (not necessarily installed, but present in system)
isDependentExtensionLoaded()  : bool
isDownloadableVersionCompatible()  : bool
Checks whether a compatible version of the extension exists in TER
isExtensionDownloadableFromRemote()  : bool
Checks whether a ter extension with $extensionKey exists
isLoadedVersionCompatible()  : bool
setAvailableExtensions()  : mixed
Setter for available extensions gets available extensions from list utility if not already done

Properties

$availableExtensions

protected array $availableExtensions = []

$dependencyErrors

protected array $dependencyErrors = []

$skipDependencyCheck

protected bool $skipDependencyCheck = false

Methods

checkDependencies()

Checks dependencies for special cases (currently typo3 and php)

public checkDependencies(Extension $extension) : mixed

Parameters

$extension : Extension

getDependencyErrors()

Return the dependency errors

public getDependencyErrors() : array

Return values

array

hasDependencyErrors()

Returns TRUE if a dependency error was found

public hasDependencyErrors() : bool

Return values

bool

setSkipDependencyCheck()

public setSkipDependencyCheck(bool $skipDependencyCheck) : mixed

Parameters

$skipDependencyCheck : bool

checkExtensionDependency()

Main controlling function for checking dependencies Dependency check is done in the following way: - installed extension in matching version ? - return true - available extension in matching version ? - mark for installation - remote (TER) extension in matching version? - mark for download

protected checkExtensionDependency(Dependency $dependency) : bool

Parameters

$dependency : Dependency

Tags

todo

handle exceptions / markForUpload

throws
MissingVersionDependencyException

Return values

bool

downloadExtensionFromRemote()

Handles checks to find a compatible extension version from TER to fulfill given dependency

protected downloadExtensionFromRemote(string $extensionKey, Dependency $dependency) : mixed

Parameters

$extensionKey : string
$dependency : Dependency

Tags

throws
MissingExtensionDependencyException

getCompatibleExtension()

Get the latest compatible version of an extension that's compatible with the current core and PHP version.

protected getCompatibleExtension(iterable<string|int, mixed> $extensions) : Extension|null

Parameters

$extensions : iterable<string|int, mixed>

Return values

Extension|null

getLatestCompatibleExtensionByDependency()

Get the latest compatible version of an extension that fulfills the given dependency from TER

protected getLatestCompatibleExtensionByDependency(Dependency $dependency) : Extension|null

Parameters

$dependency : Dependency

Return values

Extension|null

isAvailableVersionCompatible()

Checks whether the available version is compatible

protected isAvailableVersionCompatible(Dependency $dependency) : bool

Parameters

$dependency : Dependency

Return values

bool

isDependentExtensionAvailable()

Checks whether the needed extension is available (not necessarily installed, but present in system)

protected isDependentExtensionAvailable(string $extensionKey) : bool

Parameters

$extensionKey : string

Return values

bool

isDependentExtensionLoaded()

protected isDependentExtensionLoaded(string $extensionKey) : bool

Parameters

$extensionKey : string

Return values

bool

isDownloadableVersionCompatible()

Checks whether a compatible version of the extension exists in TER

protected isDownloadableVersionCompatible(Dependency $dependency) : bool

Parameters

$dependency : Dependency

Return values

bool

isExtensionDownloadableFromRemote()

Checks whether a ter extension with $extensionKey exists

protected isExtensionDownloadableFromRemote(string $extensionKey) : bool

Parameters

$extensionKey : string

Return values

bool

isLoadedVersionCompatible()

protected isLoadedVersionCompatible(Dependency $dependency) : bool

Parameters

$dependency : Dependency

Return values

bool

setAvailableExtensions()

Setter for available extensions gets available extensions from list utility if not already done

protected setAvailableExtensions() : mixed
On this page