Commit e9a48989 authored by Alexander Schnitzler's avatar Alexander Schnitzler Committed by Benni Mack
Browse files

[TASK] Add final private constructor to GeneralUtility

GeneralUtility is a class with only static methods and
a class comment stated for years not to instantiate it.

Since there is a possibility to prevent instantiations
of classes with private constructors, one has added to
this class and on top is has been marked final.

Releases: master
Resolves: #91043
Change-Id: I15e2dfa98b2a30149f9f0efed31281d5d01d4efa

Reviewed-by: Oliver Klee's avatarOliver Klee <>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <>
Reviewed-by: Oliver Hader's avatarOliver Hader <>
Reviewed-by: Benni Mack's avatarBenni Mack <>
Tested-by: default avatarTYPO3com <>
Tested-by: Benni Mack's avatarBenni Mack <>
parent 7c7ec6e8
......@@ -39,8 +39,7 @@ use TYPO3\CMS\Core\SingletonInterface;
* You are encouraged to use this library in your own scripts!
* USE:
* The class is intended to be used without creating an instance of it.
* So: Don't instantiate - call functions with "\TYPO3\CMS\Core\Utility\GeneralUtility::" prefixed the function name.
* All methods in this class are meant to be called statically.
* So use \TYPO3\CMS\Core\Utility\GeneralUtility::[method-name] to refer to the functions, eg. '\TYPO3\CMS\Core\Utility\GeneralUtility::milliseconds()'
class GeneralUtility
......@@ -96,6 +95,10 @@ class GeneralUtility
protected static $indpEnvCache = [];
final private function __construct()
* GET/POST Variables
Supports Markdown
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