Breaking: #91563 - PHP-based JS + CSS inclusions for Frontend removed
See forge#91563
Description
In the past, TYPO3's TSFE
object allowed to manually add CSS or JavaScript snippets via PHP code with the following method and properties:
TYPO3\
CMS\ Frontend\ Controller\ Typo Script Frontend Controller->set JS () TYPO3\
CMS\ Frontend\ Controller\ Typo Script Frontend Controller->additional Java Script TYPO3\
CMS\ Frontend\ Controller\ Typo Script Frontend Controller->additional CSS TYPO3\
CMS\ Frontend\ Controller\ Typo Script Frontend Controller->JSCode TYPO3\
CMS\ Frontend\ Controller\ Typo Script Frontend Controller->inline JS
These have been removed due to better APIs like Page
(available since TYPO3 v4.5) and Asset
(available since TYPO3 v10).
Impact
Accessing the method and properties will have no effect and trigger PHP errors.
Affected Installations
TYPO3 installations with custom extensions using this functionality directly to inject custom CSS or JavaScript.
Migration
Use the Asset
API in PHP to add JavaScript and CSS code or use files directly.