You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure to always use the persistResult for follow-up actions
Not using the persistResult could cause issues in generating the IRI for
new resources because the ID was not set on the controllerResult but
only on the persistResult for example.
Copy file name to clipboardExpand all lines: src/EventListener/WriteListener.php
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -61,10 +61,11 @@ public function onKernelView(GetResponseForControllerResultEvent $event): void
61
61
62
62
if (null === $persistResult) {
63
63
@trigger_error(sprintf('Returning void from %s::persist() is deprecated since API Platform 2.3 and will not be supported in API Platform 3, an object should always be returned.', DataPersisterInterface::class), E_USER_DEPRECATED);
0 commit comments