Is there an existing issue for this?
Current Behavior
Proxy Building seems to destroy nested Attributes. This is an additional reason why ORM Attributes cannot yet be used. However it is important that fixing this will not enable ORM Attributes yet.
When the following Attributes are added to a class that is proxied:
#[Flow\Entity]
#[ORM\Table(uniqueConstraints: [
new ORM\UniqueConstraint(name: 'nodeData_name_value', columns: ["nodedata", "name", "value"])
])]
the following code is generated in the proxy class
#[Flow\Entity]
#[\Doctrine\ORM\Mapping\Table(uniqueConstraints: array (
0 =>
\Doctrine\ORM\Mapping\UniqueConstraint::__set_state(array(
'name' => 'nodeData_name_value',
'columns' =>
array (
0 => 'nodedata',
1 => 'name',
2 => 'value',
),
'fields' => NULL,
'options' => NULL,
)),
))]
Expected Behavior
The generated code should be similar to the original
#[Flow\Entity]
#[ORM\Table(uniqueConstraints: [
new ORM\UniqueConstraint(name: 'nodeData_name_value', columns: ["nodedata", "name", "value"])
])]
Steps To Reproduce
No response
Environment
- Flow: 8.3+ 8,4+
- PHP: 8.0+
Anything else?
Nested Attributes are supported from PHP 8.1 so one could say that we should only support this starting from Neos 8.4 that has PHP 8.2 as minimal requirement.
The attributes of proxy classes are rendered here:
- Class Attributes \Neos\Flow\ObjectManagement\Proxy\Compiler::renderAttribute
- Method Attributes \Neos\Flow\ObjectManagement\Proxy\ProxyMethodGenerator::buildAttributesCode
Is there an existing issue for this?
Current Behavior
Proxy Building seems to destroy nested Attributes. This is an additional reason why ORM Attributes cannot yet be used. However it is important that fixing this will not enable ORM Attributes yet.
When the following Attributes are added to a class that is proxied:
the following code is generated in the proxy class
Expected Behavior
The generated code should be similar to the original
Steps To Reproduce
No response
Environment
Anything else?
Nested Attributes are supported from PHP 8.1 so one could say that we should only support this starting from Neos 8.4 that has PHP 8.2 as minimal requirement.
The attributes of proxy classes are rendered here: