-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Reflection param renames amendment #6230
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
Conversation
@@ -254,16 +254,16 @@ public function hasProperty(string $name) {} | |||
public function getProperty(string $name) {} | |||
|
|||
/** @return ReflectionProperty[] */ | |||
public function getProperties(?int $filter = null) {} | |||
public function getProperties(?int $modifiers = null) {} |
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.
Other possibilities: $filtered_modifiers, $only_modifiers
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.
$rc->getProperties(filter: ReflectionProperty::IS_PUBLIC);
$rc->getProperties(only: ReflectionProperty::IS_PUBLIC);
$rc->getProperties(modifiers: ReflectionProperty::IS_PUBLIC);
$rc->getProperties(filter_modifiers: ReflectionProperty::IS_PUBLIC);
$rc->getProperties(only_modifiers: ReflectionProperty::IS_PUBLIC);
Hm ... my preference would go to the original $filter
followed by $filter_modifiers
.
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.
I have no hard feelings about any of the names :) So I'm changing this.
bd819e6
to
2ef0f02
Compare
|
||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &filter) == FAILURE) { | ||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &filter, &filter_is_null) == FAILURE) { |
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.
I made these params nullable because the previous default value was horrible, there were precedents for doing so before (e.g. ReflectionClass:getMethods()
)
2ef0f02
to
5ed837c
Compare
No description provided.