Skip to content

[VarDumper] Casters for Generator, ReflectionGenerator and ReflectionType #16325

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
Nov 3, 2015

Conversation

nicolas-grekas
Copy link
Member

Q A
Bug fix? yes
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

I had this on a local branch since a few days:

  • on PHP7, using ReflectionGenerator allows dumping interesting state info about generators (see test case for example output)
  • caster for ReflectionType added
  • source code excerpts are now left-trimmed (see adjusted test cases)

@nicolas-grekas
Copy link
Member Author

Status: needs review

@@ -18,15 +18,17 @@
*/
class FrameStub extends EnumStub
{
public $srcContext;
const DEFAULT_SRC_CONTEXT = 1;
Copy link
Member Author

Choose a reason for hiding this comment

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

I thinking about changing this const to a public static so that the default value can be easily changed

Copy link
Member

Choose a reason for hiding this comment

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

-1 for a public static. Mutable global state causes issues.

Copy link
Member Author

Choose a reason for hiding this comment

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

I still added it because it opens for some flexibility, even if it's global. The component already has some such public static for global configuration. For a dumping tool, that's fine IMO. Default values are overwritable when the default global config is not required.

@nicolas-grekas nicolas-grekas force-pushed the dump-php7 branch 2 times, most recently from 07b1d8b to 7cbfd8f Compare October 25, 2015 14:24
@nicolas-grekas nicolas-grekas merged commit d6c2d75 into symfony:2.8 Nov 3, 2015
nicolas-grekas added a commit that referenced this pull request Nov 3, 2015
… and ReflectionType (nicolas-grekas)

This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Casters for Generator, ReflectionGenerator and ReflectionType

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

I had this on a local branch since a few days:
- on PHP7, using ReflectionGenerator allows dumping interesting state info about generators (see test case for example output)
- caster for ReflectionType added
- source code excerpts are now left-trimmed (see adjusted test cases)

Commits
-------

d6c2d75 [VarDumper] Casters for Generator, ReflectionGenerator and ReflectionType
@nicolas-grekas nicolas-grekas deleted the dump-php7 branch November 3, 2015 08:48
@fabpot fabpot mentioned this pull request Nov 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants