[!!!][TASK] Remove global variable PARSETIME_START 17/54517/3
authorBenni Mack <benni@typo3.org>
Wed, 1 Nov 2017 11:34:37 +0000 (12:34 +0100)
committerBenni Mack <benni@typo3.org>
Thu, 2 Nov 2017 04:50:46 +0000 (05:50 +0100)
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>
typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-82893-RemoveGlobalVariablePARSETIME_START.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Core/SystemEnvironmentBuilderTest.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/ArrayGlobalMatcher.php

index 1467d2c..aad03f5 100644 (file)
@@ -217,8 +217,6 @@ class SystemEnvironmentBuilder
      */
     protected static function initializeGlobalTimeTrackingVariables()
     {
      */
     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
         // 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 (file)
index 0000000..39d2186
--- /dev/null
@@ -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
index 92988a3..e0c7048 100644 (file)
@@ -143,7 +143,6 @@ class SystemEnvironmentBuilderTest extends \TYPO3\TestingFramework\Core\Unit\Uni
     public function initializeGlobalTimeTrackingVariablesSetsGlobalVariablesDataProvider()
     {
         return [
     public function initializeGlobalTimeTrackingVariablesSetsGlobalVariablesDataProvider()
     {
         return [
-            'PARSETIME_START' => ['PARSETIME_START'],
             'EXEC_TIME' => ['EXEC_TIME'],
             'ACCESS_TIME' => ['ACCESS_TIME'],
             'SIM_EXEC_TIME' => ['SIM_EXEC_TIME'],
             'EXEC_TIME' => ['EXEC_TIME'],
             'ACCESS_TIME' => ['ACCESS_TIME'],
             'SIM_EXEC_TIME' => ['SIM_EXEC_TIME'],
index 9915668..2409ec1 100644 (file)
@@ -10,4 +10,9 @@ return [
             'Breaking-37180-RemovedExtDirectDebugAndGLOBALSerror.rst',
         ],
     ],
             'Breaking-37180-RemovedExtDirectDebugAndGLOBALSerror.rst',
         ],
     ],
+    '$GLOBALS[\'PARSETIME_START\']' => [
+        'restFiles' => [
+            'Breaking-82893-RemoveGlobalVariablePARSETIME_START.rst'
+        ],
+    ],
 ];
 ];