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 #1

Updated by Gerrit Code Review 11 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79197

Actions #2

Updated by Torben Hansen 11 months ago

  • Related to Task #96208: Remove extbase ObjectManager added
Actions #3

Updated by Gerrit Code Review 11 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79197

Actions #4

Updated by Gerrit Code Review 11 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79197

Actions #5

Updated by Gerrit Code Review 11 months ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79197

Actions #6

Updated by Gerrit Code Review 11 months ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79197

Actions #7

Updated by Gerrit Code Review 11 months ago

Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79197

Actions #8

Updated by Gerrit Code Review 11 months ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79233

Actions #9

Updated by Torben Hansen 11 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF