PSR-7 Compatibility?

78 views
Skip to first unread message

richgoldmd

unread,
Jan 19, 2018, 1:52:41 PM1/19/18
to Fat-Free Framework
Has there been any thought to incorporating PSR-7 compatibility? Perhaps even as a configurable option. 

For example, if the option is enabled, the callback for the routes changes from function(\Base $f3, array $args) to function(Request, Response, $f3, $args) or similar?

in such a case, the output is controlled by response rather than directly echo'd, etc. 

I'd be willing to work on something like that.

-Rich

ikkez

unread,
Jan 20, 2018, 6:56:13 PM1/20/18
to Fat-Free Framework
Well you can probably implement this with a little custom base controller, implement Request/Response on your own (or require an existing lib via composer) and dont use f3->route but use a middleware or custom routing, which populates Request & Response.. adding PSR-7 with an "option" isn't that practicable and adds a lot of fat IMO.
Of course you are not forced to use echo for creating a response, but can use a custom View or Response implementation on your own.. just keep in mind that you need to deal with a lot of header settings on your own in that case, it's possible though.

William Stam

unread,
May 15, 2019, 2:51:07 PM5/15/19
to Fat-Free Framework
really wish f3 could follow this :( some times f3 just tries to be too clever without realizing devs need other tools to!
Reply all
Reply to author
Forward
0 new messages