Hi
On 5/8/23 23:38, Larry Garfield wrote:
Ilija Tovilo and I would like to offer another RFC for your consideration.
It's been a while in coming, and we've evolved the design quite a bit just in
the last week so if you saw an earlier draft of it in the past few months, I
would encourage you to read it over again to make sure we're all on the same
page. I'm actually pretty happy with where it ended up, even if it's not the
original design. This approach eliminates several hard-to-implement edge cases
while still providing a lot of functionality in one package.
https://wiki.php.net/rfc/property-hooks
I've read a previous draft and now did another pass through the updated
version:
(1) How does the set() hook interact with #[\SensitiveParameter]?
(2) How will a Stack Trace emitted from a hook look like? Please include
an example of the Exception::__toString() output or so.
(3) ReflectionProperty::getHook(): Will this throw if an invalid hook
name is given or will this return null?
(4) The "Unaffected PHP Functionality" section is empty. It should
either be filled in or removed.
(5) I strongly dislike the doubly abbreviated form of `public string
$fullName => $this->first . " " . $this->last;`. Having just the extra
'>' in there to distinguish it from a regular property feels non-obvious.
Best regards
Tim Düsterhus
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php