Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130385 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 lists.php.net (Postfix) with ESMTPS id EFAF01A00BC for ; Tue, 17 Mar 2026 18:59:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1773773967; bh=6Sff0XSUcV5veAepoAs1OSMKZZGosIWmTMTFzwCDcu8=; h=References:In-Reply-To:From:Date:Subject:To:From; b=CyhzRSc+j9TcF+QVCSVI6vKrNw3d9M3Leq5pxzSTeUL6kFuKSCA7DhpmcZvfznYuJ otv5DIUA9km+lyHADsZlke00oHEreJXY83U0oPlb2dq8idTwvN3TvHZdR4Iek3aSGB dNPRva3GGeydfepb717vA4M4tbgJJhHQinSEQjxMTD631lzs9CKcmC6SChHDOBdxfa 9r9Y7CjDyaDHcIEdAz7ISDp9RGbE+V6/dEZsA40ZdvIXm3Ylc0w/MImoOoeaZxuCoq EyCkJjibB5dF/AT47X/QBWJVIFaSk86ikxRtO0D/M6hPBafYbz+jLRx54CSVHRPZhJ PUE2zoch/gePQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 548AB180062 for ; Tue, 17 Mar 2026 18:59:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_50, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) (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 ; Tue, 17 Mar 2026 18:59:23 +0000 (UTC) Received: by mail-qv1-f46.google.com with SMTP id 6a1803df08f44-89a1347051aso95189026d6.2 for ; Tue, 17 Mar 2026 11:59:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773773957; cv=none; d=google.com; s=arc-20240605; b=U+KJAq7ExfCcDs0xsNPetONoc8IuztfEK6v5Uy4ScF7W7/QHxjvYoWyRGJK9LiQY+3 +7vJLAiRBQa0nvfyQ0/1wczNMjUYT4K7FaP3pfN8JyJClLSwM849Nyd53OBEsP8ZPyb5 2FhsBhuuEtXxXhJjD7hKPu7msGFJV/LVbhJYQDl45iSKJTdEnAmbkRUk3JZQQEVQIQwH e495vXItXe5zKArrn2fUKhxNqLX5vz78cAHC0SzrSku984dbBDqvGp2LgCCqRfxxjh8Z XU2qu1qamzWLfGk+XJAMXV8f5kgh8qsVOL13w69zZ5FDHBus+KfcyJt2bDW07unbe2nq 1P7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=6Sff0XSUcV5veAepoAs1OSMKZZGosIWmTMTFzwCDcu8=; fh=RFBKMNwdsUBkXmmb8AAjYIg7L3EzMrZygiLbMB7seK8=; b=Z6FJELfAvKimJ8lPMSBjCCFfcWMmTF8IFbRfrOfCq64fwzYZshU10f7em6JFjeiBAS riGtFvzmkYZ05SegOtis2E3MUlBemmDPmQpvHsYC0Z5hWTsUs0GbmyOgGg2sE+5GkCfF paipUQnTIno/FagrFDPU75WxK0SZML8fztwgixnQ2RqPGcGQPxW4jaeaddr0i93bWULy +a6Dx6/JMSmWAcHIAmsVnKxDaZ8dYUyyLRuah/+Q2BXgd47zAz9DU5Q/66MuJ3SM4mTc PK+lo0I9Z9quT7PNBntYoFP6fxeo0pDnC6lOcZnzL5YIxeuQ//c0weypsgj2fDIlA4nI 5lGw==; darn=lists.php.net ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773773957; x=1774378757; darn=lists.php.net; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=6Sff0XSUcV5veAepoAs1OSMKZZGosIWmTMTFzwCDcu8=; b=ULZLJ1k5zG/vQMULyPfIJsvuJVkAbZQJoz8N36ep/bI3BC0DWt5UATr6hRNSY0sRbC m9SVSRUC/cmE4jpR/WbZYzT8LANWmHzN1EySRG5o0BpFxSPU0cR5vb9lgWQ61ppCMKcm iy+uwBdIrjb/latkwJyIWzqOQsCp5e0U8UJwTu2nBePQKUAAF1Js27B4jSiupslEFjWb Q2mfQp5cFmKnTGk1BvBRmHYG2Xjq4ndhR99hnOMbOJq9E0NVxJkwJkD4l8Sj5ZjP/7Ci bWJMyYC5qjWcH9xvPNI/3EcVfRKVaC+Y+9WM4mYBSPsWa5Xrq3OKhPRbf0tkXcRvaYM5 1PgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773773957; x=1774378757; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6Sff0XSUcV5veAepoAs1OSMKZZGosIWmTMTFzwCDcu8=; b=Iqk8JnzO2QIlVykZ7C75kwp+Q7MaQrG2ghtLc/uuaqSIp1OYsaPwJbmuHYC/LZmFPp 3n6JHlPzFjqwr4P+k59nhnA8eRoyrzDxH+8d+dJSTS9YLOeFpHpbw68TvZILCuoT5JPt fKI2/rE54wByLT1feO37FNTj4qhlORHxaEvF6+TXXm6PgQjLg4MQazhW4GxaSaDM19xF ruQ/LjfK/bRiuK8li9m4oxk/Snijzqdv9A0aTMJGFDiA4P3i06wln3aWLZVO+CEkGsjb +p7ervATkpQbK89XDs3cRbbFTIsZivwdDDtLq7yNuAAk2/D6hZW6I91D4/8OdTHTnM4r jY0g== X-Gm-Message-State: AOJu0Yz7tvtFvsZBWKkh0jri3BJ9SwVZq+BW7zG0W3pt8vkKj8wE5tzd oGJa7LSM3YmAmSrPC0L/13FelE6/k5VaT8RRgDbt34UfFB/vpOdEfTx/22gaiFmYuk5N3Q7fmea QHHjByszCZNQ7YgXZJDINcvUtovvaH75+BgYK X-Gm-Gg: ATEYQzz66mRvKu6OdPW3hXRrKF7Sb7jqxCUlPG6AQzyI8SC/S7exTryg9wrzhtphVCg 9MfR1GfNPbAFD4Wo2dWUngbvUqOEse1vt35TEKza6IlooN4Y9ZAvzuXSP6BNli8j9X0Bd9J8oL4 fqaD4Rq0ci7UtEQZIJVPQqOf/TgDO3EfJ7E6iPP1KucWhiXIhTGT1+B+vcgDOhaZUd4HSrGGc+S uUjEeGutNgfJHLcEUuP3rO7pw5Y6x/+ZfiDPjRNAsTUzAtxnmZWXnmdvkREoGc2930kuUMSluhD W5wwi9WcEy31a1/HW9ku1W6+YH+Yb6mzkV5rzOo/jHrkVDY1SpgnqmUSjzQ6eKSzMjP5ZEDeqUY cKC7mrxT50X/8dOPxNit0HyoG+6A= X-Received: by 2002:a05:6214:21ac:b0:895:c06:8cbf with SMTP id 6a1803df08f44-89c6b70080dmr11714216d6.62.1773773956879; Tue, 17 Mar 2026 11:59:16 -0700 (PDT) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 17 Mar 2026 19:59:06 +0100 X-Gm-Features: AaiRm53IsLgpqJ0uue1O2FA1FMgs3MwOtXZGiL5ZofiI2PmFaoUkxPIH5lGnphU Message-ID: Subject: [PHP-DEV] Re: [RFC] Allow Reassignment of Promoted Readonly Properties in Constructor To: PHP Internals List Content-Type: multipart/alternative; boundary="0000000000009c9abe064d3ceea2" From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --0000000000009c9abe064d3ceea2 Content-Type: text/plain; charset="UTF-8" Dear all, Here is a new RFC for you to consider: >> https://wiki.php.net/rfc/promoted_readonly_constructor_reassign >> >> As a quick intro, my motivation for that RFC is that I find it quite >> annoying that readonly properties play badly with CPP (constructor property >> promotion). >> >> Doing simple processing of any argument before assigning it to a readonly >> property forces opting out of CPP. >> >> This RFC would allow setting once a readonly property in the body of a >> constructor after the property was previously (and implicitly) set using >> CPP. >> >> This allows keeping property declarations in their compact form while >> still enabling validation, normalization, or conditional initialization. >> > > > Friendly reminder about this RFC. It's been quiet for 13 days so I plan to > start the vote on Thursday if there are no more concerns to the text of the > proposal. > I made some changes last week based on Ilia's review. Nothing substantial, just clarifications, and removal of the implementation notes, which don't belong to the RFC text. Here is the diff FYI: https://wiki.php.net/rfc/promoted_readonly_constructor_reassign?do=diff&rev2%5B0%5D=1771972248&rev2%5B1%5D=1773345559&difftype=sidebyside This postpones the vote by 7 days, I'll open it next week, unless the discussion continues of course! Cheers, Nicolas --0000000000009c9abe064d3ceea2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear all,

Here is a=C2=A0new RFC for you t= o consider:

As a quick intro= , my motivation for that RFC is that I find it quite annoying that readonly= properties play badly with CPP (constructor property promotion).

Doing simple processing of any argument before assigning it to a reado= nly property forces opting out of CPP.

This RFC would allow setting = once a readonly property in the body of a constructor after the property wa= s previously (and implicitly) set using CPP.

This allows keepi= ng property declarations in their compact form while still enabling validat= ion, normalization, or conditional initialization.


Friendly reminder about this RFC. It's= been quiet for 13 days so I plan to start the vote on Thursday if there ar= e no more concerns to the text of the proposal.

I made some changes last week based on Ilia's re= view. Nothing substantial, just clarifications, and removal of the implemen= tation notes, which don't belong to the RFC text.
Here is the= diff FYI:

This postpones the vote by 7 days, I'll open it next week,=C2=A0unle= ss the discussion continues of course!

Cheers,
Nicolas

--0000000000009c9abe064d3ceea2--