Skip to content
Snippets Groups Projects
Commit 850e87f8 authored by Benjamin Franzke's avatar Benjamin Franzke Committed by Anja Leichsenring
Browse files

[BUGFIX] Update redefinition guard comments in SystemEnvironmentBuilder

These constant redefintion guards were forgotten to be updated when
Bootstrap::getInstance() and the call to SystemEnvironmentBuilder::run()
in Bootstrap::baseSetup() were removed.

These guards are no longer necessary for regular execution as baseSetup()
does no longer (conditionally) invoke SystemEnvironmentBuilder::run()
(which was provided for deprecated and now removed bootstrapping code).

We do still leave the guards in, as they are needed in unit tests,
but update the comments.

Releases: master
Resolves: #87216
Related: #87202
Change-Id: I3b1c60ea32163d68b7f314b6539c54d8c048c323
Reviewed-on: https://review.typo3.org/59214


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent 20e5c5bf
Branches
Tags
No related merge requests found
......@@ -109,7 +109,8 @@ class SystemEnvironmentBuilder
*/
protected static function defineBaseConstants()
{
// Check one of the constants and return early if defined already
// 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_version')) {
return;
}
......@@ -511,7 +512,9 @@ class SystemEnvironmentBuilder
*/
protected static function defineTypo3RequestTypes()
{
if (defined('TYPO3_REQUESTTYPE_FE')) { // @todo remove once Bootstrap::getInstance() is dropped
// 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_REQUESTTYPE_FE')) {
return;
}
define('TYPO3_REQUESTTYPE_FE', self::REQUESTTYPE_FE);
......@@ -528,7 +531,9 @@ class SystemEnvironmentBuilder
*/
protected static function setRequestType(int $requestType)
{
if (defined('TYPO3_REQUESTTYPE')) { // @todo remove once Bootstrap::getInstance() is dropped
// Return early if already defined,
// needed if multiple requests are handled in one process, for instance in functional testing.
if (defined('TYPO3_REQUESTTYPE')) {
return;
}
define('TYPO3_REQUESTTYPE', $requestType);
......@@ -541,7 +546,9 @@ class SystemEnvironmentBuilder
*/
protected static function defineLegacyConstants(string $mode)
{
if (defined('TYPO3_MODE')) { // @todo remove once Bootstrap::getInstance() is dropped
// Return early if already defined,
// needed if multiple requests are handled in one process, for instance in functional testing.
if (defined('TYPO3_MODE')) {
return;
}
define('TYPO3_MODE', $mode);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment