Page MenuHomePhabricator

Implement standard HTTP message interface in MediaWiki (PSR-7)
Open, Needs TriagePublic

Description

Event Timeline

Task description needs fleshing out. What is PSR-7 (a TLDR version at least, rather than just a link elsewhere)? Why? What does this do for us? Just allowing us to implement PSR-15? Or do we get other benefits too?

Task description needs fleshing out. What is PSR-7 (a TLDR version at least, rather than just a link elsewhere)? Why? What does this do for us? Just allowing us to implement PSR-15? Or do we get other benefits too?

I mean I think there's value in having a "standard" request/response pipeline using industry-standard request and response interfaces, however, there's not really a huge advantage in that if we can't plugin middlewars (or abstract some of our code as middlewares).

dbarratt renamed this task from Implement PSR-7 to Implement PSR-7 in MediaWiki.May 10 2018, 2:38 PM

In practice I suppose this would mean:

Implementing PSR-7 + PHP-HTTP for MWHTTPRequest would mean that it could be easily used outside of MediaWiki (I doubt there is much use case for that; maybe if we had PHP-based microservices and wanted them to have all the query-parameter-wrangling behavior of MediaWiki?) and it could be easily replaced via the service container with another library (that seems useful; MWHttpRequest does not offer much in terms of features). Implementing PSR-7 in WebRequest / WebResponse does not seem directly useful (it would be a requirement for PSR-15 compliance though).

Ankry renamed this task from e7caaaaaaa to Implement PSR-7 in MediaWiki.Jul 2 2018, 10:35 AM
Ankry raised the priority of this task from High to Needs Triage.
Ankry updated the task description. (Show Details)
Ankry added a subscriber: Aklapper.
Krinkle renamed this task from Implement PSR-7 in MediaWiki to Implement standard HTTP message interface in MediaWiki (PSR-7).Jul 28 2018, 8:45 PM

MediaWiki-REST-API did implement PSR-7. Not sure there is much value in doing it also for MwHttpRequest, or the action API, or WebRequest/WebResponse.