maj 3.4 Adopting Immutable Responses
Before you migrate your code to use the new response methods you should be aware of the conceptual differences the new methods have. The immutable methods are generally indicated using a with prefix. For example, withLocation(). Because these methods operate in an immutable context, they return new instances which you need to assign to variables or properties.
-
$response->header('X-something', 'a value');
Edited by Julie gauthier