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 the PHP API as well, mainly due to removed code.
The following methods have been removed from the class
Page:
disableConcatenate Css () enableConcatenate Css () getConcatenate Css () disableCompress Css () enableCompress Css () getCompress Css () disableConcatenate Javascript () enableConcatenate Javascript () getConcatenate Javascript () disableCompress Javascript () enableCompress Javascript () getCompress 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 of
Page changed
their signature. The noted arguments are now unused:
add: third argument unusedJs Inline Code () add: third argument unusedCss Inline Block () add: third and sixth argument unusedJs File () add: third argument unusedJs Footer Inline Code () add: third and sixth argument unusedJs Footer File () add: fourth and seventh argument unusedJs Library () add: fourth and seventh argument unusedJs Footer Library () add: fifth and eighth argument unusedCss File () add: fifth and eighth argument unusedCss Library ()
Additionally, registered hooks for:
$GLOBALS['TYPO3_ CONF_ VARS'] ['SC_ OPTIONS'] ['t3lib/ class. t3lib_ pagerenderer. php'] ['render- pre Process'] $GLOBALS['TYPO3_ CONF_ VARS'] ['SC_ OPTIONS'] ['t3lib/ class. t3lib_ pagerenderer. php'] ['render- post Transform'] $GLOBALS['TYPO3_ CONF_ VARS'] ['SC_ OPTIONS'] ['t3lib/ class. t3lib_ pagerenderer. php'] ['render- post Process']
no longer receive the array keys
compress or
exclude inside the following data array keys:
jsFiles jsInline jsLibs cssFiles cssInline cssLibs
Impact
Calling any of the removed methods listed above will raise PHP fatal errors. Registrations for removed hooks are no longer executed. Submitting ignored arguments has no effect anymore, and hook consumers receive slightly different data from the 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 or hooks.
Migration
There is no direct one-to-one migration in this case.
In general, extensions must no longer expect the existence of code related to
the TypoScript configuration options
config.,
config.,
config.,
config., and the
resource properties
disable and
exclude.
The removed hooks and "handlers" can be turned into listeners of:
$GLOBALS['TYPO3_ CONF_ VARS'] ['SC_ OPTIONS'] ['t3lib/ class. t3lib_ pagerenderer. php'] ['render- pre Process'] $GLOBALS['TYPO3_ CONF_ VARS'] ['SC_ OPTIONS'] ['t3lib/ class. t3lib_ pagerenderer. php'] ['render- post Transform'] $GLOBALS['TYPO3_ CONF_ VARS'] ['SC_ OPTIONS'] ['t3lib/ class. t3lib_ pagerenderer. php'] ['render- post Process']
depending on their needs.
Existing hook registrations of these three should check whether the
implementations access the array keys
compress and
exclude and avoid doing so. If required, affected code
may need to determine TypoScript options from the
$GLOBALS
request attribute
frontend. directly.
Another alternative is to avoid hook usage altogether by turning the implementations into PSR-15 middlewares instead.