Commit 39abe760 authored by Benni Mack's avatar Benni Mack Committed by Georg Ringer
Browse files

[TASK] Move constant declaration to class constants

Using Class constants instead of constants that are defined during
runtime has the following benefits:

- Naming can be made more consistent (and separated)
- Speeding up requests where the constants are not needed
- Benefit from Opcaching of class loading instead of dynamic runtime definition
- Testing framework has less "bootstrap" to do

This affects the following constants:
- TYPO3_copyright_year
- TYPO3_URL_GENERAL
- TYPO3_URL_LICENSE
- TYPO3_URL_EXCEPTION
- TYPO3_URL_DONATE
- TYPO3_URL_WIKI_OPCODECACHE

The constants are now deprecated.

In addition, the "Typo3Copyright" class is now called "TYPO3Information".

Resolves: #89866
Releases: master
Change-Id: I607c90cb281179bda9875504d258daefd3471868
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62624


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
parent 34650245
......@@ -18,7 +18,7 @@ use Psr\Http\Message\ResponseInterface;
use TYPO3\CMS\Backend\Module\ModuleLoader;
use TYPO3\CMS\Backend\Template\ModuleTemplate;
use TYPO3\CMS\Core\Http\HtmlResponse;
use TYPO3\CMS\Core\Information\Typo3Copyright;
use TYPO3\CMS\Core\Information\Typo3Information;
use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Core\Package\PackageManager;
use TYPO3\CMS\Core\Utility\GeneralUtility;
......@@ -49,15 +49,16 @@ class AboutController
* @var Typo3Version
*/
protected $version;
/**
* @var \TYPO3\CMS\Core\Information\Typo3Copyright
* @var Typo3Information
*/
private $copyright;
protected $typo3Information;
public function __construct(Typo3Version $version, Typo3Copyright $copyright)
public function __construct(Typo3Version $version, Typo3Information $typo3Information)
{
$this->version = $version;
$this->copyright = $copyright;
$this->typo3Information = $typo3Information;
}
/**
......@@ -79,11 +80,11 @@ class AboutController
}
$this->view->assignMultiple([
'copyrightYear' => $this->copyright->getCopyrightYear(),
'donationUrl' => TYPO3_URL_DONATE,
'copyrightYear' => $this->typo3Information->getCopyrightYear(),
'donationUrl' => $this->typo3Information::URL_DONATE,
'currentVersion' => $this->version->getVersion(),
'loadedExtensions' => $this->getLoadedExtensions(),
'copyRightNotice' => $this->copyright->getCopyrightNotice(),
'copyRightNotice' => $this->typo3Information->getCopyrightNotice(),
'warnings' => $warnings,
'modules' => $this->getModulesData()
]);
......
......@@ -24,7 +24,7 @@ use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Http\HtmlResponse;
use TYPO3\CMS\Core\Http\RedirectResponse;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Information\Typo3Copyright;
use TYPO3\CMS\Core\Information\Typo3Information;
use TYPO3\CMS\Core\Localization\LanguageService;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\View\StandaloneView;
......@@ -56,21 +56,22 @@ class HelpController
/** @var ViewInterface */
protected $view;
/**
* @var Typo3Copyright
* @var Typo3Information
*/
private $copyright;
protected $typo3Information;
/**
* Instantiate the report controller
*
* @param Typo3Copyright $copyright
* @param Typo3Information $typo3Information
*/
public function __construct(Typo3Copyright $copyright)
public function __construct(Typo3Information $typo3Information)
{
$this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
$this->tableManualRepository = GeneralUtility::makeInstance(TableManualRepository::class);
$this->copyright = $copyright;
$this->typo3Information = $typo3Information;
}
/**
......@@ -117,7 +118,7 @@ class HelpController
$this->view->setPartialRootPaths(['EXT:backend/Resources/Private/Partials']);
$this->view->setLayoutRootPaths(['EXT:backend/Resources/Private/Layouts']);
$this->view->getRequest()->setControllerExtensionName('Backend');
$this->view->assign('copyright', $this->copyright->getCopyrightNotice());
$this->view->assign('copyright', $this->typo3Information->getCopyrightNotice());
}
/**
......
......@@ -31,7 +31,7 @@ use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\FormProtection\BackendFormProtection;
use TYPO3\CMS\Core\FormProtection\FormProtectionFactory;
use TYPO3\CMS\Core\Http\HtmlResponse;
use TYPO3\CMS\Core\Information\Typo3Copyright;
use TYPO3\CMS\Core\Information\Typo3Information;
use TYPO3\CMS\Core\Localization\LanguageService;
use TYPO3\CMS\Core\Localization\Locales;
use TYPO3\CMS\Core\Page\PageRenderer;
......@@ -105,14 +105,14 @@ class LoginController implements LoggerAwareInterface
protected $eventDispatcher;
/**
* @var Typo3Copyright
* @var Typo3Information
*/
private $copyright;
private $typo3Information;
public function __construct(Typo3Copyright $copyright, EventDispatcherInterface $eventDispatcher)
public function __construct(Typo3Information $typo3Information, EventDispatcherInterface $eventDispatcher)
{
$this->typo3Information = $typo3Information;
$this->eventDispatcher = $eventDispatcher;
$this->copyright = $copyright;
}
/**
......@@ -293,7 +293,7 @@ class LoginController implements LoggerAwareInterface
'capslock' => $this->getUriForFileName('EXT:backend/Resources/Public/Images/icon_capslock.svg'),
'typo3' => $this->getUriForFileName('EXT:backend/Resources/Public/Images/typo3_orange.svg'),
],
'copyright' => $this->copyright->getCopyrightNotice(),
'copyright' => $this->typo3Information->getCopyrightNotice(),
'redirectUrl' => $this->redirectUrl,
'loginRefresh' => $this->loginRefresh,
'loginNewsItems' => $this->getSystemNews(),
......
......@@ -23,6 +23,7 @@ use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Information\Typo3Information;
use TYPO3\CMS\Core\Localization\LanguageService;
use TYPO3\CMS\Core\Page\PageRenderer;
use TYPO3\CMS\Core\Service\MarkerBasedTemplateService;
......@@ -630,7 +631,7 @@ function jumpToUrl(URL) {
*/
public function generator()
{
return 'TYPO3 CMS, ' . TYPO3_URL_GENERAL . ', &#169; Kasper Sk&#229;rh&#248;j ' . TYPO3_copyright_year . ', extensions are copyright of their respective owners.';
return GeneralUtility::makeInstance(Typo3Information::class)->getHtmlGeneratorTagContent();
}
/*****************************************
......
......@@ -39,7 +39,7 @@ use TYPO3\CMS\Core\Http\Uri;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection;
use TYPO3\CMS\Core\Information\Typo3Copyright;
use TYPO3\CMS\Core\Information\Typo3Information;
use TYPO3\CMS\Core\Localization\LanguageService;
use TYPO3\CMS\Core\Log\LogManager;
use TYPO3\CMS\Core\Resource\ProcessedFile;
......@@ -3824,8 +3824,8 @@ class BackendUtility
*/
public static function TYPO3_copyRightNotice()
{
trigger_error('BackendUtility::TYPO3_copyRightNotice() will be removed in TYPO3 v11.0, use the Typo3Copyright PHP class instead.', E_USER_DEPRECATED);
$copyrightGenerator = GeneralUtility::makeInstance(Typo3Copyright::class, static::getLanguageService());
trigger_error('BackendUtility::TYPO3_copyRightNotice() will be removed in TYPO3 v11.0, use the Typo3Information PHP class instead.', E_USER_DEPRECATED);
$copyrightGenerator = GeneralUtility::makeInstance(Typo3Information::class, static::getLanguageService());
return $copyrightGenerator->getCopyrightNotice();
}
......
......@@ -16,6 +16,7 @@ namespace TYPO3\CMS\Core\Controller;
*/
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Information\Typo3Information;
use TYPO3\CMS\Core\Messaging\AbstractMessage;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\PathUtility;
......@@ -79,11 +80,11 @@ class ErrorPageController
$this->view->assign('severity', $this->severity);
$this->view->assign('message', $message);
$this->view->assign('title', $title);
$this->view->assign('errorCodeUrlPrefix', TYPO3_URL_EXCEPTION);
$this->view->assign('errorCodeUrlPrefix', Typo3Information::URL_EXCEPTION);
$this->view->assign('errorCode', $errorCode);
$this->view->assign('logo', PathUtility::getAbsoluteWebPath(Environment::getFrameworkBasePath() . '/backend/Resources/Public/Images/typo3_orange.svg'));
$this->view->assign('cssFile', PathUtility::getAbsoluteWebPath(Environment::getFrameworkBasePath() . '/core/Resources/Public/Css/errorpage.css'));
$this->view->assign('copyrightYear', TYPO3_copyright_year);
$this->view->assign('copyrightYear', GeneralUtility::makeInstance(Typo3Information::class)->getCopyrightYear());
return $this->view->render();
}
}
......@@ -100,19 +100,10 @@ class SystemEnvironmentBuilder
{
// Check one of the constants and return early if already defined,
// needed if multiple requests are handled in one process, for instance in functional testing.
if (defined('TYPO3_copyright_year')) {
if (defined('FILE_DENY_PATTERN_DEFAULT')) {
return;
}
define('TYPO3_copyright_year', '1998-' . date('Y'));
// TYPO3 external links
define('TYPO3_URL_GENERAL', 'https://typo3.org/');
define('TYPO3_URL_LICENSE', 'https://typo3.org/typo3-cms/overview/licenses/');
define('TYPO3_URL_EXCEPTION', 'https://typo3.org/go/exception/CMS/');
define('TYPO3_URL_DONATE', 'https://typo3.org/community/contribute/donate/');
define('TYPO3_URL_WIKI_OPCODECACHE', 'https://wiki.typo3.org/Opcode_Cache');
// A linefeed, a carriage return, a CR-LF combination
defined('LF') ?: define('LF', chr(10));
defined('CR') ?: define('CR', chr(13));
......@@ -127,6 +118,31 @@ class SystemEnvironmentBuilder
if (!defined('TYPO3_mainDir')) {
define('TYPO3_mainDir', 'typo3/');
}
/**
* @deprecated use Typo3Information class to retrieve this information, will be removed in TYPO3 v11.0
*/
define('TYPO3_copyright_year', '1998-' . date('Y'));
/**
* @deprecated use Typo3Information class to retrieve this information, will be removed in TYPO3 v11.0
*/
define('TYPO3_URL_GENERAL', 'https://typo3.org/');
/**
* @deprecated use Typo3Information class to retrieve this information, will be removed in TYPO3 v11.0
*/
define('TYPO3_URL_LICENSE', 'https://typo3.org/typo3-cms/overview/licenses/');
/**
* @deprecated use Typo3Information class to retrieve this information, will be removed in TYPO3 v11.0
*/
define('TYPO3_URL_EXCEPTION', 'https://typo3.org/go/exception/CMS/');
/**
* @deprecated use Typo3Information class to retrieve this information, will be removed in TYPO3 v11.0
*/
define('TYPO3_URL_DONATE', 'https://typo3.org/community/contribute/donate/');
/**
* @deprecated use Typo3Information class to retrieve this information, will be removed in TYPO3 v11.0
*/
define('TYPO3_URL_WIKI_OPCODECACHE', 'https://wiki.typo3.org/Opcode_Cache');
}
/**
......
......@@ -15,6 +15,8 @@ namespace TYPO3\CMS\Core\Error;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Core\Information\Typo3Information;
/**
* A basic but solid exception handler which catches everything which
* falls through the other exception handlers and provides useful debugging
......@@ -95,7 +97,7 @@ HTML;
$exceptionInfo = '';
if ($throwable->getCode() > 0) {
$wikiLink = TYPO3_URL_EXCEPTION . 'debug/' . $throwable->getCode();
$wikiLink = Typo3Information::URL_EXCEPTION . 'debug/' . $throwable->getCode();
$exceptionInfo = <<<INFO
<div class="container">
<div class="callout">
......
......@@ -15,13 +15,20 @@ namespace TYPO3\CMS\Core\Information;
* The TYPO3 project - inspiring people to share!
*/
use Psr\Http\Message\UriInterface;
use TYPO3\CMS\Core\Http\Uri;
use TYPO3\CMS\Core\Localization\LanguageService;
use TYPO3\CMS\Core\Utility\GeneralUtility;
class Typo3Copyright
/**
* Contains information and links, or copyright information for the project.
*/
class Typo3Information
{
public const URL_COMMUNITY = 'https://typo3.org/';
public const URL_LICENSE = 'https://typo3.org/typo3-cms/overview/licenses/';
public const URL_EXCEPTION = 'https://typo3.org/go/exception/CMS/';
public const URL_DONATE = 'https://typo3.org/community/contribute/donate/';
public const URL_OPCACHE = 'https://wiki.typo3.org/Opcode_Cache';
/**
* @var LanguageService
*/
......@@ -41,17 +48,31 @@ class Typo3Copyright
public function getCopyrightYear(): string
{
return TYPO3_copyright_year;
return '1998-' . date('Y');
}
public function getCommunityWebsiteUrl(): UriInterface
/**
* Used for any backend rendering in the <meta generator> tag when rendering HTML.
*
* @return string
*/
public function getHtmlGeneratorTagContent(): string
{
return new Uri(TYPO3_URL_GENERAL);
return 'TYPO3 CMS, ' . static::URL_COMMUNITY . ', &#169; Kasper Sk&#229;rh&#248;j ' . $this->getCopyrightYear() . ', extensions are copyright of their respective owners.';
}
public function getLicenseUrl(): UriInterface
/**
* Used for any frontend rendering in the <head> tag when rendering HTML.
*
* @return string
*/
public function getInlineHeaderComment(): string
{
return new Uri(TYPO3_URL_LICENSE);
return ' This website is powered by TYPO3 - inspiring people to share!
TYPO3 is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.
TYPO3 is copyright ' . $this->getCopyrightYear() . ' of Kasper Skaarhoj. Extensions are copyright of their respective owners.
Information and contribution at ' . static::URL_COMMUNITY . '
';
}
/**
......@@ -82,23 +103,23 @@ class Typo3Copyright
} else {
$warrantyNote = sprintf(
$this->languageService->sL('LLL:EXT:backend/Resources/Private/Language/locallang_login.xlf:no.warranty'),
'<a href="' . htmlspecialchars((string)$this->getLicenseUrl()) . '" target="_blank" rel="noreferrer">',
'<a href="' . htmlspecialchars(static::URL_LICENSE) . '" target="_blank" rel="noreferrer">',
'</a>'
);
}
return '<a href="' . htmlspecialchars((string)$this->getCommunityWebsiteUrl()) . '" target="_blank" rel="noreferrer">' .
return '<a href="' . htmlspecialchars(static::URL_COMMUNITY) . '" target="_blank" rel="noreferrer">' .
$this->languageService->sL('LLL:EXT:backend/Resources/Private/Language/locallang_login.xlf:typo3.cms') . '</a>. ' .
$this->languageService->sL('LLL:EXT:backend/Resources/Private/Language/locallang_login.xlf:copyright') . ' &copy; '
. htmlspecialchars($this->getCopyrightYear()) . ' Kasper Sk&aring;rh&oslash;j. ' .
$this->languageService->sL('LLL:EXT:backend/Resources/Private/Language/locallang_login.xlf:extension.copyright') . ' ' .
sprintf(
$this->languageService->sL('LLL:EXT:backend/Resources/Private/Language/locallang_login.xlf:details.link'),
'<a href="' . htmlspecialchars((string)$this->getCommunityWebsiteUrl()) . '" target="_blank" rel="noreferrer">' . htmlspecialchars((string)$this->getCommunityWebsiteUrl()) . '</a>'
'<a href="' . htmlspecialchars(static::URL_COMMUNITY) . '" target="_blank" rel="noreferrer">' . htmlspecialchars(static::URL_COMMUNITY) . '</a>'
) . ' ' .
strip_tags($warrantyNote, '<a>') . ' ' .
sprintf(
$this->languageService->sL('LLL:EXT:backend/Resources/Private/Language/locallang_login.xlf:free.software'),
'<a href="' . htmlspecialchars((string)$this->getLicenseUrl()) . '" target="_blank" rel="noreferrer">',
'<a href="' . htmlspecialchars(static::URL_LICENSE) . '" target="_blank" rel="noreferrer">',
'</a> '
)
. $this->languageService->sL('LLL:EXT:backend/Resources/Private/Language/locallang_login.xlf:keep.notice');
......
......@@ -11,7 +11,7 @@ Description
The PHP method :php:`TYPO3\CMS\Backend\Utility\BackendUtility::TYPO3_copyRightNotice` that is
used to display information about the warranty and copyright of the product, e.g. used in the
login screen, has been superseded by a new API :php:`TYPO3\CMS\Core\Information\Typo3Copyright`.
login screen, has been superseded by a new API :php:`TYPO3\CMS\Core\Information\Typo3Information`.
The existing static method has been marked as deprecated.
......@@ -34,6 +34,6 @@ if you are affected.
Migration
=========
Use the new :php:`Typo3Copyright` PHP class, and its method :php:`getCopyrightNotice()` which will return the same output.
Use the new :php:`Typo3Information` PHP class, and its method :php:`getCopyrightNotice()` which will return the same output.
.. index:: PHP-API, FullyScanned, ext:backend
.. include:: ../../Includes.txt
================================================================
Deprecation: #89866 - Global TYPO3-information related constants
================================================================
See :issue:`89866`
Description
===========
The following global constants, which are initialized at the very
beginning of each TYPO3-related PHP process, have been deprecated:
* :php:`TYPO3_copyright_year`
* :php:`TYPO3_URL_GENERAL`
* :php:`TYPO3_URL_LICENSE`
* :php:`TYPO3_URL_EXCEPTION`
* :php:`TYPO3_URL_DONATE`
* :php:`TYPO3_URL_WIKI_OPCODECACHE`
They have been migrated to the PHP class :php:`TYPO3\CMS\Core\Information\Typo3Information`
in order to benefit from opcaching, and to exactly reference when they are used
and where they are used throughout TYPO3.
This allows for further optimizations during the Bootstrap process and in our
testing suites.
In addition, the new PHP class encapsulates all global TYPO3-information and
community-wide information in one place.
Impact
======
No :php:`E_USER_DEPRECATED` error is triggered, however the constants will work during
TYPO3 v10, and be removed with TYPO3 v11.
Affected Installations
======================
Any TYPO3 installation with a custom extension that uses these
constants directly, which is highly unlikely.
Migration
=========
Use the public class constants or the public methods of the
new PHP class :php:`TYPO3\CMS\Core\Information\Typo3Information` directly.
.. index:: PHP-API, FullyScanned, ext:core
......@@ -21,6 +21,8 @@ use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
*/
class ProductionExceptionHandlerTest extends UnitTestCase
{
protected $resetSingletonInstances = true;
/**
* @var \TYPO3\CMS\Core\Error\ProductionExceptionHandler|\PHPUnit\Framework\MockObject\MockObject
*/
......
......@@ -23,6 +23,7 @@ use Psr\Http\Server\RequestHandlerInterface;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Http\NullResponse;
use TYPO3\CMS\Core\Http\Response;
use TYPO3\CMS\Core\Information\Typo3Information;
use TYPO3\CMS\Core\Page\PageRenderer;
use TYPO3\CMS\Core\Site\Entity\SiteLanguage;
use TYPO3\CMS\Core\TimeTracker\TimeTracker;
......@@ -374,11 +375,7 @@ class RequestHandler implements RequestHandlerInterface
$pageRenderer->setHeadTag($headTag);
// Setting charset meta tag:
$pageRenderer->setCharSet($theCharset);
$pageRenderer->addInlineComment(' This website is powered by TYPO3 - inspiring people to share!
TYPO3 is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.
TYPO3 is copyright ' . TYPO3_copyright_year . ' of Kasper Skaarhoj. Extensions are copyright of their respective owners.
Information and contribution at ' . TYPO3_URL_GENERAL . '
');
$pageRenderer->addInlineComment(GeneralUtility::makeInstance(Typo3Information::class)->getInlineHeaderComment());
if ($controller->baseUrl) {
$pageRenderer->setBaseUrl($controller->baseUrl);
}
......
......@@ -24,6 +24,8 @@ use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
*/
class ErrorControllerTest extends UnitTestCase
{
protected $resetSingletonInstances = true;
/**
* @test
*/
......
......@@ -36,6 +36,8 @@ use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
*/
class RequestHandlerTest extends UnitTestCase
{
protected $resetSingletonInstances = true;
public function generateHtmlTagIncludesAllPossibilitiesDataProvider()
{
return [
......
......@@ -32,8 +32,10 @@ use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
class PageArgumentValidatorTest extends UnitTestCase
{
protected $resetSingletonInstances = true;
/**
* @var CacheHashCaluclator
* @var CacheHashCalculator
*/
protected $cacheHashCalculator;
......@@ -56,7 +58,7 @@ class PageArgumentValidatorTest extends UnitTestCase
{
parent::setUp();
$this->timeTrackerStub = new TimeTracker(false);
$this->cacheHashCalculator = new CacheHashCalculator;
$this->cacheHashCalculator = new CacheHashCalculator();
// A request handler which only runs through
$this->responseOutputHandler = new class implements RequestHandlerInterface {
......
......@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Install\SystemEnvironment;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Core\Information\Typo3Information;
use TYPO3\CMS\Core\Messaging\FlashMessage;
use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
......@@ -609,7 +610,7 @@ class Check implements CheckInterface
. '* The PHP extension eaccelerator is known to break this if'
. ' it is compiled without --with-eaccelerator-doc-comment-inclusion flag.'
. ' This compile flag must be specified, otherwise TYPO3 CMS will not work.' . LF
. 'For more information take a look in our wiki ' . TYPO3_URL_WIKI_OPCODECACHE . '.',
. 'For more information take a look in our wiki ' . Typo3Information::URL_OPCACHE . '.',
'PHP Doc comment reflection broken',
FlashMessage::ERROR
));
......
......@@ -15,6 +15,7 @@ namespace TYPO3\CMS\Install\SystemEnvironment;
*/
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Information\Typo3Information;
use TYPO3\CMS\Core\Messaging\FlashMessage;
use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
use TYPO3\CMS\Core\Service\OpcodeCacheService;
......@@ -192,7 +193,7 @@ class SetupCheck implements CheckInterface
protected function checkSomePhpOpcodeCacheIsLoaded()
{
// Link to our wiki page, so we can update opcode cache issue information independent of TYPO3 CMS releases.
$wikiLink = 'For more information take a look in our wiki ' . TYPO3_URL_WIKI_OPCODECACHE . '.';
$wikiLink = 'For more information take a look in our wiki ' . Typo3Information::URL_OPCACHE . '.';
$opcodeCaches = GeneralUtility::makeInstance(OpcodeCacheService::class)->getAllActive();
if (empty($opcodeCaches)) {
// Set status to notice. It needs to be notice so email won't be triggered.
......
......@@ -190,4 +190,34 @@ return [
'Deprecation-90007-GlobalConstantsTYPO3_versionAndTYPO3_branch.rst'
]
],
'TYPO3_copyright_year' => [
'restFiles' => [
'Deprecation-89866-Global-TYPO3-information-related-constants.rst'
]
],
'TYPO3_URL_GENERAL' => [
'restFiles' => [
'Deprecation-89866-Global-TYPO3-information-related-constants.rst'
]
],
'TYPO3_URL_LICENSE' => [
'restFiles' => [
'Deprecation-89866-Global-TYPO3-information-related-constants.rst'
]
],
'TYPO3_URL_EXCEPTION' => [
'restFiles' => [
'Deprecation-89866-Global-TYPO3-information-related-constants.rst'
]
],
'TYPO3_URL_DONATE' => [
'restFiles' => [
'Deprecation-89866-Global-TYPO3-information-related-constants.rst'
]
],
'TYPO3_URL_WIKI_OPCODECACHE' => [
'restFiles' => [
'Deprecation-89866-Global-TYPO3-information-related-constants.rst'
]
],
];
......@@ -23,6 +23,7 @@ use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Exception\SiteNotFoundException;
use TYPO3\CMS\Core\Http\HtmlResponse;
use TYPO3\CMS\Core\Information\Typo3Information;
use TYPO3\CMS\Core\Routing\InvalidRouteArgumentsException;
use TYPO3\CMS\Core\Routing\UnableToLinkToPageException;
use TYPO3\CMS\Core\Site\SiteFinder;
......@@ -187,7 +188,7 @@ class PreviewController
$this->moduleTemplate->getPageRenderer()->addInlineSetting('Workspaces', 'id', $this->pageId);
$this->view->assignMultiple([
'logoLink' => TYPO3_URL_GENERAL,
'logoLink' => Typo3Information::URL_COMMUNITY,
'liveUrl' => $liveUrl ?? false,
'wsUrl' => $wsUrl,
'wsSettingsUrl' => $wsSettingsUrl,
......
Supports Markdown
0% or .