Project

General

Profile

Actions

Bug #97646

closed

Extbase property mapper does not work with uninitialized properties

Added by Sascha Egerer about 2 years ago. Updated over 1 year 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.phpResolved2023-10-27

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

Actions
Actions

Also available in: Atom PDF