Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117762 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 80956 invoked from network); 21 May 2022 23:04:08 -0000 Received: from unknown (HELO localhost.localdomain) (76.75.200.58) by pb1.pair.com with SMTP; 21 May 2022 23:04:08 -0000 To: internals@lists.php.net References: Date: Sat, 21 May 2022 19:45:45 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yIRyvRyCZJMr8xW5x4wx6FrQQsiJI1mGM" X-Posted-By: 96.61.105.82 Subject: Re: Declaring tidyNode properties as readonly? From: ramsey@php.net (Ben Ramsey) Message-ID: --yIRyvRyCZJMr8xW5x4wx6FrQQsiJI1mGM Content-Type: multipart/mixed; boundary="1e5CAuvDXZzPqKk8BzV45Ng0beI9yNefS"; protected-headers="v1" From: Ben Ramsey Newsgroups: php.internals Subject: Re: Declaring tidyNode properties as readonly? References: In-Reply-To: --1e5CAuvDXZzPqKk8BzV45Ng0beI9yNefS Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 5/9/22 02:17, M=C3=A1t=C3=A9 Kocsis wrote: > Hi Internals, >=20 > When I was working on making the properties of the tidy and tidyNode > classes declared (https://github.com/php/php-src/pull/8515), I noticed = that > it doesn't make sense to write the properties of tidyNode, as the prope= rty > changes won't have any effect on the parsed HTML node. Christoph provid= ed > an example to highlight the issue with this behavior: > https://github.com/php/php-src/pull/8515#issuecomment-1120400605. >=20 > In my opinion, the properties in question should be declared as readonl= y in > order to make > the behavior of tidyNode more predictable. Of course, this would be a B= C > break, but I believe > the use-case is so niche and misleading that we can afford to prevent i= t > right away in PHP 8.2. I noticed that there weren't any responses to this, and since it=20 involves a potential BC break in 8.2, I wanted to follow up and make=20 sure others on the list have had a chance to review this and offer any=20 feedback, concerns, support, or opposition to this. Especially regarding this: > Please let me know what you think about this change, especially if you = are > aware of any valid > use-cases regarding the modification of the properties of tidyNode. Cheers, Ben --1e5CAuvDXZzPqKk8BzV45Ng0beI9yNefS-- --yIRyvRyCZJMr8xW5x4wx6FrQQsiJI1mGM Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEEObZBND2MEEsrFG3D+cOdwLlphUQFAmKJh7kFAwAAAAAACgkQ+cOdwLlphURb ZA//a6E9zJoO1xRfkD0tKP8PnbwG8WKQ8aUJlRbUGP/W5aDcLSxSisvntZKDXNxjMDXz+HizQcx8 6M0YCf+yN/lv2XilBzKSG5HWz3D70hKdvib829K2T33hH9F1uipowvLqI1Ny1eX52GLRWuU/5BNW eeS8pBCQI8kt6Oble7D2Jd6braDijgJQCM5aP1jSUBtLJV811QFndvS2FugRmvHP1CmDwZFTCAxm pL2PP3/uhAq9tZ7t/lZyR63mvw9PgV/sO+/fBVd/ZZn8ZlxeqYY6wt+de2Tq9Dz6vim4qkIBdjFO THBKOZXA7U57FSgj4JKsnUHtapaRMu6p90/oV0XfE/+avz5rSv6c4IhZjneJGlwmLBFKkkms84nX p4LqDsDrNV1Mu+6vThpFcbHygf5+gvNs+4qJNh18DvHHJ30nqf0zDaU0WiJvp4b/dZbpgXPTSr/2 I7jqVW+m/e7rZMEuFzEK5h1bV66CD+DGnCRq1HhMiLpBssrgqTJX6kjrO7nWxEPFsh0GTcVsnFFo ZQ5xHhYMWcdNODQ1JAr/3Q4PaG3FV+xSumcXikpXtE7Lioy2Ghm2iarkn6eWALvtqCWqDZ0fnfVb aoVQvmTNZakdTMP23ezu0/eMU4jkyMhbzUqgIF72EzgMCXq0HvNirz7e5PlET7m+UDA7/FUsT/Ii nB4= =0rni -----END PGP SIGNATURE----- --yIRyvRyCZJMr8xW5x4wx6FrQQsiJI1mGM--