Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118142 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 3807 invoked from network); 30 Jun 2022 14:56:42 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 Jun 2022 14:56:42 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 37F1418054E for ; Thu, 30 Jun 2022 09:48:15 -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.2 required=5.0 tests=BAYES_40, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (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, 30 Jun 2022 09:48:14 -0700 (PDT) Received: by mail-pl1-f177.google.com with SMTP id o18so17536134plg.2 for ; Thu, 30 Jun 2022 09:48:14 -0700 (PDT) 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=pm6yjtNuSyci9yQhTIpFPoViUay1vBvUaiNtv65fOO4=; b=kY3PJ4fuKg5zu8qIrMtdVAC4KQrREYnL8kEB78d/pZx76VsWGps16tfPZPE5Z38d55 C5cOQs6Te6S4B0J1tOpJeIkgftuQMLNOGw6dZ2T36cKrkzSKTnaqvi2hqsj9yUyHleuQ 1mbPgwPvXz5D3s+xkACprtIjzaZ3irMnXOeZW1f86yqaC8dGxTAIcaW7x3fvmMxa/Ne2 rp3G+toWK6z4G1UWUWjB9xlUCiusjP65X9UCB9KBz2zscK+M6NPANXZ53nfPIGBGddVE wuA4wLxLiRjONuEfLd2ceEbpNz/mxCcxCYFs9OopfeLjj7eOA049epLX+j2IEpvnP3Ib EUwA== X-Gm-Message-State: AJIora+p3fR2Vu3VuI8FATZLLgB5CcpcR7ZNxxMwTAT1rF0pnxIpZMJw CjlpMBzhxa3m/7KYJgvVFJj0djcEEM/sXrbJR8/4cg== X-Google-Smtp-Source: AGRyM1vNfC5dj2WQCzD1eNjLtfs2y7jU+/0NOvRGrnM+SgzMQhsZsLp/YYciZ04Y6KjGgzIs5EAbamx+5EU9+KmiZnM= X-Received: by 2002:a17:903:1248:b0:168:d2ba:ee71 with SMTP id u8-20020a170903124800b00168d2baee71mr16235672plh.150.1656607693513; Thu, 30 Jun 2022 09:48:13 -0700 (PDT) MIME-Version: 1.0 References: <7CB0EB0B-700D-49F6-8223-00A9B16F463B@php.net> In-Reply-To: <7CB0EB0B-700D-49F6-8223-00A9B16F463B@php.net> Date: Thu, 30 Jun 2022 12:48:02 -0400 Message-ID: To: Derick Rethans Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000001abd3f05e2ad0958" Subject: Re: [PHP-DEV] [RFC] [Under Discussion] New Curl URL API From: pierrick@php.net (Pierrick Charron) --0000000000001abd3f05e2ad0958 Content-Type: text/plain; charset="UTF-8" Hi all, > - The new CurlUrl class should probably be immutable from the start. It > was my biggest mistake not to do that with DateTime. > > After thinking about it and some discussions, I followed Derick's recommendation and therefore changed the RFC to make the CurlUrl class immutable. All the setters were replaced by new `with*` methods. For example setHost is now withHost and will return a new object with the host modified. This will prevent confusing behavior where the CurlUrl object would be unintentionally modified after being attached to a CurlHandle. Pierrick --0000000000001abd3f05e2ad0958--