Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118082 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 24878 invoked from network); 24 Jun 2022 12:23:38 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 Jun 2022 12:23:38 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5E4C21804BD for ; Fri, 24 Jun 2022 07:13:39 -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 ; Fri, 24 Jun 2022 07:13:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1656080017; bh=7d7+V7ePAMAtMGH3XscOkhtOEWHAY0s5cJnT6TKJShQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=jpiHWFGsKbvE7mM+4If1JEzPYyMt1RmrXNFTJdfsCLb9I+SI7KhB00B6+aLroLdPt fswCwpleDkR1ESaagZ1RTOZhJ4bQrI83SokjBG+pR3q2ptasJBJgtO1zk8IuWm6gMO 9MVtvqo13nCKAOPCIFz2bruftjQKDHomMS3YaA9tQ9w4hIrsK/CdpWNgAWDwPdqzfV 3PqIY2Imkm2goMbaNMDygQzuleNEd8Sgwlof7+4XCE09/4bHaJK7n8O++stxYgwc4V 8n7BPzDALLdzYc4gVqfiOT94G2z2siNfIXqNP2LwBsKaUGn1n0lBvy5AxueBmN/HEh 1VCuC0jj01riA== Message-ID: Date: Fri, 24 Jun 2022 16:13:34 +0200 MIME-Version: 1.0 Content-Language: en-US To: Pierrick Charron , Levi Morrison Cc: PHP internals References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] [Under Discussion] New Curl URL API From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=c3=bcsterhus?=) Hi On 6/24/22 15:49, Pierrick Charron wrote: > 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 ? I agree with Levi. The curl extension should be a thin wrapper over libcurl. A high level API that is more convenient to use may be provided by PHP, but it should not be called curl. It should have a generic name with the fact that curl does the heavy lifting only being an implementation detail. Best regards Tim Düsterhus