All of Contao's service annotations have been deprecated in Contao 5.4 and will no longer work in Contao 6. Use the
respective PHP attributes instead, e.g. #[AsCallback(…)]
instead of @Callback(…)
etc.
Both $GLOBALS['objPage']
and global $objPage
have been deprecated in Contao 5.4 and will no longer work in Contao 6.
Use the page finder service instead:
$page = System::getContainer()->get('contao.routing.page_finder')->getCurrentPage();
Relying on the <base>
tag has been deprecated in Contao 5.0 and will no longer work in Contao 6. Use absolute paths
for links and assets instead.
Using the global $GLOBALS['TL_LANGUAGE']
has been deprecated in Contao 4.0 and will no longer work in Contao 6. Use
the locale from the request object instead:
$locale = System::getContainer()->get('request_stack')->getCurrentRequest()->getLocale();