Skip to content

Added ReflectionProperty::getClassName() #1039

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

Closed

Conversation

philsturgeon
Copy link

@philsturgeon philsturgeon force-pushed the reflection-get-class-name branch from f84a329 to d255ba3 Compare January 31, 2015 04:00
use Bar\Baz;

class Foo {
public function bar(Qux $qux, $bar, Baz $baz, \Bar\Quz $quz) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this alsy contain array and callable typehtint?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope! Just classes.

I'll sort this all the morning. It's 4am here in NY.

Sent from my iPhone

On Jan 31, 2015, at 3:41 AM, Markus Staab [email protected] wrote:

In ext/reflection/tests/ReflectionParameter_getClassName.phpt:

@@ -0,0 +1,25 @@
+--TEST--
+Test ReflectionParameter::getClassName() usage.
+--FILE--
+<?php
+
+use Bar\Baz;
+
+class Foo {

  • public function bar(Qux $qux, $bar, Baz $baz, \Bar\Quz $quz) {}
    Should this alsy contain array and callable typehtint?


Reply to this email directly or view it on GitHub.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for the sake of completeness it might be a good idea to add params with array and callable typehints in the test case even though they aren't strictly needed for this patch's functionality. This would help ensure consistent behavior going forward (e.g. if someone gets a wild hair to change how the "pseudo" hints are implemented you don't want this functionality to break).

@rdlowrey
Copy link
Contributor

👍

@philsturgeon
Copy link
Author

@rdlowrey pushed as you were typing. :)

@rdlowrey
Copy link
Contributor

This is a nice addition; it's a PITA to retrieve parameter typehints with the current status quo :)

@smalyshev smalyshev added the RFC label Feb 1, 2015
@nikic
Copy link
Member

nikic commented Mar 3, 2016

Closing as since PHP 7 this is already covered by doing (string) $param->getType().

@nikic nikic closed this Mar 3, 2016
@philsturgeon
Copy link
Author

👍! Thank you.

@philsturgeon philsturgeon deleted the reflection-get-class-name branch March 3, 2016 19:43
@philsturgeon philsturgeon restored the reflection-get-class-name branch March 3, 2016 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants