Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130155 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 A073D1A00BC for ; Tue, 24 Feb 2026 19:04:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1771959851; bh=w9al1rWPrDIv1BG+n9C249N1egmuzh5guAACqlN9np8=; h=Date:From:To:In-Reply-To:References:Subject:From; b=MyrW1NBar16ogN/+gvg7+UWQt3Nq6rD9q2kqsIEwkp3W9a3AwoX5shLlZ36zcyWt3 hXjF6M6t7s+FJfopg07FqQf/22bQh1WTMmjGFR3b/CBG7qSZblcPmwNbGaeT/3nYHU ZdZekXmOsjcOPmvqZBTWOjjdN0/SkQJqkHANkbRsu21uc5ByaNcQTsSfCX7RmJT/v+ XCbfgZvCoxYBM5YyY1oZXAzy7oIEx1R7jvEYDQf8281wCCau5uV6VdG6mN24bgJFjZ l3DN2xYxLgzjUm0LkJbDSJx54bpr3BIpN7hoXIWxhpn963MNVxhpwJwtlLfBfpnG9k 2CMYID2p9adNA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3B0E318054E for ; Tue, 24 Feb 2026 19:04:07 +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.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fout-b1-smtp.messagingengine.com (fout-b1-smtp.messagingengine.com [202.12.124.144]) (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, 24 Feb 2026 19:04:07 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id 4E26E1D00094 for ; Tue, 24 Feb 2026 14:04:01 -0500 (EST) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-04.internal (MEProxy); Tue, 24 Feb 2026 14:04:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm3; t=1771959841; x=1772046241; bh=c1tXrcY+i6oVMFUK1bzhY JJ8f/9IQPAhZ0o5HVWvX6w=; b=Pe8CLIzVh6tTKbGBgxDfxRIYZHTQnwAV/6n4E UK5Q8rBTTqqn2zdcJOar/AwEr8od6xFQP2bCRQzmBh2rPE1/V3M2wDKay6Je3tB5 R3yQ+oM7aIckMOAZdS9Nw0d3ybgt62l7OshxlKlrt7ccTqeNmbAS3Hev5D85K0Is MB9H+9vJQoxQV4buqmkMaIrpGjMO5NKxD8SnL4JZuV2IH/QUPvyZkDJWXN0e6v4e TwYT7oRaSpqT5pfSZbSlfK936APN3JEJ3HYy/KMe6ky8hWHq8c39A2kmM9qrVsWW vvXIICS1v9lsDJ6H+6Dv2GrIvfhSzIxv2hPvV9nhKXk/ImRvA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1771959841; x=1772046241; bh=c 1tXrcY+i6oVMFUK1bzhYJJ8f/9IQPAhZ0o5HVWvX6w=; b=wKG4T77eWhd7xJGwB xNwpF14Kj5QoQ4y2+YoHtz0no0hHZIuqoMNshRNiebuxJ9TklntJ/03lUDO8ZxUP I+1vpMM6U9DvYHpsNK81JKOayr3GidM0ecoWWW9UIkGyiKOKFcaSHEuDFY0/bfqB ckGOeiP7RCPZufTm5xXio49g0457cJ1yWHAySTKpkJvQqMsRc3fZPbyJaf4+X1+9 +GYdSJzIYR31WTlEv31CAu5i3qSE1Nxe/KjHoxkOTm4L1oNyi24bgQffGDDGNrXi h3oQK8iGG7Lxz+KhSS7MPNGRFkzq0BkCt058/z9sXft+GSrlnIYJKnXqGmn+o5/Q pX64w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvgedtleeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvffkjghfufgtgfesthhqredtredtjeenucfhrhhomhepfdfnrghrrhih ucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmqe enucggtffrrghtthgvrhhnpeffieeivdfhvdeguddttdegteeiueegvefhteehfeeffeet udeitdehtdegjeeuieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomhdpnhgspghrtghp thhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepihhnthgvrhhnrghlsh eslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 92F4D700065; Tue, 24 Feb 2026 14:04:00 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: ApWOO0YdA2Vg Date: Tue, 24 Feb 2026 13:03:40 -0600 To: "php internals" Message-ID: In-Reply-To: References: <4b74f9a1-96d2-4104-abdd-fe56c5e7016c@app.fastmail.com> <585bfc82-a522-43ec-be42-b8945952fe8b@app.fastmail.com> <3cd0d869-5a5b-467c-8eb4-3f8647ba7aa7@bastelstu.be> <6def7a03-eba4-4289-ac4f-0881c5d4c092@bastelstu.be> Subject: Re: [PHP-DEV] [RFC] Allow Reassignment of Promoted Readonly Properties in Constructor Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Mon, Feb 23, 2026, at 1:49 AM, Nicolas Grekas wrote: > Le dim. 22 f=C3=A9vr. 2026 =C3=A0 19:14, Tim D=C3=BCsterhus a =C3=A9crit : >> Hi >>=20 >> On 2/19/26 10:49, Nicolas Grekas wrote: >> > Thanks, I've added new test cases to cover this. >> > I've also improved tests as suggested on the PR. >> > And finally I updated the implementation to reuse IS_PROP_REINITABLE >> > instead of adding new flags + use an approach that doesn't require = walking >> > the call stack. >> > PR and RFC updated accordingly, all green. >>=20 >> Thank you. The implementation looks much simpler now and the tests al= l=20 >> make sense to me and I can't think of any other relevant =E2=80=9Cedg= e case=E2=80=9D. >>=20 >> I have one more comment regarding the RFC text, which should result i= n=20 >> =E2=80=9Cminor=E2=80=9D changes as per the policy of making clarifyin= g changes: >>=20 >> 1. =E2=80=9CSet in child before parent::__construct()=E2=80=9D also f= ails, since the=20 >> property slot is not yet initialized: >>=20 >> That explanation and example does not seem to be quite correct: It's = not=20 >> the `$this->x =3D 'C';` assignment that fails, it's the implicit CPP=20 >> assignment when calling parent::__construct(). The explanation should= be=20 >> fixed and the `// Error: Cannot modify readonly property P::$x` comme= nt=20 >> should be moved to the `parent::__construct()` call. >>=20 >> The test in the implementation was already correct. >>=20 > > Hi Tim, > > Good catch thanks, wording updated! > The RFC is ready then. Any other comments from anyone else? > > Nicolas Two minor non-substantive points. 1. The "supported operations" section all the way at the bottom seems re= dundant. That was already specified earlier. 2. It could be helpful to include an example of using property hooks in = the intro; there's an example of the other 2 options, but not of hooks, = which are also mentioned as a not-always-ideal alternative. (Let me kno= w if you want help or suggestions with that example.) Otherwise, I'm happy with where this ended up. Thanks! --Larry Garfield