diff --git a/DEPRECATED.md b/DEPRECATED.md index a2e80b2fce3..8328b68d79c 100644 --- a/DEPRECATED.md +++ b/DEPRECATED.md @@ -243,8 +243,8 @@ You can use the static helper methods such as `System::loadLanguageFile()` or ## Constants -The constants `TL_ROOT`, `TL_MODE`, `TL_START`, `TL_SCRIPT` and `TL_REFERER_ID` -have been deprecated and will be removed in Contao 5.0. +The constants `TL_ROOT`, `TL_MODE`, `TL_START`, `TL_SCRIPT`, `TL_REFERER_ID` and +`REQUEST_TOKEN` have been deprecated and will be removed in Contao 5.0. Use the `kernel.project_dir` instead of `TL_ROOT`: @@ -299,6 +299,12 @@ Use the the request attribute `_contao_referer_id` instead of `TL_REFERER_ID`: $refererId = System::getContainer()->get('request_stack')->getCurrentRequest()->get('_contao_referer_id'); ``` +Use the `contao.csrf.token_manager` service instead of `REQUEST_TOKEN`: + +```php +$requestToken = System::getContainer()->get('contao.csrf.token_manager')->getDefaultTokenValue(); +``` + ## PHP entry points Contao 4 only uses a single PHP entry point, namely the `index.php` or