-
-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Streamlined Request/Response Interface #3029
Comments
Where was this implemented? |
I probably closed it by mistake thinking it to be old stale issue I raised 😅, I was working on a POC , been long will revisit it probably this week |
A quick evaluation of the effort, to start using http-foundation Requests for use with landrok/activitypub.
I think replacing the |
@mediaformat i am intrested in co-working for sprint 3 to implement request response interface , let me know if you have started , we should work on this in a seprate branch |
I had already started on this, I'll try to publish my WIP branch tomorrow |
What ?
We should probably start using something like https://symfony.com/components/HttpFoundation or PSR 7 implementation like https://github.com/Nyholm/psr7 to work with Request,Response and session and stop using superglobals like $_SERVER , $_REQUEST, $_SESSION etc.
Why ?
While current implementation works good for a apache server it completely kills opportunity for known(idno) to run on faster runtimes like Swoole, Roadrunner or ReactPHP based faster runtime environments
How ?
Other Benefits
using echo,echo,echo is never a good idea , if we have a streamlined Response object, before it is served to the user those response can be used by plugin developers to optimize , cache or slightly change the response to suit there needs. Opens up a whole new world of possibility for plugin developers . Also on a side note developing middleware would be possible to tweak Request and Response during the lifecycle of known application
The text was updated successfully, but these errors were encountered: