Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128116 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 3F6A11A00C1 for ; Fri, 18 Jul 2025 15:51:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1752853804; bh=GNfV2nChtoXK6lX+PsnDji0b4BhEZx09wUAX0htleQE=; h=Date:From:To:In-Reply-To:References:Subject:From; b=Q1AeBXNjkMRNo0GXTRy8GSWfTojQVxSJvVQM5UcyWfIIwHsJCPnVuM0/6gN4kHtBP w23hBDW1y4ccL2Z47l+lNnLDSVf/biXRMlfmtZIwLIfCOqlpGHqVG0GprGSw9eqCBx A+HjNgX1O+e0iEEFZ8aaj2H4EzkoxEbnD7sSpUIgFXflaak5g37RFzJub+SRLvF/kx hATzUE1Fcu2uONltaNUn0ICH1Oa1sJeun9JNrFqbustoLT+g8bSTcUsKuisoqgENTR GX2tz/Rum/9tY9WhzcbuRuDZ/E189vtEIdr/WfUVy2deVCk0B8VKpPoO6/c/Ljlyd/ l7J/+t7H0dXhg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2CBC51801E8 for ; Fri, 18 Jul 2025 15:50:02 +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=-2.8 required=5.0 tests=BAYES_00,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: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from fout-b2-smtp.messagingengine.com (fout-b2-smtp.messagingengine.com [202.12.124.145]) (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 ; Fri, 18 Jul 2025 15:49:59 +0000 (UTC) Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfout.stl.internal (Postfix) with ESMTP id B1A281D0011A for ; Fri, 18 Jul 2025 11:51:45 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-10.internal (MEProxy); Fri, 18 Jul 2025 11:51:45 -0400 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=fm2; t=1752853905; x=1752940305; bh=0c0he5Gn+bGsTdkBZzkzx mfa844oR1bfniaimzZSgjM=; b=MeJXvw78wD1bxsH4OtFhwrAJ09x0JBQVwFPrn XJhLaB6DSBb02//GMEG3V/j7+7DWiQy/3CeYTLbxWWmR87NXVvvgmpxJbO/xDtDa LS58NTvYPaRdUPMGF07bcpJnhjFhN0+uKK5/jLcb3URUPL7H09KBheDnJJrSXP4r Fk4K2PeD6ql8W0PMx4YWO9PvIE4qu2siw+gHav+8Mv9rS/PiYLHav3uJadRpahlI I41md4BwUCKIgygeUMwHy6pxiifP+bo6ngpPoI0L7MUpO6xHz7LS1vQE/+pm5f0P rgos+vddj9LFFswkxLefVNJmDIv0W+qosnjmmHkXOXA1QJS7A== 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=fm2; t=1752853905; x=1752940305; bh=0 c0he5Gn+bGsTdkBZzkzxmfa844oR1bfniaimzZSgjM=; b=UNrpX7Din7KmTDAsx E855gAyAYVyrBJ5WcTOv+HaABvWNIHPZwL0b0ileaHdDozX8E5UDfX+YnkIABJca hNzG8vAFwVhy3JGNwilu5M0yYwv3sfLhbc1hUsXIspkkWuTqSqa1XWBfXziODIGK M0o42WCqS+dnvUmKs3pd7S9myYW9R8WTxJHh6FaKIx67y3MNrygZeWdfusgbvUVz i5HHTi9lLfRb035X4Xhi7IbA4vBpVYLUqx4zHUJf3Ffr3kFAbZSg5WQiZugEkyae ZaLA8UlLv6K9+R1d0Xf3XJYNmJUHHzG0uXfAkSbnHbbGqvG1/MgESWDEsRrR5bEk eOnqw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdeifeekjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefoggffhffvkfgjfhfutgfgsehtqhertdertdejnecuhfhrohhmpedfnfgrrhhrhicu ifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomheqne cuggftrfgrthhtvghrnhepffeiiedvhfdvgedutddtgeetieeugeevhfetheeffeeftedu iedthedtgeejueeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmpdhnsggprhgtphht thhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehinhhtvghrnhgrlhhsse hlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 40626700065; Fri, 18 Jul 2025 11:51:45 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Fri, 18 Jul 2025 10:51:25 -0500 To: "php internals" Message-ID: <8a45fb3e-0903-47f6-9e72-80e16447e0cd@app.fastmail.com> In-Reply-To: References: <1e8634d7-ac1a-4025-b4e2-1948aabf5251@app.fastmail.com> <46857A6D-5EAF-44AF-A2DE-9B40AF8DE8C8@gmail.com> <41241c3d-a601-4fb8-9f32-976bea3b660e@app.fastmail.com> <308e51e9-ebc9-4ab1-a727-46854b27701f@bastelstu.be> <93a7a354-9779-4c2d-a146-a49388bc0159@bastelstu.be> Subject: Re: [PHP-DEV] [RFC] Readonly property hooks Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Fri, Jul 18, 2025, at 9:50 AM, Marco Pivetta wrote: > On Fri, 18 Jul 2025 at 16:43, Tim D=C3=BCsterhus wr= ote: >> On 7/18/25 16:25, Faizan Akram Dar wrote: >> > The problem with allowing only set hooks is that readonly class won= 't be >> > compatible with hooks, I think that is one of the main motivations = behind >> > this RFC. >>=20 >> Yes. The point is that the semantics users expect from `readonly` are=20 >> fundamentally incompatible with a get hook that could return arbitrar= ily=20 >> changing values whenever you read from a property. > > Just a heads up: I also plan to vote "no" on this RFC because the=20 > expectation with `readonly` is that there is no kind of interference o= r=20 > lazy initialization anyway. > > Now that lazy proxies have landed into core, there is also no need for=20 > `__get` hacks anymore. Even on set hooks, which do not violate any of the interpretations of wh= at readonly "means" floating about? As the RFC notes, that's now a nece= ssary validation step with the improved clone() on its way. --Larry Garfield