Re: RFC: Server-Side Request and Response Objects (v2)
| From: | Rowan Tommins | Date: | Thu, 27 Feb 2020 16:57:03 +0000 |
| Subject: | Re: RFC: Server-Side Request and Response Objects (v2) | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-108783@lists.php.net to get a copy of this message | ||
On Thu, 27 Feb 2020 at 15:55, Paul M. Jones <pmjones@pmjones.io> wrote:
> > Why not hope that ReactPHP and others will want to use this object,
> > precisely because it avoids them having to roll their own implementations
> > of things?
>
> Like I said earlier: if React ends up wanting to use ext/request, with its
> tradeoffs, of course I would think that's great. But if they want to keep
> using what they have already, with its own tradeoffs, that's great too.
>
This is one place our attitudes differ: if I was proposing something like
this to be included in every copy of PHP, I'd actively want people to use
it, and consider that a measure of success; you seem to be happy to just
put it out there and see. As such, I perhaps place greater value on
functionality that would make it more attractive, and less value on
matching what we already have.
> This is very similar to what I'm saying: to use your phrasing, I opine it
> is better to "trivially wrap" the existing PHP functionality as part of a
> separate RFC, rather than try to embed it in ServerRequest (exposed or
> otherwise).
>
That's not really the same, no. I am saying that once you have the parsing
functionality somewhere in userland, whether it's inside ServerRequest or
its own function doesn't matter, you could still use it to delete 300+
lines of code from ReactPHP.
That's a reason to add it *as soon as possible*, even if in an ideal world
it would be implemented in a slightly different place, or two different
places, or whatever.
Regards,
--
Rowan Tommins
[IMSoP]