6.1 adds argument and return value resolution that removes the serialisation boilerplate from a controller action.
#[Route('/orders/{id}', methods: ['GET'])]
public function show(Order $order): OrderView
{
return OrderView::from($order);
}
// with a value resolver registered, the returned object is
// serialised by the framework rather than by the action.
// the trade: the response shape is now decided by a
// listener rather than in the method you are reading.
Moving serialisation out of the action makes the controller shorter and moves a decision somewhere less obvious, which is the recurring trade in every framework feature of this kind. It is worth it when the shape is genuinely uniform across an API and is a source of confusion when two endpoints need different envelopes — at which point the explicit response is back and reads better for it.