Deprecation: #85613 - Category Registry

See forge#85613

Description

With forge#94622 the new TCA type category has been introduced as a replacement for the \TYPO3\CMS\Core\Category\CategoryRegistry. Therefore, the CategoryRegistry together with \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable() method have been marked as deprecated and will be removed in TYPO3 v12.

The main reasons for this replacement are:

  • Using a dedicated type is more intuitive and consistent
  • No more TCA/Overrides are necessary for defining category fields
  • The new implementation is state of the art (e.g. direct usage of the Doctrine API for automatically adding the database columns)

Impact

Defining category fields for tables with $GLOBALS['TYPO3_CONF_VARS']['SYS']['defaultCategorizedTables'] or by calling ExtensionManagementUtility::makeCategorizable() will trigger a PHP E_USER_DEPRECATED error.

The extension scanner will furthermore detect any call to ExtensionManagementUtility::makeCategorizable() and CategoryRegistry as strong match and any usage of $GLOBALS['TYPO3_CONF_VARS']['SYS']['defaultCategorizedTables'] as weak match.

Affected Installations

All installations registering category fields using ExtensionManagementUtility::makeCategorizable() or defining $GLOBALS['TYPO3_CONF_VARS']['SYS']['defaultCategorizedTables'].

Furthermore, all installations, which directly access the CategoryRegistry.

Migration

Directly define category fields in the corresponding TCA, using the category TCA type. Have a look at the corresponding changelog, for code examples.