I am trying to upgrade Slim framework used in my project from version 3 to version 4 and during the process I suddenly found out that withJson method has gone from the Response class. I want to understand why it is gone? I understand that Response class implements PSR-7 ResponseInterface, where withJson method is not included. But I don't think implementing ResponseInterface forbids Response class having some helper methods which will be very helpful.
I am trying to upgrade Slim framework used in my project from version 3 to version 4 and during the process I suddenly found out that
withJson
method has gone from the Response class. I want to understand why it is gone? I understand that Response class implements PSR-7 ResponseInterface, where withJson method is not included. But I don't think implementing ResponseInterface forbids Response class having some helper methods which will be very helpful.