Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 992 Bytes

DEPRECATED.md

File metadata and controls

29 lines (19 loc) · 992 Bytes

Deprecated features

Service annotations

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.

$GLOBALS['objPage']

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();

Base tag

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.

$GLOBALS['TL_LANGUAGE']

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();