Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118051 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 28290 invoked from network); 22 Jun 2022 13:08:04 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Jun 2022 13:08:04 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7BF9C18050B for ; Wed, 22 Jun 2022 07:57:35 -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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,HTML_MESSAGE,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-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (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:57:34 -0700 (PDT) Received: by mail-ed1-f48.google.com with SMTP id z7so24260176edm.13 for ; Wed, 22 Jun 2022 07:57:34 -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:to; bh=DVuKLIp43VF60u1LCaLUO8f46nRNBI1luvGoIBEHJik=; b=fJANHd4frpi9YM+Ahe5s4RUieA3EOcUjIZRVP29+Ie7AuxyxfiUHpPZxDPCyDEYNLy QbF5bYByB5Y7jCuywlEnp0jyp0+DKOb4zi1dJD63inSC9G9EuAuOVcvxzcKoU/AftImx I9YbZo3V892msUA/heGfdRjJAiV/36WprlZVbM7yN5WyLCrNqBjewNa/SNSmNmpvnBCb g/x1YMq5l5CccFIpMuurzzYQGY01MRhjPs8BxUVCP4qxM2l0F4J5FdZ2U5vSyzL8585u Z90eCLnAT05mCVgl3gMPBhHLVOPacP2ZusraOmpqwZRtduUFyarb/ChRfSzImRhO3xZG 6/jQ== 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; bh=DVuKLIp43VF60u1LCaLUO8f46nRNBI1luvGoIBEHJik=; b=tKf+TPELOyN/NSUbHOi473B9360SExA3c6FCaTmP3kfGBg55cEv1z+75iO+7bMOjWF qX5DSeymVQEUjQxtyQVokjSrnAZ0DGd9J2/etDBFmjGwbEGU7Mtx6w6QzcWQIc+LhQ9T IeGgiaGqp68xUug0K2HQqMP+Knnn4ljf2yhgnXWaFMTo7W3c6ODBXdKOWQ+EeCKZ/gLd Kx4CQ2VvopkXsITDwSoGwtQn0+v9N/crGk7ralPODN45X0ZBJfL/uo2XKr7OXf1ZTTrD LspjGN8yt5Qu6LFjy2hqQu6hWIHdSQNOfSJatv984S0ozGZl4BUWutj6fnjQ7vWFypZx XflQ== X-Gm-Message-State: AJIora+BqN98PVRt9ItJS3ZajuexEQ7fb4RlPaTSTpBqrdHYjeejD1QF zxyrMHJdTbxOkZiljxlY7uFg7EEOLzlxp69p9+RVy5c+rlA= X-Google-Smtp-Source: AGRyM1ugiB3buMUeOwO7z08+ZLkfVUs5EIaLU3DWkONzKML+50vguqVQxoTWNFdhz4ujIhtVQey+hOArw5MVILm5ECU= X-Received: by 2002:a05:6402:2714:b0:431:6a31:6530 with SMTP id y20-20020a056402271400b004316a316530mr4567469edd.245.1655909853497; Wed, 22 Jun 2022 07:57:33 -0700 (PDT) MIME-Version: 1.0 References: <7CB0EB0B-700D-49F6-8223-00A9B16F463B@php.net> In-Reply-To: Date: Wed, 22 Jun 2022 16:56:57 +0200 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="000000000000990e2805e20a8e78" Subject: Re: [PHP-DEV] [RFC] [Under Discussion] New Curl URL API From: divinity76@gmail.com (Hans Henrik Bergan) --000000000000990e2805e20a8e78 Content-Type: text/plain; charset="UTF-8" (dammit, mixed sftp:// with ftps:// there, ignore that, i meant sftp:// ) On Wed, 22 Jun 2022 at 16:53, Hans Henrik Bergan wrote: > 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 >>> >> --000000000000990e2805e20a8e78--