Issue Bug Closed

#97646Extbase property mapper does not work with uninitialized properties

Sascha Egerer 05/17/22, 09:23 updated 10/04/22, 14:19

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

Reviews 1