Deprecation: #100237 - TypoScript-related exceptions
See forge#100237
Description
Two exception classes related to the TypoScript condition matching logic have been marked as deprecated in TYPO3 v12 and will be removed in v13:
\TYPO3\
CMS\ Core\ Exception\ Missing Tsfe Exception \TYPO3\
CMS\ Core\ Configuration\ Typo Script\ Exception\ Invalid Typo Script Condition Exception
Impact
Both exceptions should have been marked @internal
within the core, but
were not.
The exception \TYPO3\
was an internal
communication class and was caught internally, the use case was solved in a more
simple way avoiding the exception.
The exception \TYPO3\
was related to conditions which triggered a warning within the symfony expression language. Those were
turned into this exception in TYPO3 v11. In TYPO3 v12, the original exception will bubble up, forcing
developers to fix the broken Symfony condition syntax.
Affected installations
Third-party extensions most likely neither throw nor catch these exceptions, the extension scanner will find possible usages.
Migration
No direct migration available.
Note
Using the get
function, developers have to ensure
that "TSFE" is available before accessing its properties. A missing "TSFE",
e.g. in backend context, does no longer automatically evaluate the whole
condition to FALSE
. Instead, the function returns NULL
,
which can be checked using either [get
or the null-safe operator [get
.