-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[VarDumper] Add casters for Reflection* classes #14080
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
$a[$p.'typeHint'] = 'callable'; | ||
} elseif ($v = $c->getClass()) { | ||
$a[$p.'typeHint'] = $v->name; | ||
} |
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.
should we already add the support for scalar typehints here for PHP 7 (with a method_exists
check like for isCallable
) ?
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.
Do you know what will be the new methods?
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.
Looking at the PHP source, scalar typehints are not yet exposed through reflection because there is a pending discussion about the way to expose typehints in a unified way (same for return types). So it is not yet possible to handle this
Your test for ReflectionClass need to be adapted because different PHP versions have different methods (PHP 5.3 does not have trait-related methods for instance) |
f9d22ec
to
c0e127f
Compare
Right, updated! |
4f5d409
to
d125692
Compare
PR rebased and ready |
👍 |
c67c521
to
cb7b03e
Compare
cb7b03e
to
64d6e76
Compare
…as-grekas) This PR was merged into the 2.7 branch. Discussion ---------- [VarDumper] Add casters for Reflection* classes | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Will need a rebase on top of #14079 and #14077 to be mergeable/green. Commits ------- 64d6e76 [VarDumper] Add casters for Reflection* classes
Will need a rebase on top of #14079 and #14077 to be mergeable/green.