Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124071 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 1883D1A009C for ; Sun, 30 Jun 2024 06:01:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719727369; bh=gdPKLPIlgGpBMTH8gdk97BddL5k4WlY6zh7uSSMHsjw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=kKUVvTkxTcDDtz0VgZzvv30C4DO+G1n8CnwuPqfbLwZOPBgfKjE6ko0RANF/aql3a u/vTnlq5oUCmwZ9TLzP486L627PyzQJjvkH0+pa9QfC9wccUkVUkGXkpV2Bwc3zT9u CoYeVwDwpT7eLY4uTI3IcsWfWq7/enFa3pyvEGk1JrzHPdgxORMjhri6TwsKZIicOn BIvuZ1ALr94Shy8l949jkwSBjPsEUI9AFJ4fOTqrWz/v4b4veilTr4NSg6rVVWA51O qdtrfyTm5xEiZFAjAagUhkzlt20e+GEmuUwM/FeyLIGPbC2KhBBq+Ab+gZmMkRiSvb CKU4C2p1vlXPw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DDC2C180A94 for ; Sun, 30 Jun 2024 06:02:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 30 Jun 2024 06:02:48 +0000 (UTC) Received: by mail-qt1-f181.google.com with SMTP id d75a77b69052e-446449e5df5so9915891cf.0 for ; Sat, 29 Jun 2024 23:01:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719727288; x=1720332088; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=gdPKLPIlgGpBMTH8gdk97BddL5k4WlY6zh7uSSMHsjw=; b=d8yPtdzbM4dmD8RqExn4Z4gQrc21Ld+SW9MC6sLPTxh0+9lSFCdQt2SDNWsCifOmCA 0E7WM3YgiJ23DJbmrXCtgYgAkA8xT4MWGffGjt9w/rrFKffUv7PtS6jf8QInFdd70dSq BsNCY4GktrBB/MbxmN2RZTcgDpk31rMTehw4ICHVoF9ZCs9pymYNwYJurlBDSFQ9LzAd ZGLp5zJ95bzkP/5+Ve+alcwDw5cT9O1nGd/eN8QPTSr0qktYeDpuBoLMaE5yqxOB7unU y3q6OyfHvBUnBcg5qeNoNu4dHg5nzb4dgBvAX8xk8x/IV8y9rmeEAQGTuY/Y/ah4k8kD jHPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719727288; x=1720332088; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gdPKLPIlgGpBMTH8gdk97BddL5k4WlY6zh7uSSMHsjw=; b=ZokboMkClNp1waNT1cu/EXvsG8NaK7uKICEshNN4sEQJFR0yNoJowPqpuGZrgNGbDS flLyUb19GQVm7wp1OZKb+/LwjOkIqpg7uWA8sbcLFjRSw8OltdNVAvoTeMeyrzvRuyU5 8afRmPbX1ccxh4U36yk1VdI8ilYgTzxDlSdxYT1bDWMhHbPssD86IOzgGsU81yrYOyiP IoMdn9shXEpcvCNv7JnToZli23wnyMe1Hkwm1Jrro03+uikIh8HE1pYr6EMwcITnN+sa 3p9ZXoNbo9qw1EZn1DzuS4ILM/Ffk1nTCx3cHvFbCVBTHEECPi5ZxBbYXgWq3ggIFjcF rWdA== X-Gm-Message-State: AOJu0Ywrx7M3z/eLewkMUfxw/cD6U1Z2gCBMDvke/pcOIAgN2XrFtkVh B9s9mo5PeHM6BwEzN6O+6AGLJfIbGFMzmYd74LycpV1iRnoMp1N0DbAT2Lx8Rn4my7GkUjIwJAi NxoBoTMen9iEVdKEwQlKIBExnWlI= X-Google-Smtp-Source: AGHT+IEbjrslOx/FMO08IstbmaDR39A6+mexTkQLwTQy0bqsIj1v3FJAGto9BA/a6wrWI8YUmcWNMRt9pVjrrHn4Bd4= X-Received: by 2002:a05:622a:14a:b0:446:3927:5a9 with SMTP id d75a77b69052e-44662c94036mr38864931cf.10.1719727287933; Sat, 29 Jun 2024 23:01:27 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 30 Jun 2024 08:00:00 +0200 Message-ID: Subject: Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API To: Ben Ramsey Cc: PHP Internals List Content-Type: multipart/alternative; boundary="0000000000001ba261061c1536c9" From: kocsismate90@gmail.com (=?UTF-8?B?TcOhdMOpIEtvY3Npcw==?=) --0000000000001ba261061c1536c9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > > It mirrors the interface, but it can=E2=80=99t be swapped out for a UriIn= terface > instance, especially since it can=E2=80=99t be extended, so I wouldn=E2= =80=99t consider it > compatible. I would still need to write a compatibility layer that compos= es > Url\Url and implements UriInterface. > I guess my words were slightly misleading: what I should have written is that the methods themselves are compatible. > Since PSRs are concerned with shared interfaces and this class is final > and does not implement any interfaces, I=E2=80=99m not sure how you envis= ion =E2=80=9Ca > next iteration=E2=80=9D of PSR-7 to use this directly, unless what you me= an is that > UriInterface would be deprecated and applications would type directly > against Url\Url. > Yes, I meant the latter exactly. If we had a well-usable URL object representation in the standard library, then there would be no need to have an userland interface as well (unless they have different behavior or purpose). Analogically, we have DateTimeImmutable, and there is no PSR for a date time interface. (I know there is Carbon and other libraries, but they are for convenience, not for interoperability). --0000000000001ba261061c1536c9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
It = mirrors the interface, but it can=E2=80=99t be swapped out for a UriInterfa= ce instance, especially since it can=E2=80=99t be extended, so I wouldn=E2= =80=99t consider it compatible. I would still need to write a compatibility= layer that composes Url\Url and implements UriInterface.

I guess my words were s= lightly=C2=A0misleading: what I should have written is that the methods the= mselves are compatible.
=C2=A0
Since PSRs are concerned with shared interfaces an= d this class is final and does not implement any interfaces, I=E2=80=99m no= t sure how you envision =E2=80=9Ca next iteration=E2=80=9D of PSR-7 to use = this directly, unless what you mean is that UriInterface would be deprecate= d and applications would type directly against Url\Url.

Yes, I meant the latter= exactly. If we had a well-usable URL object representation in the standard= library, then there would be no need to have an userland interface as well= (unless they have different=C2=A0behavior or purpose). Analogically, we ha= ve DateTimeImmutable, and there is no PSR for a date time interface. (I kno= w there is Carbon and other libraries, but they are for convenience, not fo= r interoperability).
--0000000000001ba261061c1536c9--