Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117964 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 18785 invoked from network); 16 Jun 2022 11:09:55 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 Jun 2022 11:09:55 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4098C180504 for ; Thu, 16 Jun 2022 05:57:55 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS24940 176.9.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 16 Jun 2022 05:57:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1655384273; bh=EV6DCNAcbp8orL4R1F5X+r4hMfkRTgLaT00Kn5Szk2Q=; h=Date:Subject:To:References:From:In-Reply-To:From; b=IcFqGQP3hf3Nyo0QHYXWrguUmW8mmXfYZIohEOBfA6XUOTgYJ9UUYnDYjNljezbez ehjfA6JcW6+nYixQQ0h05+2Q2O2hPOOKfcHtYboNK8DMgqHK8+g7G66Tmo//fMOWjg BH4CWAQPVzODk/ivv22jZH5nV5ixX9PBEQg3nTrPjlAIiQiy9jGODNZX14WiyFkVC7 DO/X77zMwED0syWWKqZBlOZldzsza/pE1DQoYud7Ye1RaG9IEkV91pT+xAtdqLepxb GckfYjoYGYSKqFfhprGAu44Pymo9Q36m1HkkVgujJ7FPaSy/1AbSYKRLZf2iSSxs2k AHe06485ko7Cg== Message-ID: <64c92c40-c180-0ea2-9b24-ec61b46640ab@bastelstu.be> Date: Thu, 16 Jun 2022 14:57:53 +0200 MIME-Version: 1.0 Content-Language: en-US To: Pierrick Charron , PHP internals References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Discussion about new Curl URL API and ext/curl improvements From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=c3=bcsterhus?=) 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