Breaking: #108055 - Removed PageRenderer related hooks and methods
See forge#108055
Description
The removal of Frontend asset concatenation and compression as described in Breaking: #108055 - Removed Frontend Asset Concatenation and Compression has some impact on PHP API as well, mainly due to removed code.
The following methods have been removed:
\TYPO3\CMS\ Core\ Page\ Page Renderer->disable Concatenate Css () \TYPO3\CMS\ Core\ Page\ Page Renderer->enable Concatenate Css () \TYPO3\CMS\ Core\ Page\ Page Renderer->get Concatenate Css () \TYPO3\CMS\ Core\ Page\ Page Renderer->disable Compress Css () \TYPO3\CMS\ Core\ Page\ Page Renderer->enable Compress Css () \TYPO3\CMS\ Core\ Page\ Page Renderer->get Compress Css () \TYPO3\CMS\ Core\ Page\ Page Renderer->disable Concatenate Javascript () \TYPO3\CMS\ Core\ Page\ Page Renderer->enable Concatenate Javascript () \TYPO3\CMS\ Core\ Page\ Page Renderer->get Concatenate Javascript () \TYPO3\CMS\ Core\ Page\ Page Renderer->disable Compress Javascript () \TYPO3\CMS\ Core\ Page\ Page Renderer->enable Compress Javascript () \TYPO3\CMS\ Core\ Page\ Page Renderer->get Compress Javascript ()
The following global configuration registry points have been removed:
$GLOBALS['TYPO3_ CONF_ VARS'] ['FE'] ['css Concatenate Handler'] $GLOBALS['TYPO3_ CONF_ VARS'] ['FE'] ['css Compress Handler'] $GLOBALS['TYPO3_ CONF_ VARS'] ['FE'] ['js Concatenate Handler'] $GLOBALS['TYPO3_ CONF_ VARS'] ['FE'] ['js Compress Handler']
The following hook has been removed:
$GLOBALS['TYPO3_ CONF_ VARS'] ['SC_ OPTIONS'] ['t3lib/ class. t3lib_ div. php'] ['minify Java Script']
The following methods changed their signature:
\TYPO3\third argument unusedCMS\ Core\ Page\ Page Renderer->add Js Inline Code () \TYPO3\third argument unusedCMS\ Core\ Page\ Page Renderer->add Css Inline Block () \TYPO3\third and sixth argument unusedCMS\ Core\ Page\ Page Renderer->add Js File () \TYPO3\third argument unusedCMS\ Core\ Page\ Page Renderer->add Js Footer Inline Code () \TYPO3\third and sixth argument unusedCMS\ Core\ Page\ Page Renderer->add Js Footer File () \TYPO3\fourth and seventh argument unusedCMS\ Core\ Page\ Page Renderer->add Js Library () \TYPO3\fourth and seventh argument unusedCMS\ Core\ Page\ Page Renderer->add Js Footer Library () \TYPO3\fifth and eighth argument unusedCMS\ Core\ Page\ Page Renderer->add Css File () \TYPO3\fifth and eighth argument unusedCMS\ Core\ Page\ Page Renderer->add Css Library ()
Additionally, registered hooks for
$GLOBALS,
$GLOBALS
and
$GLOBALS
no longer receive the array keys
compress and
exclude in the data array keys
js,
js,
js,
css,
css and
css.
Impact
Calling above listed removed methods will raise PHP fatal errors, registrations for removed hooks are no longer executed, submitting ignored arguments has no impact anymore and hook consumers receive slightly different data from TYPO3 core due to removed TypoScript configuration values.
Affected installations
Instances with extensions dealing with low level asset manipulation may be affected. The extension scanner will find affected extensions when they call removed methods and hooks.
Migration
There is no direct one-to-one migration in this case.
In general, extensions must no longer expect existence of code related to TypoScript configuration options
config.,
config.,
config.,
config.,
resource property
disable and
resource property
exclude.
The removed hooks and "handlers" can be turned into listeners of
$GLOBALS,
$GLOBALS
and
$GLOBALS,
depending on their need. Existing hook registrations of these three should check if the implementations access
the array keys
compress and
exclude and avoid that. If really needed, affected code may need
to determine TypoScript options from the
$GLOBALS Request attribute
frontend.
directly. Another alternative is often to avoid the hook usages altogether by turning them into PSR-15 middlewares instead.