Project

General

Profile

Actions

Bug #100967

closed

Extbase ObjectConverter not aware of xclassed objects

Added by Torben Hansen 11 months ago. Updated 11 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2023-06-06
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The possibility to extend an Extbase domain model from a 3rd party extension is a major benefit of TYPO3. Back in the v10 and v11, TYPO3\CMS\Extbase\Object\Container\Container:registerImplementation was used to make Extbase aware of overridden classes. With v12, we achieved this by using GeneralUtility::makeInstance() in ObjectConverter::buildObject() when objects are created. This works fine for persisted objects, but not for new objects, which e.g. are about to be created.

When new objects are created, Extbase PropertyMapper will evaluate all child properties of the object. This is however done using the original (not XCLASSed) parameter retrieved from the Extbase argument. So if a domain model has been extended using XCLASS and the PropertyMapper maps properties, it only considers the properties from the original class and throws an exception, when unknown properties are met.

As a conclusion, we should also make the Extbase ObjectConverter (TypeConverter) aware of a potential XCLASSed object.

Resources:

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #96208: Remove extbase ObjectManagerClosed2021-12-02

Actions
Actions

Also available in: Atom PDF