On Fri, Jun 24, 2022, at 8:49 AM, Pierrick Charron wrote:
> Hi all, and thanks Levi for your feedback,
>
> If you look at the first thread (Discussion about new Curl URL API and
> ext/curl improvements) you'll see that this was my first approach. I even
> proposed to "OOPify" the actual CurlHandle & co objects with "simple"
> methods like $ch->setOpt(). Anyone who reads the actual API can see this is
> the actual "philosophy" of the extension. It was designed (on purpose or
> not) as a thin wrapper over curl. But lets focus on URL API only !
>
> With previous thread answers, I was under the impression that I really was
> the only one liking the approach of following the cURL api as much as
> possible and leaving the more high level API to things like Guzzle & co
> (for example by adding an Implementation of PSR-7 UriInterface using this
> API) since all the others parts of the API are done this way. I think it's
> important to have this new Curl URL API in 8.2 since it fixes security
> issues and that's of course not ideal but I would rather have an
> implementation that would not be my first choice, than not having it at all.
>
> What do you think ? I would love more people to give feedback on what they
> are expecting, if they don't care if they prefer one approach or the other
> and of course why ? I was thinking about doing a vote on this, but I'm not
> sure it's a good idea. What do you all think ?
>
> Regards,
> Pierrick

The root question, I think, is who the consumer is for this RFC?

Is the consumer PHP developers?  Then it should be a good PHP API.

Is the consumer the Guzzle team and everyone else just uses Guzzle and ignores 
Curl/CurlUrl?  Then it should probably adhere as closely as feasible to Curl's 
API, awful as it is, and be documented out the wazoo.

There likely isn't time for 8.2 to do the first option, but probably is for the 
second.

--Larry Garfield

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to