Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127613 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 6E3DB1A00BC for ; Thu, 5 Jun 2025 17:07:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1749143105; bh=LAfJinQHpnyy4OvQw0a/8WlYALXbPPl1NPFF1D6Fgf8=; h=Date:From:To:In-Reply-To:References:Subject:From; b=aoCp2+8RHqqLGLrrspIXejQR8rel6rl8XcWo05m8NsJYf3n9Eruj4jTEV0vEZanZ9 ADeilC4byqiumWdjWOGtLl9Hj9YzBclbBSvtarIL1Pu+Tf8p395x7T+8AMzU8mUjJa HGICprISG+8O8g02rie5e9JbiHGMhbfYW0NAAn2elYiNouKeonDBb8UnwAMed/HYA8 FapILvDVgO/bJ2zRv+rlSrchcZ5yCzi+MwS3x2uIRtkaGfKjgxmEGnZQpesITIpbLJ eB9mJygT5Q3VntN6ICMmNFXRiYok13Tiaoj5KJHRcFaJFI7AM3MeTZoY7GIkc4WB5s AqSYXx0Ny+2RA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 20300180084 for ; Thu, 5 Jun 2025 17:05:05 +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-a5-smtp.messagingengine.com (fout-a5-smtp.messagingengine.com [103.168.172.148]) (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 ; Thu, 5 Jun 2025 17:05:04 +0000 (UTC) Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfout.phl.internal (Postfix) with ESMTP id 990D31380323 for ; Thu, 5 Jun 2025 13:07:07 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-10.internal (MEProxy); Thu, 05 Jun 2025 13:07:07 -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=fm1; t=1749143227; x=1749229627; bh=nipQkn7kpJZWopFAwlGKI +RVaEEKxMz5Bduti6fSvPc=; b=E7lobHznN5dRsvBFNDyDD71lwDi6wPt5li5H0 QTV6CiSnAI3cEfXRniXvmBYTfs+uXpw9NFw7Jgq0OnoaFxlqfzLTcd/jmqut4tS0 IhglGS868vfbltZZmnENmwZ5VtUAcViT7vIL7YyP+JhBeXsgD4oGnGebGu5swXuB cNQyQ0VMSOqmuBRVY5Hl/H70S/kgsFYk2tTNyDWWhFf4hT029pm9/P4k29x3NZnk 7rUaQ4zBAhAEj7u4AcMTbfsNRE1vAv9/JTbFaqutYFSnj9/YJmynKBrDxpmD0J46 hAySS0uZvQvQOg7DDfi26gWGsNFASwz2sbSKSU8NfhhU2+HFA== 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=fm1; t=1749143227; x=1749229627; bh=n ipQkn7kpJZWopFAwlGKI+RVaEEKxMz5Bduti6fSvPc=; b=U1VhAf6BzPucs1yAo o2uYZST5zL5W1H3RwisvSuhr58nvmxVAfGTXhRv+RmarpqsBmwmpyM4fzxRI7o1m pCB0CD9er4sUnBrNxXnRriT1mlVjP7WsrKtP2gXK1d5TUAkzMbl9E314g6aW6Die NHq7XA1CblD1ewG0XJJWHkcfhtJiaYn8c2YE+fKiKEksGgpEY0s+D0skta+dMR8Z H6qDAITGf3Y2ZrkHFFtuIV26K1qy0snHbvtFY+R7BdPPEb+C59rfELdpVrGHNNOv BieVmIxhcBu0Bh6qIaFsvsJhaUaiMX3TevBlyIAYA7apOK3YSBM3WhqNKpWKAUUl qK6CQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugdefleduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnegoufhushhpvggtthffohhmrghinhculdegledmnecujfgurhep ofggfffhvffkjghfufgtgfesthhqredtredtjeenucfhrhhomhepfdfnrghrrhihucfirg hrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmqeenucgg tffrrghtthgvrhhnpeehvdetvefggeekffdvheektdekvedvhedvvdfhgfdtleeiveeigf etieeggeevteenucffohhmrghinhepghhithhhuhgsrdgtohhmpdefvheglhdrohhrghen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrh ihsehgrghrfhhivghlughtvggthhdrtghomhdpnhgspghrtghpthhtohepuddpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhph drnhgvth X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 41EAC700063; Thu, 5 Jun 2025 13:07:07 -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 X-ThreadId: T81b2c40af9f93484 Date: Thu, 05 Jun 2025 12:06:35 -0500 To: "php internals" Message-ID: <6b12585d-199f-4dc6-a557-5e68f59841b7@app.fastmail.com> In-Reply-To: <3FBC491A-FE60-4583-A3A2-0A58EC384C88@nicksdot.dev> References: <3FBC491A-FE60-4583-A3A2-0A58EC384C88@nicksdot.dev> Subject: Re: [PHP-DEV] Allow hooks in `readonly` promoted properties Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Thu, Jun 5, 2025, at 1:12 AM, Nick wrote: > Hey internals, > >> On 4. Jun 2025, at 20:19, Nick wrote: >>> I believe at the moment that RFC text is all there is. :-) I don't = know that it's worth opening a discussion without at least a mostly-done= implementation. Also, Ilija is rather busy on other tasks at the momen= t, as am I. (Unless someone else wants to jump in to implement it, whic= h would be fine.) >>=20 >> People often say =E2=80=9Cyou can just do things=E2=80=9D. So I did, = and tried to contribute the code for your existing RFC text: >>=20 >> https://github.com/php/php-src/pull/18757 > > Would this be expected to work? Can interface properties be declared `= readonly`? > interface Cleaned > { > public readonly string $clean { get; } // has readonly > } Interface properties cannot be declared readonly today: https://3v4l.org/cXgR0 Which I think is correct behavior. Make sure to include a test based on the "lazy product" example from the= RFC text. That's the main sort of use case I'd expect we'd want to ena= ble. :-) --Larry Garfield