Re: [RFC][DISCUSSION] Object-oriented curl API v2
| From: | Eric Norris | Date: | Thu, 26 Jun 2025 17:21:19 +0000 |
| Subject: | Re: [RFC][DISCUSSION] Object-oriented curl API v2 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-127761@lists.php.net to get a copy of this message | ||
> IMO, this sounds like something that would be great to start as a userland OOP wrapper for
> cURL, where it can be iterated on and the interface can be tested and changed much quicker. Then,
> maybe proceed to an external extension that can be migrated into core later, once its interface is
> stable.
>
> cURL is massive, and there are a lot of moving parts. I wouldn’t expect to get the API
> correct on the first try. :-)
>
> Cheers,
> Ben
(Apologies for the double-post Ben, I'm a little rusty and forgot to reply-all)
I see, thanks for your feedback! To clarify, I am not aiming to
produce a high-level API for curl. I would expect that most users
would still reach for libraries like Guzzle, etc.
I know that in the prior discussion, Rowan Tommins had a vision for a
high-level API (https://externals.io/message/122371#122424), but I
share your sentiment that this would be difficult to get right in
core. I'd prefer to aim for a (mostly) direct translation of the
low-level API, which I think still has benefits on its own.