Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127578 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 634591A00BC for ; Wed, 4 Jun 2025 12:20:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1749039494; bh=XS7PEyVgCavIs+9kKSGsZ+CKrxoZE47qEJ1FQcQOUho=; h=From:Subject:Date:References:To:In-Reply-To:From; b=M89Qes9kIcUgs6NFgakLq4BYh6+3Ww+9YhCOXJDxxkdc+PClJfb1beicp0WMW7YvL OZHpxqIFz6BniExbxSaPelxA/OLm2+3ri4nSQwJmLFlFYgYGCElDYXhNhDo8bgShZF UmCnvAo+f7TO0zVu2pgdvCXcxPv/+lchALFLJH1yMhHwxgJB++zjx5u/DLYGaFy3ow v+OQF9f1NxyxM/yyIj+ZGwt5uvHXzJGBKsanusEikcoJBWfVkhqpJjnViScOTxGeZL Ld20LmJGrzVGKVbnzhqvCrAN9vex5uDMGSq4xowiQDfyXsMAppt7nIb2jV8JY+1NQL 2vuwjyKhjJxPA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0650E180057 for ; Wed, 4 Jun 2025 12:18:13 +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=3.9 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS 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 avril.gn2.hosting (avril.gn2.hosting [84.19.162.247]) (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 ; Wed, 4 Jun 2025 12:18:12 +0000 (UTC) Received: from avril.gn2.hosting (localhost [127.0.0.1]) by avril.gn2.hosting (Postfix) with ESMTP id 52E9B1C40C16 for ; Wed, 4 Jun 2025 14:20:14 +0200 (CEST) Received: from smtpclient.apple (unknown [113.210.105.166]) by avril.gn2.hosting (Postfix) with ESMTPSA id 04A8C1C40547 for ; Wed, 4 Jun 2025 14:20:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nicksdot.dev; s=default; t=1749039613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=w8Jm/c5uLKAXmxwCoqvg2co04dNnRTzYilx54c+quO8=; b=Eo4r6j+cWuJu2Y/hbdoyvH8n+Uas61+T6EuoVOj/yAVlCp/QeynY2Ki6MUHMFFf+/4JuUO 3snjkzont6AqLm3y2kPRVthNec4kcZmFVEamhXdbMm/9JYUkv/YCUud+hzRe3QIs+nNSnw DB7ugZYu2OZKeS9cdvZBZau1zpMhR+NNhUyzZMQoKt1YItPFJtXpLJ3iZhojDTuCd8H9n2 vqdYPmrA1XqehudR4WsRF12pcdK1MeHcxVdDyyg+Ma5AaIjzs5/c5ZPHPc96R12bqOLVz3 +0zY1p3grPI0gwf6aRMoa5VsqSMtv1OCvVD6SRSatqP73/FjdHMa/+xip2BedA== Authentication-Results: avril.gn2.hosting; auth=pass smtp.auth=php@nicksdot.dev smtp.mailfrom=php@nicksdot.dev Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.600.51.1.1\)) Subject: Re: [PHP-DEV] Allow hooks in `readonly` promoted properties Date: Wed, 4 Jun 2025 20:19:57 +0800 References: <28F14D0F-8483-418D-85D1-660564A4EAE2@nicksdot.dev> To: internals@lists.php.net In-Reply-To: Message-ID: <26AA81AF-1610-494D-A811-10F7B282CBD4@nicksdot.dev> X-Mailer: Apple Mail (2.3826.600.51.1.1) X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.60 / 15.00]; BAYES_HAM(-3.00)[100.00%]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM(-0.00)[-0.985]; RCVD_COUNT_ZERO(0.00)[0]; ARC_NA(0.00)[]; ASN(0.00)[asn:9534, ipnet:113.210.105.0/24, country:MY]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_SIGNED(0.00)[nicksdot.dev:s=default]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1] From: php@nicksdot.dev (Nick) Hey all, > On 4. Jun 2025, at 01:03, Larry Garfield = wrote: >=20 > It's about expectation setting. If you see a property marked = `readonly`, it's reasonable to expect this to be true: >=20 > $foo->bar =3D=3D $foo->bar; >=20 > For a traditional field (pre-hooks), this would be trivially true. = With hooks, it may or may not be. Saying "well, that assumption doesn't = hold anymore, deal" is certainly an option, but it's not an option we = wanted to pursue as part of the larger RFC. But that is certainly a = direction we could take. Larry, I understand now that you in fact explicitly talk about = random_int().=20 Previously, I did not. I was more on the =E2=80=9Cmanipulating in = general=E2=80=9D meta level. Fair. If someone really wants to add random_int(): "well, that = assumption doesn't hold anymore, deal=E2=80=9D from my side. >> So, I would love to see this RFC to be implemented. >> Maybe you want to move it to discussion? Then my separate thread here=20= >> would be obsolete. >=20 > 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 = moment, as am I. (Unless someone else wants to jump in to implement it, = which would be fine.) 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: https://github.com/php/php-src/pull/18757 Can it really be such a little change? I=E2=80=99d appreciate feedback = from people more experienced than I am. Thanks! Cheers, Nick