Breaking: #66429 - Remove IdentityMap from persistence
See forge#66429
Description
The Identity
class and its usage has been removed from the Extbase persistence.
Impact
Upgraded installations will throw a Reflection
. Accessing the previously existing Identity
properties within Data
and Repository
will now fail. Creating Identity
instances is not possible
anymore.
Affected Installations
All installations, especially extensions using the Identity
class directly or accessing the properties within
Data
or Repository
.
Migration
The Extbase reflection cache of existing installations needs to be cleared once.
Existing code can be migrated to the persistence Session
class which provides a drop-in replacement for the
Identity
.
Usage example
How to use the Session
class to retrieve objects by an identifier:
$session = GeneralUtility::makeInstance(ObjectManager::class)->get(\TYPO3\CMS\Extbase\Persistence\Generic\Session::class);
$session->registerObject($object, $identifier);
if ($session->hasIdentifier($identifier)) {
$object = $session->getObjectByIdentifier($identifier, $className);
}