-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Implemented FR #61602 Allow access to name of constant used as default v... #35
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
Hi:
thanks On Tue, Apr 3, 2012 at 1:55 PM, reeze
Laruence Xinchen Hui |
Hi, thanks for you reply 1, before I try to imply the FR request pierrick havn't attach the patch. Last night I havn't wrote tests file , today I made some improvement and sent the pull request, at the same time a wrote a comment on https://bugs.php.net/bug.php?id=61602 and ask pierrick to review it for me. Sure it's ok to credit pirrerrick, we all want php to be a better language. I will add him to NEWS. Update: short for long : I did't make the patch based on pirrerrick's original patch.
|
On Tue, Apr 3, 2012 at 4:02 PM, reeze
so you are saying , you patch is earlier than pirrerrick's? you must let's see your patch with pirrerrick's : yours https://github.com/reeze/php-src/blob/054f3e3ce5af13c2c3a6ccd54f7dc3e2f6cd4f74/ext/reflection/php_reflection.c GET_REFLECTION_OBJECT_PTR(param); if (param->fptr->type != ZEND_USER_FUNCTION) {
"Parameter is not optional"); pierrick's https://bugs.php.net/patch-display.php?bug_id=61602&patch=getDefaultValueConstantName.diff&revision=latest:
and another, your patch, line 1501: pierrick 's :
you know what ? the are totally the same! thanks
Laruence Xinchen Hui |
Your totally miss my point. I don't ever mention my patch is earlier submited than pierrick. I said it, bugs comment log tells either. I mean I did't make my patch based on pierrick. that's it. if your look the original ext/reflection/php_reflection.c: ZEND_METHOD getDefaultValue() you will find that, yes it totally the same. I guess pierrick do the same as me: copy the getDefaultValue() implement and modify to our own suit. I do the same, but find duplicated the same code over and over will make code smelly, then I refactor them. For me: got the Request -> try to implement it -> find I can make use of getDefaultValue()->refactor->add Test file. May be pierrick would say something. Thanks. |
hi:
Thanks Sent from my iPad 在 2012-4-3,18:00,reeze
|
|
||
if (zend_parse_parameters_none() == FAILURE) { | ||
return 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.
You are doing this check already in _reflection_param_get_default_param. But in any case I'm not sure that this check should be in any of these functions. It's normally always done in the main function/method.
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.
Thank your for your review, I've updated the code, follow coding standard and move parameter parse to main function, and remove a duplicate function call. it should be better now. thanks ;)
Feature request from: https://bugs.php.net/bug.php?id=61602
Hi , I've impled this FR, it differs from pierrick's :
and I've make test everything looks fine.
thanks.