Deprecation: #94619 - Extbase ObjectManager
See forge#94619
Description
The Extbase ObjectManager as the legacy core object lifecycle and dependency injection solution has been marked discouraged with TYPO3 v10 and its introduction of the Symfony based dependency injection solution already.
TYPO3 v11 no longer uses the Extbase ObjectManager - only in a couple of places as fallback for third party extensions. The entire construct has now been marked as deprecated and will be removed with v12:
\TYPO3\
- Main interfaceCMS\ Extbase\ Object\ Object Manager Interface \TYPO3\
- Main implementationCMS\ Extbase\ Object\ Object Manager \TYPO3\
- Internal lifecycle managementCMS\ Extbase\ Object\ Container\ Container \TYPO3\
- Base exceptionCMS\ Extbase\ Object\ Exception \TYPO3\
- Detail exceptionCMS\ Extbase\ Object\ Exception\ Cannot Build Object Exception \TYPO3\
- Detail exceptionCMS\ Extbase\ Object\ Container\ Exception\ Cannot Reconstitute Object Exception \TYPO3\
- Detail exceptionCMS\ Extbase\ Object\ Container\ Exception\ Unknown Object Exception \TYPO3\
- Detail exception, obsolete by deprecation of Extbase signal slot dispatcher already.CMS\ Extbase\ Signal Slot\ Exception\ Invalid Slot Exception \TYPO3\
- Detail exception, obsolete by deprecation of Extbase signal slot dispatcher already.CMS\ Extbase\ Signal Slot\ Exception\ Invalid Slot Return Exception
Impact
Directly or indirectly calling \TYPO3\
will trigger a PHP E_
error.
Affected Installations
Extensions that have been properly cleaned up for TYPO3 v10 compatibility are not affected.
Extensions still relying on Extbase ObjectManager are strongly encouraged to
switch to \TYPO3\
and
Symfony based DI instead.
The extension scanner will find usages of the above classes and interfaces and shows them as deprecated with a strong match.
Migration
Documentation of migration paths have been established with TYPO3 v10 documentation already. The TYPO3 explained dependency injection section and the ObjectManager->get() v10 changelog entry are especially helpful.