[BUGFIX] Add more migration hints for config.tx_extbase.objects
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Documentation / Changelog / master / Deprecation-86270-ExtbaseXclassViaTypoScriptSettings.rst
index 586f936..0e6258f 100644 (file)
@@ -29,8 +29,20 @@ configuration options are affected.
 Migration
 =========
 
-Use XCLASSes configured through :php:`$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']` instead.
+Use XCLASSes configured in :file:`ext_localconf.php` using
+:php:`$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']`.
+
+Register implementations in the Extbase object container instead if you need to override classes
+that are processed by the :php:`PropertyMapper` like domain models or if you rely on additional
+injections:
+
+.. code-block:: php
+
+   GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\Container\Container::class)
+       ->registerImplementation(Base::class, Override::class);
+
 If you conditionally configured :ts:`config.tx_extbase.objects` or
-:ts:`plugin.tx_%plugin%.objects`, then move that conditional logic into the XCLASS itself.
+:ts:`plugin.tx_%plugin%.objects`, then move that conditional logic into the
+overriding class itself.
 
 .. index:: TypoScript, NotScanned, ext:extbase