Skip to content

[VarDumper] Add LinkStub to create links in HTML dumps #19816

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
Sep 1, 2016

Conversation

nicolas-grekas
Copy link
Member

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

Note in the screenshot:

  • the "file" item has ellipsis,
  • the browser displays the target at the bottom

@fabpot
Copy link
Member

fabpot commented Sep 1, 2016

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 2b5d642 into symfony:master Sep 1, 2016
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
@nicolas-grekas nicolas-grekas deleted the dump-link-stub branch September 1, 2016 19:10
@flip111
Copy link
Contributor

flip111 commented Sep 5, 2016

@nicolas-grekas how can you choose the link as subl:// ?

@nicolas-grekas
Copy link
Member Author

You give the template to HtmlDumper, e.g.:
$dumper->setDisplayOptions(array('fileLinkFormat' => 'subl://%f:%l'));

Will be done by default once #19807 is merged for Symfony Standard Edition users.

@flip111
Copy link
Contributor

flip111 commented Sep 5, 2016

I like Sublime Text, but why make this editor the default ?

@nicolas-grekas
Copy link
Member Author

Where is it the default?

@flip111
Copy link
Contributor

flip111 commented Sep 5, 2016

Where? I thought you were just saying it was to become the default ... o_O

@nicolas-grekas
Copy link
Member Author

I inlined the subl://... string because you asked specifically for sublime :)
In the linked PR, we use the kernel.file_link_format parameter, which has no default value.

@flip111
Copy link
Contributor

flip111 commented Sep 5, 2016

Oh that's nice :)

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.

3 participants