Project

General

Profile

Actions

Bug #97646

closed

Extbase property mapper does not work with uninitialized properties

Added by Sascha Egerer over 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
-
Target version:
Start date:
2022-05-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

Description

Extbase does not map properties that are not initialized.
Since PHP 7.4 it is possible to have uninitialized properties which is not the same as nullable properties.

The PHP method `get_object_vars($object)` does only return initialized properties.
The PHP method `get_class_vars(get_class($object))` returns the properties of the class.

So as soon as a property is typed but not initialized it will not be returned by get_object_vars(). This breaks the extbase mapper.

See https://3v4l.org/QvVnT


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #102278: Missing default value for property Container.php:$prototypeObjectsWhichAreCurrentlyInstanciated will lead to #1546632293 RuntimeException in GenericObjectValidator.phpClosed2023-10-27

Actions
Is duplicate of TYPO3 Core - Bug #95819: Extbase does not support uninitialized domain object propertiesClosedAlexander Schnitzler2021-10-30

Actions
Actions #1

Updated by Gerrit Code Review over 2 years 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/+/74674

Actions #2

Updated by Sascha Egerer over 2 years ago

  • Is duplicate of Bug #95819: Extbase does not support uninitialized domain object properties added
Actions #3

Updated by Gerrit Code Review over 2 years 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/+/74674

Actions #4

Updated by Gerrit Code Review over 2 years 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/+/74674

Actions #5

Updated by Anonymous over 2 years ago

  • Status changed from Under Review to Resolved
Actions #6

Updated by Benni Mack about 2 years ago

  • Status changed from Resolved to Closed
Actions #7

Updated by Tobi Ferger about 1 year ago

  • Related to Bug #102278: Missing default value for property Container.php:$prototypeObjectsWhichAreCurrentlyInstanciated will lead to #1546632293 RuntimeException in GenericObjectValidator.php added
Actions

Also available in: Atom PDF