(07-03-2022, 05:51 AM)iRedds Wrote: The use of PSR-7/15 should not, in fact, affect the services in any way. These are basically different things.
I think it is impossible.
If we will make it so, we need to change Request/Response to be mutable.
However, making them mutable is contrary to the PSR.
The significance of complying with the PSR will lost.
Therefore, I think that it is inevitable that some part will break.
(07-03-2022, 05:51 AM)iRedds Wrote: Removing Services::request() is the worst thing imaginable. I mean deleting access to an object. Look at this situation globally, not just within the controller.
Incoming Request object should be determined at the very early stage of the framework, and it should not be altered in the state,
It seems there is no problem that Services::request() returns the Request object.
Services::request() may be fine as it is now.
Changing the Request object state does not change the object returned by Service::request(), though.
But I don't know why you need it. Where do you use it?
In my opinion, the Request object is used only in Controllers or Controller Filters.
(07-03-2022, 05:51 AM)iRedds Wrote: In fact, neither a factory nor a service is needed for the Response class.
If we don't need service for Response class, it is a good news.
(I think we don't need it in App.)
The Response object is often changed in the state, so Services::response() seems to have more problems than Request.