-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[RFC] Allow hooks for backed readonly
properties
#18757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
1a21998
to
6840873
Compare
da64264
to
24f2687
Compare
c06c915
to
12b986a
Compare
readonly
propertiesreadonly
properties
Zend/tests/property_hooks/readonly_class_property_backed_inheritance_1.phpt
Outdated
Show resolved
Hide resolved
Zend/tests/property_hooks/readonly_class_property_backed_inheritance_2.phpt
Outdated
Show resolved
Hide resolved
Zend/tests/property_hooks/readonly_class_property_backed_promoted.phpt
Outdated
Show resolved
Hide resolved
try { | ||
$t->set(43); | ||
} catch (Error $e) { | ||
echo $e->getMessage(), "\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo $e->getMessage(), "\n"; | |
echo $e::class, ": ", $e->getMessage(), PHP_EOL; |
For consistency with other tests (applies to the entire PR).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Tim,
I based my approach on the tests in the existing property_hooks
directory I was working in. Everything was written in the same style as I initially used here. Moreover, single quotation marks are used in other tests (outside of this directory).
- echo $e::class, ": ", $e->getMessage(), PHP_EOL;
+ echo $e::class, ': ', $e->getMessage(), PHP_EOL;
As I am new here, I have no preference and have made the change as you requested (but with single quotes, ok?).
However, since my tests are now the only ones with this style in the directory, I thought I would mention it in case we want to follow up with an unification PR for the old tests.
(I will not mark as resolved here. Please do it if you consider it done – thanks!)
https://wiki.php.net/rfc/readonly_hooks
https://news-web.php.net/php.internals/127529