1.. include:: ../../Includes.txt
2
3=====================================================================
4Breaking: #91563 - PHP-based JS + CSS inclusions for Frontend removed
5=====================================================================
6
7See :issue:`91563`
8
9Description
10===========
11
12In the past, TYPO3's :php:`TSFE` object allowed to manually add CSS or JavaScript snippets via PHP code with the following method and properties:
13
14* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->setJS()`
15* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->additionalJavaScript`
16* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->additionalCSS`
17* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->JSCode`
18* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->inlineJS`
19
20These have been removed due to better APIs like :php:`PageRenderer` (available since TYPO3 v4.5) and :php:`AssetCollector` (available since TYPO3 v10).
21
22
23Impact
24======
25
26Accessing the method and properties will have no effect and trigger PHP errors.
27
28
29Affected Installations
30======================
31
32TYPO3 installations with custom extensions using this functionality directly to inject custom CSS or JavaScript.
33
34
35Migration
36=========
37
38Use the :php:`AssetCollector` API in PHP to add JavaScript and CSS code or use files directly.
39
40.. index:: PHP-API, FullyScanned, ext:frontend
41