Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Merged
merged 1 commit into from
Apr 1, 2015

Conversation

nicolas-grekas
Copy link
Member

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.

$a[$p.'typeHint'] = 'callable';
} elseif ($v = $c->getClass()) {
$a[$p.'typeHint'] = $v->name;
}
Copy link
Member

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) ?

Copy link
Member Author

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?

Copy link
Member

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

@stof
Copy link
Member

stof commented Mar 27, 2015

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)

@nicolas-grekas
Copy link
Member Author

Right, updated!

@nicolas-grekas nicolas-grekas force-pushed the reflection-caster branch 5 times, most recently from 4f5d409 to d125692 Compare March 31, 2015 15:20
@nicolas-grekas
Copy link
Member Author

PR rebased and ready

@stof
Copy link
Member

stof commented Mar 31, 2015

👍

@nicolas-grekas nicolas-grekas force-pushed the reflection-caster branch 2 times, most recently from c67c521 to cb7b03e Compare March 31, 2015 16:14
@nicolas-grekas nicolas-grekas merged commit 64d6e76 into symfony:2.7 Apr 1, 2015
nicolas-grekas added a commit that referenced this pull request Apr 1, 2015
…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
@nicolas-grekas nicolas-grekas deleted the reflection-caster branch April 1, 2015 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants