File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,9 @@ public function onKernelView(GetResponseForControllerResultEvent $event)
61
61
62
62
$ event ->setControllerResult ($ persistResult ?? $ controllerResult );
63
63
64
- // Comparing the class is necessary because the input might not be readable
64
+ // Controller result must be immutable for _api_write_item_iri
65
+ // if it's class changed compared to the base class let's avoid calling the IriConverter
66
+ // especially that the Output class could be a DTO that's not referencing any route
65
67
if (null !== $ this ->iriConverter && \get_class ($ controllerResult ) === \get_class ($ event ->getControllerResult ())) {
66
68
$ request ->attributes ->set ('_api_write_item_iri ' , $ this ->iriConverter ->getIriFromItem ($ controllerResult ));
67
69
}
You can’t perform that action at this time.
0 commit comments