Bug #100967
closedExtbase ObjectConverter not aware of xclassed objects
100%
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.
- Slack Discussion about
registerImplementation
removal in v12: https://typo3.slack.com/archives/C03AM9R17/p1634036547334600
Updated by Gerrit Code Review over 1 year 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
Updated by Torben Hansen over 1 year ago
- Related to Task #96208: Remove extbase ObjectManager added
Updated by Gerrit Code Review over 1 year 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
Updated by Gerrit Code Review over 1 year 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
Updated by Gerrit Code Review over 1 year 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
Updated by Gerrit Code Review over 1 year 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
Updated by Gerrit Code Review over 1 year 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
Updated by Gerrit Code Review over 1 year 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
Updated by Torben Hansen over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 874ef0dbbe979f5b8d2c3e5d8b940234c7106d34.