Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126975 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 B7CDC1A00BC for ; Sat, 29 Mar 2025 22:19:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1743286608; bh=zCSO9FFur/JG8wrnn58oflsMyQf8jqCyPHMwNDWDRHA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=LNX55g8hJhoEq2O6AFk3FJK1aHFzLBVfasayEQ5XphIi/2Cx4IDdaT0NJa0sTDedp uzfqHctWevO6LMFMHHV104Sb4Cpq9+wCN35i5xhuiMDB2qzn8gbldgIhUKQ9y1650W E2EpGm8ga81WDW4cedO71r3CS9Z3RTZ7F4XKYb0fba+86OJ5sYdQq7vvGdt4m3iJPe s5GxO1Nwwt5yhib4nAMtxvqL9nP4lfBGw7wekZsL2iLmDWs673EwC0X9XPscqR+8gx dL/jPCedoLYnCNSlNncWUayA/juA+decusflfS9l1m6yjPTlVnjOFircxtPj3v/iBW a3pfshXjhLGcA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C4ECD1801E1 for ; Sat, 29 Mar 2025 22:16:47 +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=1.0 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, MIME_BOUND_DIGITS_15,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (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 ; Sat, 29 Mar 2025 22:16:37 +0000 (UTC) Received: by mail-qt1-f180.google.com with SMTP id d75a77b69052e-477296dce8dso34488271cf.3 for ; Sat, 29 Mar 2025 15:19:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743286744; x=1743891544; 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=Qzt3dMoADPHCLxmBSt9tOFdsNE72R480UbSndMjk8Ew=; b=lZn++74FZiof0QnKrUw1ojwaFWtato63hq4J5QppoDXbHa82BRcBENZratmnHc5+NT /wRucC0nv/eS+v+tLqHspMUd/kjM4wZ+dgpqTli3FvPFPr8zLb1PRCqDNNeCH5F3y6PD jdY5e1cAp60MLcZLFapStizQpsPe0PaqRAovyNLMzo+ewHPi0QDuVT79VM2ty8tET8vx yO+me0aGtCXwUgU/2umR/JHx+CZsin7NlInZQ9h+bZbL3aWlcOQSYKBGTL66sCPACFRQ 6tKLHS/HXuy0k2lPlMIA4zI3vXLRqBHPPx38CZzXY5YRmW6yZKBJqtidqfPMHg9Yv+aE fzMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743286744; x=1743891544; 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=Qzt3dMoADPHCLxmBSt9tOFdsNE72R480UbSndMjk8Ew=; b=MrPCJ2uK0Q1T3Q5SbZTOcI1OGoLLvK0UCOxQ081XbIYATNdahR+w0sDBMTMoFsHnLO 5Tr954Qo85OBDHSby2gG+JuQW6Y6lTtmrDkkWjHgSADgWt6anKa+0GRKYnnZpBNTrf9o K2WmGiulrGyfD/H75O4HjY9R7NoU974orq+KV9yqkZpspq31HyRy+UuGcHGQ/6y3Cjcx VFLHHasRIMjewlw0ahyMiU9QjrP00pW2+A667NOyOdGxUPg7sz8VM/ERnLStOW2xgO6n DwUeKElxqdB/V4Z/bKDs/imTAMOWl0e6VrDH3Ffia1moR358irnV/x3aG6HENtpJTL2v jo2g== X-Gm-Message-State: AOJu0Yy4lxpUuIMlknQd5PmaZF+6aOljECPdAu/X1Cz8DP8lAEZpgMLZ AaTIQjz12kgKqGGPdBdMtaVPxim3b7MlNT8K9YM6QjaJZmLnTAZv8tY/oz5uxev0bntDck+iip6 +Sj4gM6bsFqNdeVgdPl1161Zl1dTDgYX6 X-Gm-Gg: ASbGncvCdNe+IRYIX/kCzwf501/18mTVerl2MpyrdD/Q9jV7z+dr1KTnY8qNgSeAFna EpnvK+PytGAyNXdSGr8WG32OQvYVDykPNvK5CZpgKGrcLC7bbEvGKt3Qyady/JRPQcTBm3xJYZ9 kGIGPRwlA+Ibs0Xsmmbp03bPTISDM= X-Google-Smtp-Source: AGHT+IGqSiWkkGQM5jG2NoaHLTyT5nxmGMkPuVgRd2r9xAfDjI7dkD/IUDitVfrfvoIal3b5SYnKvgRSqNR9YMfn4OQ= X-Received: by 2002:a05:622a:1a96:b0:476:790c:73a7 with SMTP id d75a77b69052e-477ed74e229mr51471221cf.40.1743286744465; Sat, 29 Mar 2025 15:19:04 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <8b7044d1-fde1-4701-a914-a63c8ca67099@app.fastmail.com> In-Reply-To: <8b7044d1-fde1-4701-a914-a63c8ca67099@app.fastmail.com> Date: Sat, 29 Mar 2025 23:18:53 +0100 X-Gm-Features: AQ5f1JqqvF2oA4ZPQ7Y538TNe6qeGYeRikt5GnnqDFRGyvuLDMzxJxZO-4IQR3Y Message-ID: Subject: Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API To: Larry Garfield Cc: php internals Content-Type: multipart/alternative; boundary="0000000000002547720631829349" From: kocsismate90@gmail.com (=?UTF-8?B?TcOhdMOpIEtvY3Npcw==?=) --0000000000002547720631829349 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Larry and everyone who took part in the final vs non-final debate, Thought: make the class non-final, but all of the defined methods final, > and any internal data properties private. That way we know that a child > class cannot break any of the existing guarantees, but can still add > convenience methods or static method constructors on top of the existing > API, without the need for an interface and a very verbose composing class= . > I was thinking about this a lot, hesitating a lot on all the possibilities. At last, I went with final classes. I know this is disappointing for everyone who wanted to have an unlocked implementation, and I am still sympathetic for providing some kind of extension point. I synthesized my thoughts in a very lengthy section: https://wiki.php.net/rfc/url_parsing_api#why_should_the_uri_rfc3986_uri_and= _the_uri_whatwg_url_classes_be_final so please read my full reasoning there. TLDR: First of all, let me clarify that I want to open the API as soon as the API becomes mature enough. However, based on the heated debate, we would surely need a lor more time to find the best solution that won't have unforeseen surprises. Since the final vs non-final question is a very small (but important) detail of the proposal, I would like to discuss it on its own, without affecting the whole work, and without risking to meet the deadline of PHP 8.5. I really hope that this decision will give back the focus on the most essential parts of the proposal that cannot be changed (or only with a lot of difficulties) once the feature goes live: I mostly think about the percent encoding/decoding related behavior, just to name one thing. M=C3=A1t=C3=A9 --0000000000002547720631829349 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Larry and everyone who took part in th= e final vs non-final debate,

Thought: make the class non-final, but all of the defined methods final, an= d any internal data properties private.=C2=A0 That way we know that a child= class cannot break any of the existing guarantees, but can still add conve= nience methods or static method constructors on top of the existing API, wi= thout the need for an interface and a very verbose composing class.

I was thinking about this a lot, hesitating a = lot on all the possibilities. At last, I went with=C2=A0final classes. I kn= ow this is disappointing for everyone who wanted to have an unlocked implem= entation,
and I am still sympathetic for providing some kind of e= xtension point. I synthesized my thoughts in a very lengthy section: https://wiki.php.net/rfc/url_par= sing_api#why_should_the_uri_rfc3986_uri_and_the_uri_whatwg_url_classes_be_f= inal
so please read my full reasoning there.

TLDR: First=C2=A0of all, let me clarify that I want to open the AP= I as soon as the API becomes mature enough. However, based on the=C2=A0heat= ed=C2=A0debate, we would surely need a lor more time to find the best solut= ion that=C2=A0won't have unforeseen surprises. Since the=C2=A0final vs = non-final question is a very small (but important) detail of the proposal, = I would like to discuss it on its own, without affecting the whole work, an= d without risking to=C2=A0meet the deadline of PHP 8.5. I really hope that = this decision will give back the focus on the most essential parts of the p= roposal that cannot be changed (or only with a lot of difficulties) once th= e feature goes live: I mostly think about the percent encoding/decoding rel= ated behavior,=C2=A0just to name one thing.

M=C3= =A1t=C3=A9
=C2=A0
--0000000000002547720631829349--