Flow PSR-7 change in master, we need your help!

Dear Neos community,

as of yesterday, we merged the PSR-7 change into the current master branch of Flow, which is going to be the 6.0 release. Now we need your help!
Please check out the current master of Flow and play with it, comment here, on slack (#project-psr-http) or on the issue on github and let us know where we broke things too much.

We were a bit reckless tbh., but it’s a hell of a big PR. We might have overlooked something, not fully thought things through yet. Flow 6 WILL be breaking, but of course we want to keep it as senseful as possible, so that’s why we need feedback from real projects.

PSR-7 will allow us a couple of things in the longer run, like introduce PSR-15 middleware support and a cleaner HTTP stack and separation of the MVC layer. This is a first step in that direction and it changes quite a lot, so be prepared.

Biggest change: no more HTTP request/response interaction inside the controller. You interact with the ActionRequest/ActionResponse, which are supposed to be higher level abstractions. If you need HTTP request/response, go HTTP component (future psr-15 middleware).
This is a major point where we need input: What API are you missing on ActionRequest/Response inside your Controller and what is the use-case? Sometimes it can be solved (better) with HTTP components, but sometimes it just would make sense to keep this thing inside the MVC layer.

Also, we separated CLI and MVC controller and dispatcher. It was a bad abstraction to combine them into one interface. This helps with making types more straightforward and allows for type checking. So if you have code that expects Mvc\RequestInterface, you need to adjust.

During the course of the next weeks we will collect information on what to take care of when upgrading, following from the feedback we collect and get. We might also add more changes, that will make the PSR-7 switch less breaking or add new API to help improve things. If this totally doesn’t work out, we might even revert the change completely.

See also


4 Likes