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 ? - Throw `CurlUrlException` on both the procedural and object oriented style API (that's how current implementation works [5]) - Throw `CurlUrlException` with 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 ?
Definitely 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.
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 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php