From de36c80821a466f7dd00a9a5897e2943c5e2b981 Mon Sep 17 00:00:00 2001 From: Benni Mack <benni@typo3.org> Date: Wed, 1 Nov 2017 12:34:37 +0100 Subject: [PATCH] [!!!][TASK] Remove global variable PARSETIME_START The global variable $GLOBALS['PARSETIME_START'] is removed, as it has been superseded by $GLOBALS['TYPO3_MISC']['microtime_start'] for a long time already. Resolves: #82893 Releases: master Change-Id: Ic738ebb1ae4dd19aff426fcd32b8f7a3594ca2e4 Reviewed-on: https://review.typo3.org/54517 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl> Tested-by: Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by: Benni Mack <benni@typo3.org> Tested-by: Benni Mack <benni@typo3.org> --- .../Classes/Core/SystemEnvironmentBuilder.php | 2 -- ...93-RemoveGlobalVariablePARSETIME_START.rst | 34 +++++++++++++++++++ .../Core/SystemEnvironmentBuilderTest.php | 1 - .../Php/ArrayGlobalMatcher.php | 5 +++ 4 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 typo3/sysext/core/Documentation/Changelog/master/Breaking-82893-RemoveGlobalVariablePARSETIME_START.rst diff --git a/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php b/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php index 1467d2c7a20f..aad03f5e9523 100644 --- a/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php +++ b/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php @@ -217,8 +217,6 @@ class SystemEnvironmentBuilder */ protected static function initializeGlobalTimeTrackingVariables() { - // Set PARSETIME_START to the system time in milliseconds. - $GLOBALS['PARSETIME_START'] = GeneralUtility::milliseconds(); // Microtime of (nearly) script start $GLOBALS['TYPO3_MISC']['microtime_start'] = microtime(true); // EXEC_TIME is set so that the rest of the script has a common value for the script execution time diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-82893-RemoveGlobalVariablePARSETIME_START.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-82893-RemoveGlobalVariablePARSETIME_START.rst new file mode 100644 index 000000000000..39d21862e0d6 --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Breaking-82893-RemoveGlobalVariablePARSETIME_START.rst @@ -0,0 +1,34 @@ +.. include:: ../../Includes.txt + +========================================================= +Breaking: #82893 - Remove global variable PARSETIME_START +========================================================= + +See :issue:`82893` + +Description +=========== + +The global variable $GLOBALS['PARSETIME_START'] can be removed, as it has been superseded by +$GLOBALS['TYPO3_MISC']['microtime_start'] for a long time already. + + +Impact +====== + +The variable is not available any more. If it is used it must be replaced (see Migration). + + +Affected Installations +====================== + +Installations that use the global variable $GLOBALS['PARSETIME_START']. + + +Migration +========= + +Use :php:`round($GLOBALS['TYPO3_MISC']['microtime_start'] * 1000)` if you need the same value as +:php:`$GLOBALS['PARSETIME_START']` previously contained. + +.. index:: Frontend, FullyScanned \ No newline at end of file diff --git a/typo3/sysext/core/Tests/Unit/Core/SystemEnvironmentBuilderTest.php b/typo3/sysext/core/Tests/Unit/Core/SystemEnvironmentBuilderTest.php index 92988a39f017..e0c7048c87fd 100644 --- a/typo3/sysext/core/Tests/Unit/Core/SystemEnvironmentBuilderTest.php +++ b/typo3/sysext/core/Tests/Unit/Core/SystemEnvironmentBuilderTest.php @@ -143,7 +143,6 @@ class SystemEnvironmentBuilderTest extends \TYPO3\TestingFramework\Core\Unit\Uni public function initializeGlobalTimeTrackingVariablesSetsGlobalVariablesDataProvider() { return [ - 'PARSETIME_START' => ['PARSETIME_START'], 'EXEC_TIME' => ['EXEC_TIME'], 'ACCESS_TIME' => ['ACCESS_TIME'], 'SIM_EXEC_TIME' => ['SIM_EXEC_TIME'], diff --git a/typo3/sysext/install/Configuration/ExtensionScanner/Php/ArrayGlobalMatcher.php b/typo3/sysext/install/Configuration/ExtensionScanner/Php/ArrayGlobalMatcher.php index 99156681d351..2409ec1ebadf 100644 --- a/typo3/sysext/install/Configuration/ExtensionScanner/Php/ArrayGlobalMatcher.php +++ b/typo3/sysext/install/Configuration/ExtensionScanner/Php/ArrayGlobalMatcher.php @@ -10,4 +10,9 @@ return [ 'Breaking-37180-RemovedExtDirectDebugAndGLOBALSerror.rst', ], ], + '$GLOBALS[\'PARSETIME_START\']' => [ + 'restFiles' => [ + 'Breaking-82893-RemoveGlobalVariablePARSETIME_START.rst' + ], + ], ]; -- GitLab