Re: Discussion about new Curl URL API and ext/curl improvements
| From: | Tim Düsterhus | Date: | Thu, 16 Jun 2022 12:57:53 +0000 |
| Subject: | Re: Discussion about new Curl URL API and ext/curl improvements | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-117964@lists.php.net to get a copy of this message | ||
Hi
On 6/16/22 09:10, Pierrick Charron wrote:
As of right now I still have some unanswered questions like how should we handle errors on the new CurlUrl API ? - ThrowDefinitely not this one. I want Exceptions for an OO API. I don't particularly care about the prodecural API, as it is not likely that I would use it, given that it is more clunky.CurlUrlExceptionon both the procedural and object oriented style API (that's how current implementation works [5]) - ThrowCurlUrlExceptionwith the oriented style API, but return for example boolean/null on errors when user uses the procedural API ? - Always return null/booleans using both object oriented API and procedural API ?
The same question applies if we add a new object oriented style API on
existing classes. Current functions MUST stay unchanged but should we throw
CurlException when the user uses the object oriented style API ? (That's
what I would do) Or should we return the same result from OO and procedural
API ? Should we make the new CurlApi consistent with that ?
Same here: Exceptions for OO, please.
What are your thoughts about all this ? Any feedback on any of those subjects are more than welcome.Something else you didn't mention: Would it be possible to make the `int $part` parameter an enum? Best regards Tim Düsterhus