Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127624 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 AA9091A00BC for ; Sun, 8 Jun 2025 13:27:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1749389150; bh=9N70pchR9m9Z0qyAH2+3FEGduYNwutuPVchkJBbc1ps=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=hU9kExREKMHY7fakD00RoNvKPuOwwW8HryNkHt2DGU7JTOn7c2NBHxYsgo1otmG03 Ki4ehAZp3jciIhJDercvt4CbFeCZx/YVcc94RgfeDjhjB787I7hS3NHy2T6/WtONUk u+g+mbfKZZhGEIXg4/9Rvf6kmzpNgX+V1lj4YfgQfhtrcvOsL4+sj6cG0hKVXg50LS 46vJ7nIff8IPQGiPwTePnYOEeW+aJzGRAor00y4yIxW+uwwfTdQkM98KpKYjwWURZJ OYKSRgQ/Nj8wEokWG9ER2pYcytocnkbnb91HJgggdbTv36fMxyp91T+D4ImOgKd0wH 0mB64fpY7/hRw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DA577180042 for ; Sun, 8 Jun 2025 13:25:48 +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=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,HTML_MESSAGE, 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)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 8 Jun 2025 13:25:38 +0000 (UTC) Received: from avril.gn2.hosting (localhost [127.0.0.1]) by avril.gn2.hosting (Postfix) with ESMTP id 6417B1C40FD1; Sun, 8 Jun 2025 15:27:39 +0200 (CEST) Received: from smtpclient.apple (unknown [202.46.151.44]) by avril.gn2.hosting (Postfix) with ESMTPSA id 5E2FE1C403B9; Sun, 8 Jun 2025 15:27:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nicksdot.dev; s=default; t=1749389259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DFbtiqAt+dhfbsnM4sFbAsiYHlrHu35EYmik6mQlF7c=; b=Prw/MOpl0r4/pIaZZpPBqChWtnpbYlzViyi7Zmr7kybOP4xzlv1Kll9qZA0cgPsO9IgkWu 5qLV/oVjlsIkgxp3oLJbK/7JKIHFY+71B1WeZeine5alUyj3L/6YErtREyaYig/mtSZ2Hq iudDEqMwir7Bfm4FgtoWjOjGfwXu0w6mD8RbM4lW31JBakL+WU41e5+hqn4Fk+XuUKdwDD ORXgOwWGPjTl7xVZDD/A6sthYcrfm2RvqviasOSMSWcFh12wxg2y1pi+K7I8C57qS84J/I QLAYvRme7C+VGSyCUxjmmsQ53xRJ2mjxq+9CLs0kjx7b3Ib3zk22XF48L4DCaw== Authentication-Results: avril.gn2.hosting; auth=pass smtp.auth=php@nicksdot.dev smtp.mailfrom=php@nicksdot.dev Message-ID: <0E4D7F17-7920-4D5E-8FE1-67699E477786@nicksdot.dev> Content-Type: multipart/alternative; boundary="Apple-Mail=_18D44263-8082-4145-8D37-81E2DDE384B6" 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] [RFC] Readonly property hooks Date: Sun, 8 Jun 2025 20:27:24 +0700 In-Reply-To: Cc: Larry Garfield , php internals To: Volker Dusch References: <1e8634d7-ac1a-4025-b4e2-1948aabf5251@app.fastmail.com> 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)[multipart/alternative,text/plain]; NEURAL_HAM(-0.00)[-0.998]; RCVD_COUNT_ZERO(0.00)[0]; ARC_NA(0.00)[]; ASN(0.00)[asn:55666, ipnet:202.46.151.0/24, country:ID]; 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:+,1:+,2:~]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[3] From: php@nicksdot.dev (Nick) --Apple-Mail=_18D44263-8082-4145-8D37-81E2DDE384B6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hey Volker, > On 8. Jun 2025, at 19:17, Volker Dusch = wrote: >=20 > a) =46rom the "ProductFromDB" i get: >=20 > > Fatal error: Uncaught TypeError: LazyProduct::$category::get(): = Return value must be of type Category, none returned in ... >=20 > I assume you're missing a return statement here? Or is there something = I'm missing? >=20 > d) PositivePoint >=20 > Example doesn't compile against 8.4, master, or against = NickSdot:readonly-hooks >=20 > Can you make this a script that runs and shows expected output so that = readers don't have to assume this is supposed to do or run it? Unfortunate typos in the RFC text. I can=E2=80=99t yet update the RFC = text myself, but we will make sure they will be fixed shortly! Meanwhile, you can find the full running code for both examples here: = NickSdot:readonly-hooks/Zend/tests/property_hooks/readonly_rfc_example_laz= y_product.phpt = NickSdot:readonly-hooks/Zend/tests/property_hooks/readonly_rfc_example_val= idation.phpt Thanks for pointing these out! =E2=80=94=20 I leave addressing the other points to Larry. Cheers, Nick= --Apple-Mail=_18D44263-8082-4145-8D37-81E2DDE384B6 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hey Volker,

On 8. Jun 2025, at 19:17, Volker Dusch = <volker@tideways-gmbh.com> wrote:

a) =46rom the "ProductFromDB" i = get:

> Fatal error: Uncaught TypeError: = LazyProduct::$category::get(): Return value must be of type Category, = none returned in ...

I assume you're missing a = return statement here? Or is there something I'm = missing?

d) = PositivePoint

Example doesn't compile against = 8.4, master, or = against NickSdot:readonly-hooks

Can you = make this a script that runs and shows expected output so that readers = don't have to assume this is supposed to do or run = it?

Unfortunate typos in the = RFC text. I can=E2=80=99t yet update the RFC text myself, but we will = make sure they will be fixed shortly!

Meanwhile, you = can find the full running code for both examples = here:

NickSdot:readonly-hooks/Zend/tests/property= _hooks/readonly_rfc_example_lazy_product.phpt
NickSdot:readonly-= hooks/Zend/tests/property_hooks/readonly_rfc_example_validation.phpt
=

Thanks for pointing these = out!

=E2=80=94 

I = leave addressing the other points to = Larry.

Cheers,
Nick
= = --Apple-Mail=_18D44263-8082-4145-8D37-81E2DDE384B6--