Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118050 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 26858 invoked from network); 22 Jun 2022 13:04:34 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Jun 2022 13:04:34 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5E59118054D for ; Wed, 22 Jun 2022 07:54:05 -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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,HTML_MESSAGE,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-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (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 ; Wed, 22 Jun 2022 07:54:05 -0700 (PDT) Received: by mail-ed1-f41.google.com with SMTP id z19so7435654edb.11 for ; Wed, 22 Jun 2022 07:54:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:cc; bh=DiH4x83gJA3TAR0mRZkLLdyLTPbWrYgXBo1/1jF8Lk0=; b=N/K7kIRQDebdQB6ackJcQWOduQkNkOWPLBa/bHqfUU8PHA4PFpsXmv07mPVHmWDIU4 aclb2ZBT9QCPpwea2c7PlMlk6bFr2EBsmxvnzy6Oo6VBA9b8Y8INSDpsSOI1bf0DSYEX oaqwMStwPCP8IwIyGZuSj2uguuD3pi7e2QpePG9wMl6SVYNJwB9KrWMH9VczjmF03dYh NmwKpqVwRotZPfVq9IVB1kiplK0wTd3BV5jmnUzhsKeNg6nq7NXqYPajZlFiINXIsqGu tMfGwLSutVhRvZw5yUGd+/ZcnBNrCsHnjEL/QaDnh4BxFmIeIPvLDiGwEXD3lTx7Lrwd LQog== 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:cc; bh=DiH4x83gJA3TAR0mRZkLLdyLTPbWrYgXBo1/1jF8Lk0=; b=uKD73uxavj9DNF7F/q/deA636TWNXef9/a8hOFB2zBepvkcH2wmyjduaJAFVR4IF6L WuB6DaKXmtpP6sG780mqUmE/jXn48suYPXm5QggoSCOEzATETT6kH/aM0fwPNdDnxlT7 noARvSJ1cCUJsGyiITmOzE548ezwAJNcVbPLx+dD7g0EjV796aLfC/B6F+x2xwgYs6VW e++ebb8jXEgYYLFjN4CaSEjBG3nQ4qSGb6FCXwLE7IKQU0dbja9AfDGpgnYIs5Sf9T9U 1YeJZnP/xYHsITny8Vt/c9EzNmmiKYLiXb3pAqew8JdyM3WIHo9LXEwiEGOEG1ElSaMf IRjg== X-Gm-Message-State: AJIora9sU3y/sglOK2VqiASS+mHVPUfsrfaua1m3LEJBINCfDiw3XsoX 8xUFerkntCx0Zt3Jy9V14iJtDuKd/Tss6IKTG/pXaqD/ttBl+g== X-Google-Smtp-Source: AGRyM1vmuUDl7BiWLQ87a9yNF5OF/uy/95kN33lPqKnEuh7aCPzOgIAhJK4Ty4xcGEj7kAco2m4AiyNlOMEL2rFlYMU= X-Received: by 2002:aa7:dad6:0:b0:435:7a44:7480 with SMTP id x22-20020aa7dad6000000b004357a447480mr4554923eds.138.1655909643548; Wed, 22 Jun 2022 07:54:03 -0700 (PDT) MIME-Version: 1.0 References: <7CB0EB0B-700D-49F6-8223-00A9B16F463B@php.net> In-Reply-To: Date: Wed, 22 Jun 2022 16:53:27 +0200 Message-ID: Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000157c3f05e20a8294" Subject: Re: [PHP-DEV] [RFC] [Under Discussion] New Curl URL API From: divinity76@gmail.com (Hans Henrik Bergan) --000000000000157c3f05e20a8294 Content-Type: text/plain; charset="UTF-8" nitpicking but I kind-of doubt the description for CurlUrl::NO_DEFAULT_PORT is correct, quote: > Instructs the method to return null if the port matches the default port for the scheme. makes it sound like these would return null: http://localhost:80/ https://localhost:443/ ftps://localhost:22/ Is that correct? I would imagine it returns null if the port isn't specified, rather than null if the port when specified matches the default port? On Wed, 22 Jun 2022 at 16:46, Hans Henrik Bergan wrote: > any particular reason CurlUrl::getPort() defaults to 0 rather than one of > the valid options? (that being CurlUrl::DEFAULT_PORT > and CurlUrl::NO_DEFAULT_PORT ) > > On Wed, 22 Jun 2022 at 16:23, Pierrick Charron wrote: > >> Hi Derick, >> >> >> > >> > - The new CurlUrl class should probably be immutable from the start. It >> > was my biggest mistake not to do that with DateTime. >> > >> > >> Thanks for sharing your lessons learned. But I still see some use cases >> where mutable objects are easier to use. From the experience you had with >> DateTime, do you think that having `CurlUrl` being immutable and providing >> a `MutableCurlUrl` would make sense ? I see some cases where you >> "navigate" >> on a website using the same CurlHandle and just want to manipulate the >> MutableCurlUrl handle to change urls. >> >> >> > - What happens if the curl library available on the system does not have >> > the features and functions that this new class relies on? I would expect >> > the class to not be available either, but the RFC does not mention that. >> > >> >> Good point. As you expected, if the functions are not available in >> libcurl, >> the class will not be available. Same thing for each constant/feature. The >> extension will "adapt" to the curl version. I will add this to the RFC. >> >> Pierrick >> > --000000000000157c3f05e20a8294--