New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
9.0 Discussion Node property mapping in controllers #4873
Comments
Copied from #4734 (comment)
|
|
In the previous weekly (9.2.) we discussed (bastian, christian, denny, me) that we DO NOT want to support Instead to still make it simpler to get a node in a controller we decided that we want to introduce a fully qualified Similarly as bastian put it here #4564 (comment), the introduction of the NodeIdentity with the overhauled routing we can allow patterns like these: public function someAction(string $nodeIdentity): {
$nodeIdentity = NodeIdentity::fromJsonString($nodeIdentity);
// ...
}
// with little property converter, almost no gain
public function someAction(NodeIdentity $nodeIdentity): {
$node = $this->someService->findNodeByIdentity($nodeIdentity);
} |
in neos 8 one could leverage the property mapping to write a controller like this
and pass as node its fully qualified serialised representation: the old context path
?node=/sites/neosdemo/features/multiple-columns@user-admin;language=en_US
.In Neos 9 this is not that easily doable as the NodeAdress (the closest to its old context path) is not fully qualified see #4564. The correct way would be:
But due to a hack in the NewNodeConverter - accessing the bootstraps
getActiveRequestHandler
- we can make that magically work:When i stumbled upon the
NewNodeConverter
, based on its comment, i assumed that its only used for fusion uncached serialisation. Thats why i opened this issue #4732 (and pr #4734) to remove fusion dependency to the node property mapper and the hack.But it seems i only thought, being initially unaware of the hack, that the old property mapping style would and should not work. By the fact that we dont use it i was even more convinced. It seems there was until now no real discussion and decision?.
The text was updated successfully, but these errors were encountered: