Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118078 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 66865 invoked from network); 23 Jun 2022 18:14:59 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Jun 2022 18:14:59 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 71F34180087 for ; Thu, 23 Jun 2022 13:04:44 -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=0.3 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,MISSING_HEADERS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 23 Jun 2022 13:04:43 -0700 (PDT) Received: by mail-wr1-f44.google.com with SMTP id e10so283136wra.11 for ; Thu, 23 Jun 2022 13:04:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:cc:subject:user-agent:in-reply-to:references:message-id :mime-version:content-transfer-encoding; bh=iAuTjbJz3w1yB7Wlh545WzjQwNj/Z1ZG/661WOxYz7M=; b=Lxe+BbQ0vay4r35cRVzwdiGb0ZGHeitge96e9LKQQLpmQVvNWvnyibm82e5JEkNnKo rUTbWBEb2X1DNBhrLuXN4Pdj+LFwmVhHw0EZvDXA0fRyE1xW7JlqpHZIXcAXI/Ib09ht 3TiDpcotXKdGQ3pA5F2PfSde3b10RZkqQJllLw3HpK6cPHN93G4y3sy+49Y+9Oj4H7S/ FrYUNGoldw2T52PiqwXXGyAgVMHi4e27+9l3tIEfKJ3vUpC4IMc7wvr96fgSAcy84TVz DLJ1FbxQd57p/xfZCZLciGlRYncuAHRYp1OWr1FdNzxbtUj476dGzPbKsRVH6k+1RuIY mQmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:cc:subject:user-agent:in-reply-to :references:message-id:mime-version:content-transfer-encoding; bh=iAuTjbJz3w1yB7Wlh545WzjQwNj/Z1ZG/661WOxYz7M=; b=D7FVUTYJWGEltPVE+qAcyQZ7Eju2cOzcRIDuapfBOVeQGpQDtvEd2WkZN6Mh6llUL5 Whu8aSzcUf5aKIux0X0l6++h1ndb/NGZZ5ud8QqPqMAGTboPQVk7eCg4j51MUV3Ibj9s iuGWurzuVDvrZ2LFWwNcWconceIZ/lZq4YhAYCSXnsoVSOJA8U8zLkIP3m5yzyBnXTSZ 65rgSKarP4eDDQvBHFZ0Xy3kYB77yB+ITuR5V9+hUDs0AQJoHWCzEILSeazzvcaEYEvB LuGCGcihZ9ofv1/D/dtxcx//le8J+SWML/T29Ta6ShV9CBB80dclTH4MxJ0XcXxWhRGl LI9A== X-Gm-Message-State: AJIora+3cRKC4bIkkftmMzSg5Cnnja+pw6lYEZADmUAImLV9uAeMZYJz vO2kDg3D1fOcXGaoA9AYXEA2FNFsUBI= X-Google-Smtp-Source: AGRyM1sVo+WEi9yQNlaFq+ruS7/x/Iy9OsS36rfzwdoBIkKC4FB2JqrzMiSnLIKNAUnq069pRh8Pnw== X-Received: by 2002:adf:e60a:0:b0:21b:8af9:e78a with SMTP id p10-20020adfe60a000000b0021b8af9e78amr9633819wrm.395.1656014682500; Thu, 23 Jun 2022 13:04:42 -0700 (PDT) Received: from [127.0.0.1] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.gmail.com with ESMTPSA id n12-20020a5d420c000000b0021b8d1b0568sm314298wrq.52.2022.06.23.13.04.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Jun 2022 13:04:41 -0700 (PDT) Date: Thu, 23 Jun 2022 21:04:35 +0100 CC: PHP internals User-Agent: K-9 Mail for Android In-Reply-To: References: Message-ID: <56F11D5A-7E07-4CE7-99CE-62D342834667@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] [Under Discussion] New Curl URL API From: rowan.collins@gmail.com (Rowan Tommins) On 23 June 2022 17:48:57 BST, Levi Morrison via internals wrote: >IMO, this should mirror the low-level curl url API very directly=2E The >basis of my opinion is that we do not own libcurl; we are merely >adapting it for use in PHP=2E We cannot anticipate changes in their >design, nor do we have authority to do so if we feel something should >change=2E Touching it as little as possible makes it easier to track >upstream changes, etc=2E > >Based on that, I think the naming should be closer to libcurl=2E: > - CurlUrl::URL_ENCODE should be CurlUrl::URLENCODE > - CurlUrl::URL_DECODE should be CurlUrl::URLDECODE > >And so on, only differing if necessary because something is a reserved >word=2E The API should be as exact as possible to what libcurl provides= =2E >The "helpers" getHost, getPassword, etc should be removed and should >expose `curl_url_get` more directly=2E > >Of course, it should be object based instead of resource based, but that'= s it=2E > >A nicer API can be built on top of it, but I don't think that's the >role this particular API should play=2E For the record, I disagree with literally everything you've said here=2E PHP indeed does not own libcurl, and nor does libcurl own PHP=2E We are ta= rgeting a different audience, and have a different set of facilities availa= ble to us=2E We have our own documentation, so there is no reason a user of= PHP should know or care what the underlying implementation looks like, any= more than they should know how the memory allocation works=2E If the underlying library adds a feature, it will be as easy to add a new = method as a new constant=2E If the underlying library changes behaviour, we= will want to make our own decision on whether that meets our compatibility= policy, and whether to emulate the older behaviour (or indeed emulate the = newer behaviour on systems with an older library)=2E Twenty years ago, maybe PHP programmers were used to it being a veneer ove= r C=2E I don't think that is or should be the expectation today, unless you= 're using FFI=2E Regards, --=20 Rowan Tommins [IMSoP]