Re: [PHP-DEV] Re: [RFC] OOP API for cURL extension

2024-02-18 Thread Rowan Tommins
On 18 February 2024 15:26:37 GMT, Lynn wrote: > Having a lot of setters for options might make it really hard to find the >methods you're looking for in terms of auto-complete in your IDE. I think it would be significantly better for that purpose than what we have now, because there would be a

Re: [PHP-DEV] Re: [RFC] OOP API for cURL extension

2024-02-18 Thread Lynn
On Sun, Feb 18, 2024 at 12:41 PM Rowan Tommins wrote: > On 17 February 2024 15:57:20 GMT, Larry Garfield > wrote: > > >The RFC would also benefit greatly from some practical examples of using > the new API. Right now it's not clear to me (as someone who almost never > uses Curl directly) how/wh

Re: [PHP-DEV] Re: [RFC] OOP API for cURL extension

2024-02-18 Thread Rowan Tommins
On 17 February 2024 15:57:20 GMT, Larry Garfield wrote: >The RFC would also benefit greatly from some practical examples of using the >new API. Right now it's not clear to me (as someone who almost never uses >Curl directly) how/why I'd use any of these, since there's still "a whole >crapton

Re: [PHP-DEV] Re: [RFC] OOP API for cURL extension

2024-02-17 Thread Larry Garfield
On Thu, Feb 15, 2024, at 9:44 AM, Sara Golemon wrote: > Summarizing replies so far. Won't be able to update the RFC > immediately as my day job needs me, but some great discussions already, > gang. Thanks! > > * Define the conditions under which exceptions will be thrown (and > which exceptions

Re: [PHP-DEV] Re: [RFC] OOP API for cURL extension

2024-02-17 Thread Gina P. Banyard
On Saturday, 17 February 2024 at 07:41, Kalle Sommer Nielsen wrote: > Hi Sara > > Den tors. 15. feb. 2024 kl. 21.08 skrev Sara Golemon poll...@php.net: > > > * Better typing for setOpt() methods. > > Comment: Yep, this is a good and fair point. It's going to take a little > > more dicing up o

Re: [PHP-DEV] Re: [RFC] OOP API for cURL extension

2024-02-17 Thread Kalle Sommer Nielsen
Hi Sara Den tors. 15. feb. 2024 kl. 21.08 skrev Sara Golemon : > * Better typing for setOpt() methods. > Comment: Yep, this is a good and fair point. It's going to take a little > more dicing up of the current implementation, but hopefully not too rough. > Proposal: Keep untyped setOption()

[PHP-DEV] Re: [RFC] OOP API for cURL extension

2024-02-17 Thread Rowan Tommins
On 16 February 2024 16:09:32 GMT, Rowan Tommins wrote: >public function executeAndReturn(): string >public function executeAndOutput(): void I guess I missed: public function executeToFile(Stream $fileHandle): void public function executeWithCallback(callable $wrIteFunction): void which would

[PHP-DEV] Re: [RFC] OOP API for cURL extension

2024-02-17 Thread Rowan Tommins
On 15 February 2024 15:44:13 GMT, Sara Golemon wrote: >* CurlHandle::exec() mixed typing of return values. > Comment: Agreed. The `true` return value becomes meaningless in the >RETURNTRANSFER==false case. > Proposal: Update the RFC for CurlHandle::execute() to return ?string. Should we take t

Re: [PHP-DEV] Re: [RFC] OOP API for cURL extension

2024-02-16 Thread Tim Düsterhus
Hi On 2/15/24 16:44, Sara Golemon wrote: * Define the conditions under which exceptions will be thrown (and which exceptions) - I'll add these to the RFC, but in short: * CurlException - Never, it's an interface type to group the other exceptions. Interface or base Exception? I would sugges

[PHP-DEV] Re: [RFC] OOP API for cURL extension

2024-02-16 Thread Yousuf Tafhim
+1 from me too On Thu, Feb 15, 2024 at 5:30 PM Flávio Heleno wrote: > On Wed, Feb 14, 2024 at 10:44 PM Sara Golemon wrote: > >> Good afternoon folks, I'd like to open discussion on adding OOP APIs to >> the cURL extension. >> https://wiki.php.net/rfc/curl-oop >> >> This has been a long standing

[PHP-DEV] Re: [RFC] OOP API for cURL extension

2024-02-15 Thread Sara Golemon
Summarizing replies so far. Won't be able to update the RFC immediately as my day job needs me, but some great discussions already, gang. Thanks! * Define the conditions under which exceptions will be thrown (and which exceptions) - I'll add these to the RFC, but in short: * CurlException - Nev

[PHP-DEV] Re: [RFC] OOP API for cURL extension

2024-02-15 Thread Dik Takken
On 14-02-2024 19:47, Sara Golemon wrote: Good afternoon folks, I'd like to open discussion on adding OOP APIs to the cURL extension. https://wiki.php.net/rfc/curl-oop This has been a long standing bug-bear of mine, and I think its time has come. try { (new \CurlHandle)->setOpt(YOUR_VOTE, tru