Description
When building a more complex template and a loop, you might encounter the situation, when you only want to set this property on iteration 1 or something and otherwise return null
, thinking it will be ignored.
Currently the behaviour with null might not be 100% obvious.
template:
properties:
someSimplePropertyWithDefaultValue: null
someReferencePropery: null
someReferencesProperty: [null]
in the first case someSimplePropertyWithDefaultValue
will be set to null (see $node->getProperties()
) (also see somewhat related discussion about properties without default value or not previous value beeing skipped: neos/neos-development-collection#4292)
in the latter cases with the reference properties, the null value will be (rightfully) ignored, but because the setProperty
will guard this:
the question i asked myself, if it would be generally expected, that when null is returned, that the setProperty
operation will be skipped for the property.
This would be helpful for cases, where you dont want to hardcode the default value. But this change might be breaking in unexpected ways...