Bug #91184
closedHook minifyJavaScript triggers deprecated warning
100%
Description
When using the Hook `minifyJavaScript`, you will get a Deprecated Warning in TYPO3 v10:
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['minifyJavaScript'][] = \Example\Extension\Hooks\JavascriptOptimization::class . '->jsMinify';
This happens because GeneralUtility::minifyJavaScript
calls the callUserFunction
method with as third parameter:
$fakeThis = false;
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['minifyJavaScript'] ?? [] as $hookMethod) {
try {
$parameters = ['script' => $script];
$script = static::callUserFunction($hookMethod, $parameters, $fakeThis);
which triggers the deprecation:
GeneralUtility.php#L3306
Updated by Gerrit Code Review over 4 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64415
Updated by Georg Ringer over 4 years ago
- Related to Task #90377: Deprecate $ref param types of method callUserFunction added
Updated by Gerrit Code Review over 4 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64415
Updated by Gerrit Code Review over 4 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64415
Updated by Georg Ringer over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d77b3a45e4d220a09d6d0dacae89fe047020f708.