Deprecation: #94377 - Extbase ObjectManager->getEmptyObject
See forge#94377
Description
Extbase has the odd behavior that
\TYPO3\
objects -
typically classes in Classes/
of Extbase enabled
extensions - don't call __
when the persistence layer
"thaws" a model from database - typically when an Extbase
Domain/
uses a ->find
method.
As a side-effect of switching away from Extbase Object
towards
symfony based dependency injection, this behavior will change in TYPO3 v12:
Method __
will be called in v12 when the Data
creates model instances from database rows.
Impact
There is no impact in TYPO3 v11 and no deprecation log entry is raised. However, extension developers should prepare toward this change in v11 to avoid any impact of a breaking change in v12.
Affected Installations
Extbase extensions having domain models that implement __
are affected. It is rather unlikely this has any impact on the behavior
of the extension, though.
Additionally, calls to API method
TYPO3\
should be
avoided since it will vanish in v12. The vast majority of extensions will
not do this, though. The extension scanner will find candidates.
Migration
No migration possible. Simply expect that __
of a domain
model will be called in v12 when a domain repository find
method
directly or indirectly reconstitutes a model object from a database row.