Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118077 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 54807 invoked from network); 23 Jun 2022 14:59:25 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Jun 2022 14:59:25 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CEDA3180553 for ; Thu, 23 Jun 2022 09:49:09 -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,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,T_SPF_TEMPERROR 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-yb1-f175.google.com (mail-yb1-f175.google.com [209.85.219.175]) (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 09:49:09 -0700 (PDT) Received: by mail-yb1-f175.google.com with SMTP id u9so63408ybq.3 for ; Thu, 23 Jun 2022 09:49:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datadoghq.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7NMqceGYhj7MvKV8EMjXBUSRRPFRYJY7DzqKWpQgK6Q=; b=XRV0qc9nZgoFmp51BKVFjrgWzGBw/8jKNlWgfcordktezbhSU8pKxwGC2vHJpF0zGG u/J9kvnOWeD3SZ8bIkCcz2EcnmsggJopy8JR34EnikMta7McOv6SqZK/6H3Ubvp7QQFS 8WgiJphCcwlc2U+aB5Z/7uJEqdNY7jQ4SX7iE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7NMqceGYhj7MvKV8EMjXBUSRRPFRYJY7DzqKWpQgK6Q=; b=RF3h0l5Pz9RqvwF3AdFZksrWgzDEREpOSWSzivdViO05NWSdiR4yP1B+YV302nggXj b4kuL+zrh1rm7qE0CLeMfUoQbq7oKRUjmJB6kR+njGfqqt1goizyRlVyXvu72659/fIL yER/c8mFxum5mzL4PS5yyA8bymaHuQNz+qh+GtO8rR4Enu385NcSMaOf1eWOJdt6la0+ OG0Coe1Gamq59zteWnulBr+XYyERALvoKUZByPK3GnX+w/2ZXLuKum71CluUs4qp3SHV 6zXZvvLHnSci95MhRhr/TzfSwSqxzjcApFQh/DnGp0LjrRfZh/wWV0+ELxMm3FE2QSrk zL/w== X-Gm-Message-State: AJIora+q5amgZxFjqgIWJc1M6EfFbHlXb7rt+CWd2t+hpo7XOh9NsBFS HtCafyD6PTrmT3S6Hvr8aBtmtbnxv5zPJUIgLjlXNw== X-Google-Smtp-Source: AGRyM1u7NL6/BcF/II8hgfhFYZOijZm+rAWnl/SGitSkie8QBO3Pd53X4o+48KBxdt10aZABxJxigPHVE6BcaP5QzMc= X-Received: by 2002:a25:6ed4:0:b0:664:b4b6:a480 with SMTP id j203-20020a256ed4000000b00664b4b6a480mr10342959ybc.120.1656002948575; Thu, 23 Jun 2022 09:49:08 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Reply-To: Levi Morrison Date: Thu, 23 Jun 2022 10:48:57 -0600 Message-ID: To: Pierrick Charron Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] [Under Discussion] New Curl URL API From: internals@lists.php.net ("Levi Morrison via internals") On Tue, Jun 21, 2022 at 10:38 PM Pierrick Charron wrote: > > Hi, > > Following our discussions we had on the subject of the new Curl URL API, > and other curl improvements. I decided to only focus on adding the new Curl > URL API and put aside all other improvements. Here is the RFC that reflects > our current conversations. > > https://wiki.php.net/rfc/curl-url-api > > Feel free to give any feedback, concern or support :-) > > Regards, > Pierrick IMO, this should mirror the low-level curl url API very directly. The basis of my opinion is that we do not own libcurl; we are merely adapting it for use in PHP. We cannot anticipate changes in their design, nor do we have authority to do so if we feel something should change. Touching it as little as possible makes it easier to track upstream changes, etc. Based on that, I think the naming should be closer to libcurl.: - 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. The API should be as exact as possible to what libcurl provides. The "helpers" getHost, getPassword, etc should be removed and should expose `curl_url_get` more directly. Of course, it should be object based instead of resource based, but that's it. A nicer API can be built on top of it, but I don't think that's the role this particular API should play.