TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
CoreVersionService Class Reference

Public Member Functions

 __construct (Registry $registry=null)
 
 getDownloadBaseUri ()
 
 updateVersionMatrix ()
 
 isInstalledVersionAReleasedVersion ()
 
 getTarGzSha1OfVersion ($version)
 
 getInstalledVersion ()
 
 isVersionActivelyMaintained ()
 
 isYoungerPatchReleaseAvailable ()
 
 isYoungerPatchDevelopmentReleaseAvailable ()
 
 isUpdateSecurityRelevant ()
 
 getYoungestPatchRelease ()
 
 getYoungestPatchDevelopmentRelease ()
 

Protected Member Functions

 getYoungestReleaseByType (array $types)
 
 getInstalledMajorVersion ()
 
 getMajorVersion ($version)
 
 getVersionMatrix ()
 
 fetchVersionMatrixFromRemote ()
 
 getReleaseTimestampOfVersion ($version)
 
 ensureVersionExistsInMatrix ($version)
 

Protected Attributes

 $registry
 
 $downloadBaseUri
 

Detailed Description

Core version service

Definition at line 24 of file CoreVersionService.php.

Constructor & Destructor Documentation

__construct ( Registry  $registry = null)

Initialize update URI

Parameters
Registry$registry

Definition at line 43 of file CoreVersionService.php.

References CoreVersionService\$registry, and GeneralUtility\makeInstance().

Member Function Documentation

ensureVersionExistsInMatrix (   $version)
protected

Throws an exception if specified version does not exist in version matrix

Parameters
$versionString to check in version matrix, e.g., 7.2.0alpha3 or 7.3.0
Exceptions
ExceptionCoreVersionServiceException

Definition at line 328 of file CoreVersionService.php.

References CoreVersionService\getMajorVersion(), and CoreVersionService\getVersionMatrix().

Referenced by CoreVersionService\getReleaseTimestampOfVersion(), and CoreVersionService\getTarGzSha1OfVersion().

fetchVersionMatrixFromRemote ( )
protected

Get available version string from get.typo3.org

Returns
array
Exceptions
ExceptionRemoteFetchException

Definition at line 286 of file CoreVersionService.php.

Referenced by CoreVersionService\updateVersionMatrix().

getDownloadBaseUri ( )
Returns
mixed

Definition at line 52 of file CoreVersionService.php.

References CoreVersionService\$downloadBaseUri.

getInstalledMajorVersion ( )
protected

Get 'major version' from installed version of TYPO3, e.g., '7' from '7.3.0'

Returns
string For example 7

Definition at line 245 of file CoreVersionService.php.

References CoreVersionService\getInstalledVersion(), and CoreVersionService\getMajorVersion().

Referenced by CoreVersionService\isVersionActivelyMaintained(), and CoreVersionService\updateVersionMatrix().

getMajorVersion (   $version)
protected
getReleaseTimestampOfVersion (   $version)
protected

Returns release timestamp of a specific version

Parameters
$versionString to check in version matrix, e.g., 7.2.0alpha3 or 7.3.0
Exceptions
ExceptionCoreVersionServiceException
Returns
int Timestamp of release

Definition at line 306 of file CoreVersionService.php.

References CoreVersionService\ensureVersionExistsInMatrix(), CoreVersionService\getMajorVersion(), and CoreVersionService\getVersionMatrix().

Referenced by CoreVersionService\getYoungestReleaseByType().

getTarGzSha1OfVersion (   $version)

Get sha1 of a version from version matrix

Parameters
string$versionA version to get sha1 of
Returns
string sha1 of version
Exceptions
ExceptionCoreVersionServiceException

Definition at line 96 of file CoreVersionService.php.

References CoreVersionService\ensureVersionExistsInMatrix(), CoreVersionService\getMajorVersion(), and CoreVersionService\getVersionMatrix().

getYoungestPatchDevelopmentRelease ( )

Youngest development patch release, e.g., 6.2.0alpha3 or 6.2-snapshot-20131004

Returns
string

Definition at line 195 of file CoreVersionService.php.

References CoreVersionService\getYoungestReleaseByType().

Referenced by CoreVersionService\isYoungerPatchDevelopmentReleaseAvailable().

getYoungestPatchRelease ( )

Youngest patch release, e.g., 6.2.2

Returns
string Version string of youngest patch level release

Definition at line 185 of file CoreVersionService.php.

References CoreVersionService\getYoungestReleaseByType().

Referenced by CoreVersionService\isYoungerPatchReleaseAvailable().

getYoungestReleaseByType ( array  $types)
protected

Get youngest release version string. Returns same version number if no younger release was found.

Parameters
array$typesList of allowed types: development, release, security, regular
Exceptions
ExceptionCoreVersionServiceException
Returns
string Youngest release, e.g., 7.2.0alpha3 or 7.3.0

Definition at line 208 of file CoreVersionService.php.

References CoreVersionService\getInstalledVersion(), CoreVersionService\getMajorVersion(), CoreVersionService\getReleaseTimestampOfVersion(), and CoreVersionService\getVersionMatrix().

Referenced by CoreVersionService\getYoungestPatchDevelopmentRelease(), CoreVersionService\getYoungestPatchRelease(), and CoreVersionService\isUpdateSecurityRelevant().

isInstalledVersionAReleasedVersion ( )

Development git checkout versions always end with '-dev'. They are not "released" as such and can not be updated.

Returns
bool FALSE If some development version is installed

Definition at line 83 of file CoreVersionService.php.

References CoreVersionService\getInstalledVersion().

isUpdateSecurityRelevant ( )

Returns TRUE if an upgrade from current version is security relevant

Returns
bool TRUE if there is a pending security update

Definition at line 169 of file CoreVersionService.php.

References CoreVersionService\getInstalledVersion(), and CoreVersionService\getYoungestReleaseByType().

isVersionActivelyMaintained ( )

Checks if TYPO3 version (e.g. 6.2) is an actively maintained version

Returns
bool TRUE if version is actively maintained

Definition at line 129 of file CoreVersionService.php.

References CoreVersionService\getInstalledMajorVersion(), and CoreVersionService\getVersionMatrix().

isYoungerPatchDevelopmentReleaseAvailable ( )

Returns TRUE if a younger patch level release exists in version matrix that may be a development release.

Returns
bool TRUE if younger patch release is exists

Definition at line 153 of file CoreVersionService.php.

References CoreVersionService\getInstalledVersion(), and CoreVersionService\getYoungestPatchDevelopmentRelease().

isYoungerPatchReleaseAvailable ( )

Returns TRUE if a younger patch level release exists in version matrix.

Returns
bool TRUE if younger patch release is exists

Definition at line 141 of file CoreVersionService.php.

References CoreVersionService\getInstalledVersion(), and CoreVersionService\getYoungestPatchRelease().

updateVersionMatrix ( )

Update version matrix from remote and store in registry

Returns
void
Exceptions
ExceptionRemoteFetchException

Definition at line 63 of file CoreVersionService.php.

References CoreVersionService\fetchVersionMatrixFromRemote(), CoreVersionService\getInstalledMajorVersion(), and CoreVersionService\getMajorVersion().

Member Data Documentation

$downloadBaseUri
protected

Definition at line 36 of file CoreVersionService.php.

Referenced by CoreVersionService\getDownloadBaseUri().

$registry
protected

Definition at line 29 of file CoreVersionService.php.

Referenced by CoreVersionService\__construct().