DependencyUtility implements SingletonInterface
Utility for dealing with dependencies
This class is a specific ExtensionManager implementation and is not part of the Public TYPO3 API.
Table of Contents
Interfaces
- SingletonInterface
- "empty" interface for singletons (marker interface pattern)
Properties
- $availableExtensions : array<string|int, mixed>
- $dependencyErrors : array<string|int, mixed>
- $emConfUtility : EmConfUtility
- $extensionRepository : ExtensionRepository
- $listUtility : ListUtility
- $managementService : ExtensionManagementService
- $skipDependencyCheck : bool
Methods
- checkDependencies() : mixed
- Checks dependencies for special cases (currently typo3 and php)
- getDependencyErrors() : array<string|int, mixed>
- Return the dependency errors
- hasDependencyErrors() : bool
- Returns TRUE if a dependency error was found
- injectEmConfUtility() : mixed
- 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<string|int, mixed>
$availableExtensions
= []
$dependencyErrors
protected
array<string|int, mixed>
$dependencyErrors
= []
$emConfUtility
protected
EmConfUtility
$emConfUtility
$extensionRepository
protected
ExtensionRepository
$extensionRepository
$listUtility
protected
ListUtility
$listUtility
$managementService
protected
ExtensionManagementService
$managementService
$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<string|int, mixed>
Return values
array<string|int, mixed>hasDependencyErrors()
Returns TRUE if a dependency error was found
public
hasDependencyErrors() : bool
Return values
boolinjectEmConfUtility()
public
injectEmConfUtility(EmConfUtility $emConfUtility) : mixed
Parameters
- $emConfUtility : EmConfUtility
injectExtensionRepository()
public
injectExtensionRepository(ExtensionRepository $extensionRepository) : mixed
Parameters
- $extensionRepository : ExtensionRepository
injectListUtility()
public
injectListUtility(ListUtility $listUtility) : mixed
Parameters
- $listUtility : ListUtility
injectManagementService()
public
injectManagementService(ExtensionManagementService $managementService) : mixed
Parameters
- $managementService : ExtensionManagementService
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
Return values
boolcheckPhpDependency()
Returns true if current php version fulfills extension requirements
protected
checkPhpDependency(Dependency $dependency, string $version) : bool
Parameters
- $dependency : Dependency
- $version : string
Tags
Return values
boolcheckTypo3Dependency()
Returns true if current TYPO3 version fulfills extension requirements
protected
checkTypo3Dependency(Dependency $dependency, string $version) : bool
Parameters
- $dependency : Dependency
- $version : string
Tags
Return values
booldownloadExtensionFromRemote()
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
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|nullgetLatestCompatibleExtensionByDependency()
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|nullisAvailableVersionCompatible()
Checks whether the available version is compatible
protected
isAvailableVersionCompatible(Dependency $dependency) : bool
Parameters
- $dependency : Dependency
Return values
boolisDependentExtensionAvailable()
Checks whether the needed extension is available (not necessarily installed, but present in system)
protected
isDependentExtensionAvailable(string $extensionKey) : bool
Parameters
- $extensionKey : string
Return values
boolisDependentExtensionLoaded()
protected
isDependentExtensionLoaded(string $extensionKey) : bool
Parameters
- $extensionKey : string
Return values
boolisDownloadableVersionCompatible()
Checks whether a compatible version of the extension exists in TER
protected
isDownloadableVersionCompatible(Dependency $dependency) : bool
Parameters
- $dependency : Dependency
Return values
boolisExtensionDownloadableFromRemote()
Checks whether a ter extension with $extensionKey exists
protected
isExtensionDownloadableFromRemote(string $extensionKey) : bool
Parameters
- $extensionKey : string
Return values
boolisLoadedVersionCompatible()
protected
isLoadedVersionCompatible(Dependency $dependency) : bool
Parameters
- $dependency : Dependency
Return values
boolsetAvailableExtensions()
Setter for available extensions gets available extensions from list utility if not already done
protected
setAvailableExtensions() : mixed