Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Added ReflectionProperty::getClassName()#1039

Closed
philsturgeon wants to merge 5 commits into
php:masterphp/php-src:masterfrom
philsturgeon:reflection-get-class-namephilsturgeon/php-src:reflection-get-class-nameCopy head branch name to clipboard
Closed

Added ReflectionProperty::getClassName()#1039
philsturgeon wants to merge 5 commits into
php:masterphp/php-src:masterfrom
philsturgeon:reflection-get-class-namephilsturgeon/php-src:reflection-get-class-nameCopy head branch name to clipboard

Conversation

@philsturgeon
Copy link
Copy Markdown

@philsturgeon philsturgeon force-pushed the reflection-get-class-name branch from f84a329 to d255ba3 Compare January 31, 2015 04:00
Copy link
Copy Markdown
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
Copy Markdown
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 notifications@github.com 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
Copy Markdown
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
Copy Markdown
Contributor

👍

@philsturgeon
Copy link
Copy Markdown
Author

@rdlowrey pushed as you were typing. :)

@rdlowrey
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.