Re: [RFC] Readonly property hooks
| From: | Nick | Date: | Sun, 08 Jun 2025 13:27:24 +0000 |
| Subject: | Re: [RFC] Readonly property hooks | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-127624@lists.php.net to get a copy of this message | ||
Hey Volker,
> On 8. Jun 2025, at 19:17, Volker Dusch <volker@tideways-gmbh.com> wrote:
>
> a) From 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’t 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!
—
I leave addressing the other points to Larry.
Cheers,
Nick