Skip to content

[VarDumper] Handle attributes in Data clones for more semantic dumps #19797

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
Aug 31, 2016

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Aug 31, 2016

Q A
Branch? master
New feature? yes
Tests pass? yes
License MIT

Casters can now add attributes to the stub they create and to virtual propertie names so that e.g. the HtmlDumper knows more about the structure it is dumping. This allows for fine tuned HTML representations.

The ExceptionCaster uses this feature to make traces more useful, by telling the HtmlDumper which keys/values are files, lines or code excerpt (and which language). Thus, code excerpts can now be opened directly in the IDE.

@nicolas-grekas
Copy link
Member Author

nicolas-grekas commented Aug 31, 2016

Here is a screenshot:
capture du 2016-08-31 14-33-04

Note:

  • the ellipsis, they make lines shorter while still allowing one to select/copy/paste the full path
  • the tooltip on hover that shows what the ellipsis hides
  • when a fileLinkFormat is provided, the middle line is clickable and opens the IDE
  • (colors are going to change soon don't worry about them :) )

@fabpot
Copy link
Member

fabpot commented Aug 31, 2016

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 2937ffa into symfony:master Aug 31, 2016
fabpot added a commit that referenced this pull request Aug 31, 2016
…semantic dumps (nicolas-grekas)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[VarDumper] Handle attributes in Data clones for more semantic dumps

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | yes
| Tests pass?   | yes
| License       | MIT

Casters can now add attributes to the stub they create and to virtual properties so that e.g. the HtmlDumper knows more about the structure it is dumping. This allow for fine tuned HTML representations.

The ExceptionCaster uses this feature to make traces more useful, by telling the HtmlDumper that a which keys/values are files, lines or code excerpt (and which language). Thus, code excerpts can now be opened directly in the IDE.

Commits
-------

2937ffa [VarDumper] Handle attributes in Data clones for more semantic dumps
@nicolas-grekas nicolas-grekas deleted the dump-attr branch August 31, 2016 18:29
fabpot added a commit that referenced this pull request Sep 1, 2016
… (nicolas-grekas)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[VarDumper] Add LinkStub to create links in HTML dumps

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | yes
| Tests pass?   | yes
| License       | MIT

This builds on top of #19797 & adds a new `LinkStub` to inform HtmlDumper about values that can be dumped as html links.

![capture du 2016-09-01 16-37-56](https://cloud.githubusercontent.com/assets/243674/18171810/8a786518-7063-11e6-9719-1eca295087e7.png)

Note in the screenshot:
- the "file" item has ellipsis,
- the browser displays the target at the bottom

Commits
-------

2b5d642 [VarDumper] Add LinkStub to create links in HTML dumps
@fabpot fabpot mentioned this pull request Oct 27, 2016
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