pt., 5 sty 2024 o 13:19 Robert Landers <landers.rob...@gmail.com>
napisał(a):

> On Fri, Jan 5, 2024 at 11:59 AM Rowan Tommins <rowan.coll...@gmail.com>
> wrote:
>
> > > Globals is how this works (atm)
> >
> > It's how it works for native SAPIs. It's not, as far as I know, how any
> worker system other than FrankenPHP has implemented its API. Every other
> implementation I've seen, whether async or not, passes in some form of
> request data to the callback, with the exception of RoadRunner, which gives
> the data as a return value from a "get next request" function.
>
> Nearly every library in existence knows how to use these globals
> (including 30 years old legacy code). There are also the unwieldy PSR
> request/response containers for which there are dozens (if not
> hundreds) of implementations. It would be fantastic if there were
> already an extension-based implementation that could be adopted into
> php-src; though I feel like that is a separate conversation.
>

There are indeed dozens of libraries already working with PSR nicely but
IMHO
the API should provide all the necessary information in a way that allows
the construction of such objects,
but suggesting PSR with request/response objects will limit the
capabilities of worker mode API
to handle pure HTTP protocol only.

What I'd like to say is that I believe for the initial proposal of any
eventual worker mode API
with the PSR with request/response objects should not be considered at all.

Cheers

Reply via email to