55 $this->downloadBaseUri =
'https://get.typo3.org/';
70 unset($versionArray[
'6.1'], $versionArray[
'6.0'], $versionArray[
'4.7'], $versionArray[
'4.6'],
71 $versionArray[
'4.5'], $versionArray[
'4.4'], $versionArray[
'4.3'], $versionArray[
'4.2'],
72 $versionArray[
'4.1'], $versionArray[
'4.0'], $versionArray[
'3.8'], $versionArray[
'3.7'],
73 $versionArray[
'3.6'], $versionArray[
'3.5'], $versionArray[
'3.3']);
74 $this->registry->set(
'TYPO3.CMS.Install',
'coreVersionMatrix', $versionArray);
85 return substr($version, -4) !==
'-dev';
101 if (empty($versionMatrix[$minorVersion][
'releases'][$version][
'checksums'][
'tar'][
'sha1'])) {
102 throw new Exception\CoreVersionServiceException(
103 'Release sha1 of version ' . $version .
' not found in version matrix.' 104 .
' This is probably a bug on get.typo3.org.',
109 return $versionMatrix[$minorVersion][
'releases'][$version][
'checksums'][
'tar'][
'sha1'];
130 if ($youngestVersion !== $version) {
145 if ($youngestVersion !== $version) {
160 if ($youngestVersion !== $version) {
198 $youngestRelease = $version;
201 $patchLevelVersions = $versionMatrix[$minorVersion][
'releases'];
202 foreach ($patchLevelVersions as $aVersionNumber => $aVersionDetails) {
203 if (!array_key_exists(
'type', $aVersionDetails)) {
204 throw new Exception\CoreVersionServiceException(
205 'Release type of version ' . $aVersionNumber .
' not found in version matrix.' 206 .
' This is probably a bug on get.typo3.org.',
210 $type = $aVersionDetails[
'type'];
213 $aVersionNumberReleaseTimestamp > $versionReleaseTimestamp
214 && in_array($type, $types)
216 $youngestRelease = $aVersionNumber;
217 $versionReleaseTimestamp = $aVersionNumberReleaseTimestamp;
220 return $youngestRelease;
239 $explodedVersion = explode(
'.', $version);
240 $minor = explode(
'-', $explodedVersion[1]);
241 return $explodedVersion[0] .
'.' . $minor[0];
251 $versionMatrix = $this->registry->get(
'TYPO3.CMS.Install',
'coreVersionMatrix');
252 if (empty($versionMatrix) || !is_array($versionMatrix)) {
253 throw new Exception\CoreVersionServiceException(
254 'No version matrix found in registry, call updateVersionMatrix() first.',
258 return $versionMatrix;
268 $url = $this->downloadBaseUri .
'json';
271 throw new Exception\RemoteFetchException(
272 'Fetching ' . $url .
' failed. Maybe this instance can not connect to the remote system properly.',
276 return json_decode($versionJson, TRUE);
290 if (!array_key_exists(
'date', $versionMatrix[$minorVersion][
'releases'][$version])) {
291 throw new Exception\CoreVersionServiceException(
292 'Release date of version ' . $version .
' not found in version matrix. This is probably a bug on get.typo3.org',
296 $dateString = $versionMatrix[$minorVersion][
'releases'][$version][
'date'];
297 $date = new \DateTime($dateString);
298 return $date->getTimestamp();
310 if (!array_key_exists($minorVersion, $versionMatrix)) {
311 throw new Exception\CoreVersionServiceException(
312 'Minor release ' . $minorVersion .
' not found in version matrix.',
316 if (!array_key_exists($version, $versionMatrix[$minorVersion][
'releases'])) {
317 throw new Exception\CoreVersionServiceException(
318 'Patch level release ' . $version .
' not found in version matrix.',
isInstalledVersionAReleasedVersion()
getReleaseTimestampOfVersion($version)
ensureVersionExistsInMatrix($version)
isUpdateSecurityRelevant()
fetchVersionMatrixFromRemote()
isYoungerPatchReleaseAvailable()
getYoungestPatchDevelopmentRelease()
getYoungestPatchRelease()
getMinorVersion($version)
getTarGzSha1OfVersion($version)
if($list_of_literals) if(!empty($literals)) if(!empty($literals)) $result
Analyse literals to prepend the N char to them if their contents aren't numeric.
static getUrl($url, $includeHeader=0, $requestHeaders=FALSE, &$report=NULL)
static getCurrentTypo3Version()
getYoungestReleaseByType(array $types)
isYoungerPatchDevelopmentReleaseAvailable()
getInstalledMinorVersion()