62 $value = $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_writable');
74 $sitePath .
'/typo3temp/' => 2,
75 $sitePath .
'/typo3temp/assets/' => 2,
76 $sitePath .
'/typo3temp/assets/compressed/' => 2,
78 $sitePath .
'/typo3temp/assets/images/' => 0,
80 $sitePath .
'/typo3temp/assets/css/' => 2,
81 $sitePath .
'/typo3temp/assets/js/' => 2,
83 $sitePath .
'/typo3temp/assets/_processed_/' => 0,
85 $varPath .
'/transient/' => 2,
86 $varPath .
'/charset/' => 2,
87 $varPath .
'/lock/' => 2,
88 $sitePath .
'/typo3conf/' => 2,
90 $sitePath .
'/' .
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'fileadminDir'] => -1,
91 $sitePath .
'/' .
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'fileadminDir'] .
'_temp_/' => 0,
97 if (
$GLOBALS[
'TYPO3_CONF_VARS'][
'EXT'][
'allowGlobalInstall']) {
102 foreach ($checkWritable as $path => $requirementLevel) {
103 $relPath = substr($path, strlen($rootPath) + 1);
104 if (!@is_dir($path)) {
106 GeneralUtility::mkdir($path);
108 if (!@is_dir($path)) {
109 if ($requirementLevel > 0) {
111 $value = $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_missingDirectory');
112 $message .= sprintf($languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_directoryDoesNotExistCouldNotCreate'), $relPath) .
'<br />';
115 $message .= sprintf($languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_directoryDoesNotExist'), $relPath);
116 if ($requirementLevel == 0) {
117 $message .=
' ' . $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_directoryShouldAlsoBeWritable');
119 $message .=
'<br />';
121 $value = $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_nonExistingDirectory');
126 if (!is_writable($path)) {
127 switch ($requirementLevel) {
130 $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_directoryShouldBeWritable'),
134 $value = $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_recommendedWritableDirectory');
139 $value = $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_requiredWritableDirectory');
141 $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_directoryMustBeWritable'),
151 return GeneralUtility::makeInstance(Status::class, $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_fileSystem'), $value, $message, $severity);
164 $upgradeWizardsService = GeneralUtility::makeInstance(UpgradeWizardsService::class);
165 $incompleteWizards = $upgradeWizardsService->getUpgradeWizardsList();
166 $incompleteWizards = array_filter(
169 return $wizard[
'shouldRenderWizard'];
172 return $incompleteWizards;
183 $value = $languageService->getLL(
'status_updateComplete');
187 $uriBuilder = GeneralUtility::makeInstance(\
TYPO3\CMS\Backend\Routing\UriBuilder::class);
190 if (count($incompleteWizards)) {
192 $value = $languageService->getLL(
'status_updateIncomplete');
194 $url = (string)$uriBuilder->buildUriFromRoute(
'tools_toolsupgrade');
195 $message = sprintf($languageService->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:warning.install_update'),
'<a href="' . htmlspecialchars($url) .
'">',
'</a>');
198 return GeneralUtility::makeInstance(Status::class, $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_remainingUpdates'), $value, $message, $severity);
210 $coreVersionService = GeneralUtility::makeInstance(\
TYPO3\CMS\Install\Service\CoreVersionService::class);
213 if (!$coreVersionService->isInstalledVersionAReleasedVersion()) {
214 return GeneralUtility::makeInstance(Status::class,
'TYPO3', TYPO3_version, $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_isDevelopmentVersion'),
Status::NOTICE);
218 $versionMaintenanceWindow = $coreVersionService->getMaintenanceWindow();
220 return GeneralUtility::makeInstance(
224 $languageService->sL(
225 'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_remoteFetchException'
231 if (!$versionMaintenanceWindow->isSupportedByCommunity() && !$versionMaintenanceWindow->isSupportedByElts()) {
233 $message = $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_versionOutdated');
240 $availableReleases = [];
241 $latestRelease = $coreVersionService->getYoungestPatchRelease();
242 $isCurrentVersionElts = $coreVersionService->isCurrentInstalledVersionElts();
244 if ($coreVersionService->isPatchReleaseSuitableForUpdate($latestRelease)) {
245 $availableReleases[] = $latestRelease;
248 if (!$versionMaintenanceWindow->isSupportedByCommunity()) {
249 if ($latestRelease->isElts()) {
250 $latestCommunityDrivenRelease = $coreVersionService->getYoungestCommunityPatchRelease();
251 if ($coreVersionService->isPatchReleaseSuitableForUpdate($latestCommunityDrivenRelease)) {
252 $availableReleases[] = $latestCommunityDrivenRelease;
254 } elseif (!$isCurrentVersionElts) {
260 $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_elts_information'),
262 '<a href="https://typo3.com/elts" target="_blank" rel="noopener">https://typo3.com/elts</a>'
268 if ($availableReleases !== []) {
271 foreach ($availableReleases as $availableRelease) {
272 $versionString = $availableRelease->getVersion();
273 if ($availableRelease->isElts()) {
274 $versionString .=
' ELTS';
276 if ($coreVersionService->isUpdateSecurityRelevant($availableRelease)) {
278 $updateMessage = sprintf($languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_newVersionSecurityRelevant'), $versionString);
280 $updateMessage = sprintf($languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_newVersion'), $versionString);
283 if ($availableRelease->isElts()) {
284 if ($isCurrentVersionElts) {
285 $updateMessage .=
' ' . sprintf(
286 $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_elts_download'),
287 '<a href="https://my.typo3.org" target="_blank" rel="noopener">my.typo3.org</a>'
290 $updateMessage .=
' ' . sprintf(
291 $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_elts_subscribe'),
292 $coreVersionService->getInstalledVersion(),
293 '<a href="https://typo3.com/elts" target="_blank" rel="noopener">https://typo3.com/elts</a>'
297 $messages[] = $updateMessage;
299 $message = $this->
wrapList($messages, count($messages) > 1 ? self::WRAP_NESTED : self::WRAP_FLAT);
303 return GeneralUtility::makeInstance(Status::class,
'TYPO3', TYPO3_version, $message, $status);
306 protected function wrapList(array $items,
int $style): string
308 if (!$this->useMarkup) {
309 return implode(
', ', $items);
311 if ($style === self::WRAP_NESTED) {
314 implode(
'', $this->
wrapItems($items,
'<li>',
'</li>'))
319 implode(
'', $this->
wrapItems($items,
'<br>',
''))
323 protected function wrapItems(array $items,
string $before,
string $after): array
326 static function (
string $item) use ($before, $after):
string {
327 return $before . $item . $after;