TYPO3 Logo
TYPO3 Core Changelog
Options
Give feedback View source How to edit Edit on GitHub Full documentation (single file)

TYPO3 Core Changelog

  • ChangeLog v14
    • 14.0 Changes
    • 14.x Changes by type
  • ChangeLog v13
    • 13.4.x Changes
    • 13.4 Changes
    • 13.3 Changes
    • 13.2 Changes
    • 13.1 Changes
    • 13.0 Changes
    • 13.x Changes by type
  • ChangeLog v12
    • 12.4.x Changes
    • 12.4 Changes
    • 12.3 Changes
    • 12.2 Changes
    • 12.1 Changes
    • 12.0 Changes
    • 12.x Changes by type
  • ChangeLog v11
    • 11.5.x Changes
    • 11.5 Changes
    • 11.4 Changes
    • 11.3 Changes
    • 11.2 Changes
    • 11.1 Changes
    • 11.0 Changes
    • 11.x Changes by type
  • ChangeLog v10
    • 10.4.x Changes
    • 10.4 Changes
    • 10.3 Changes
    • 10.2 Changes
    • 10.1 Changes
    • 10.0 Changes
    • 10.x Changes by type
  • ChangeLog v9
    • 9.5.x Changes
    • 9.5 Changes
    • 9.4 Changes
    • 9.3 Changes
    • 9.2 Changes
    • 9.1 Changes
    • 9.0 Changes
    • 9.x Changes by type
  • ChangeLog v8
    • 8.7.x Changes
    • 8.7 Changes
    • 8.6 Changes
    • 8.5 Changes
    • 8.4 Changes
    • 8.3 Changes
    • 8.2 Changes
    • 8.1 Changes
    • 8.0 Changes
    • 8.x Changes by type
  • ChangeLog v7
    • 7.6.x Changes
    • 7.6 Changes
    • 7.5 Changes
    • 7.4 Changes
    • 7.3 Changes
    • 7.2 Changes
    • 7.1 Changes
    • 7.0 Changes
    • 7.x Changes by type
  • Documenting Changes
  • Sitemap
  1. TYPO3 Core Changelog
  2. ChangeLog v9
  3. 9.3 Changes
  4. Deprecation: #84993 - Deprecate some TSconfig related methods
Give feedback Edit on GitHub

Deprecation: #84993 - Deprecate some TSconfig related methods

See forge#84993

Description

Some user TSconfig related methods have been deprecated:

  • TYPO3\CMS\core\Authentication\BackendUserAuthentication->getTSConfigVal()
  • TYPO3\CMS\core\Authentication\BackendUserAuthentication->getTSConfigProp()

Changed method signatures:

  • TYPO3\CMS\core\Authentication\BackendUserAuthentication->getTSConfig(), no argument allowed any longer

Some page TSconfig related methods have been marked as deprecated:

  • TYPO3\CMS\backend\Utility\BackendUtility::getModTSconfig()
  • TYPO3\CMS\backend\Utility\BackendUtility::unsetMenuItems()
  • TYPO3\CMS\backend\Tree\View\PagePositionMap->getModConfig()
  • TYPO3\CMS\core\DataHandling\DataHandler->getTCEMAIN_TSconfig()

These properties have been set to protected, should not be used any longer and trigger a deprecation error on access:

  • TYPO3\CMS\backend\Tree\View\PagePositionMap->getModConfigCache
  • TYPO3\CMS\backend\Tree\View\PagePositionMap->modConfigStr

Impact

Calling the above methods will trigger a PHP E_USER_DEPRECATED error.

Affected Installations

Extensions with backend modules may call these methods. The extension scanner will find affected code occurrences in extensions.

Migration

Change user TSconfig related calls to use BackendUserAuthentication->getTSConfig() instead, it comes with a slightly changed return syntax.

getTSConfig() without arguments simply returns the entire user TSconfig as array, similar to other methods that return parsed TypoScript arrays. The examples below show some imaginary user TSConfig, the full parsed array returned by getTSConfig() and some typical access patterns with fallback. Note it's almost always useful to use the null coalescence ?? operator for a fallback value to suppress PHP notice level warnings:

// Incoming user TSconfig:
// options.someToggle = 1
// options.somePartWithSubToggles = foo
// options.somePartWithSubToggles.aValue = bar

// Parsed array returned by getTSConfig(), note the dot if a property has sub keys:
// [
//     'options.' => [
//         'someToggle' => '1',
//         'somePartWithSubToggles' => 'foo',
//         'somePartWithSubToggles.' => [
//             'aValue' => 'bar',
//         ],
//     ],
// ],
$userTsConfig = $backendUserAuthentication->getTSConfig():

// Typical call to retrieve a sanitized value:
$isToggleEnabled = (bool)($userTsConfig['options.']['someToggle'] ?? false);

// And to retrieve a sub set, note the dot at the end:
$subArray = $userTsConfig['options.']['somePartWithSubToggles.'] ?? [];

// Switch an old getTSConfigVal() to getTSConfig(), note the parenthesis:
$value = (bool)$backendUser->getTSConfigVal('options.someToggle');
$value = (bool)($backendUser->getTSConfig()['options.']['someToggle'] ?? false);

// Switch an old getTSConfigProp() to getTSConfig(), note the parenthesis and the trailing dot:
$value = (array)$backendUser->getTSConfigProp('options.somePartWithSubToggles');
$value = (array)($backendUser->getTSConfig()['options.']['somePartWithSubToggles.'] ?? []);

Copied!

Change BackendUtility->getModTSconfig() related calls to use BackendUtility::getPagesTSconfig($pid) instead. Note this method does not return the 'properties' and 'value' sub array as ->getModTSconfig() did:

// Switch an old getModTSconfig() to getPagesTSConfig() for array of properties:
$configArray = BackendUtility::getModTSconfig($pid, 'mod.web_list');
$configArray['properties'] = BackendUtility::getPagesTSconfig($pid)['mod.']['web_list.'] ?? [];

// Switch an old getModTSconfig() to getPagesTSConfig() for single value:
$configArray = BackendUtility::getModTSconfig($pid, 'TCEFORM.sys_dmail_group.select_categories.PAGE_TSCONFIG_IDLIST');
$configArray['value'] = BackendUtility::getPagesTSconfig($pid)['TCEFORM.']['sys_dmail_group.']['select_categories.']['PAGE_TSCONFIG_IDLIST'] ?? null;
Copied!

Methods BackendUtility::unsetMenuItems() and DataHandler->getTCEMAIN_TSconfig() have been rarely used and are dropped without substitution. Copy the code into consuming methods if you really need them.

  • Previous
  • Next
Reference to the headline

Copy and freely share the link

This link target has no permanent anchor assigned. You can make a pull request on GitHub to suggest an anchor. The link below can be used, but is prone to change if the page gets moved.

Copy this link into your TYPO3 manual.

  • Home
  • Contact
  • Issues
  • Repository

Last rendered: Jun 12, 2025 16:14

© since 1997 by the TYPO3 contributors
  • Legal Notice
  • Privacy Policy