Skip to content
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

[FrameworkBundle] Add %debug.file_link_format% with remapping for IDE links #19807

Merged
merged 1 commit into from
Sep 14, 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
Fixed tickets #14340
License MIT
Doc PR symfony/symfony-docs#6944

templating.helper.code.file_link_format is a parameter that requires templating to be defined, but holds a concept that is used beyond templating borders.
Let's make it a general parameter that can be injected easily when required.

;
$container->getDefinition('var_dumper.html_dumper')
->replaceArgument(2, AbstractDumper::DUMP_LIGHT_ARRAY)
;
Copy link
Member

Choose a reason for hiding this comment

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

This one and the previous one should probably oneliners.

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 removed this completely: not related and not a good idea anyway

@nicolas-grekas nicolas-grekas force-pushed the dump-link branch 6 times, most recently from 8972e86 to 0655c9b Compare September 1, 2016 11:42
@nicolas-grekas nicolas-grekas changed the title [FrameworkBundle] Add kernel.file_link_format to replace templating.helper.code.file_link_format [FrameworkBundle] Add %kernel.file_link_format% with remapping for IDE links Sep 1, 2016
@nicolas-grekas
Copy link
Member Author

nicolas-grekas commented Sep 1, 2016

PR is ready, failure unrelated (composer bug).
New feature inside: one has now the ability to remap source links by prefix so that container/vm can create links that refer to the host.

E.g. subl://%f:%l#/foo/=/home/foo/&/bar=/home/bar/ while replace /foo/... & /bar/... paths by the mapped prefix.

@fabpot
Copy link
Member

fabpot commented Sep 1, 2016

Can you make a PR to update the docs?

@nicolas-grekas
Copy link
Member Author

doc PR added

</service>

<service id="data_collector.dump" class="Symfony\Component\HttpKernel\DataCollector\DumpDataCollector">
<tag name="data_collector" id="dump" template="@Debug/Profiler/dump.html.twig" priority="240" />
<argument type="service" id="debug.stopwatch" on-invalid="ignore" />
<argument>null</argument><!-- %templating.helper.code.file_link_format% -->
<argument>%kernel.file_link_format%</argument>
Copy link
Member

Choose a reason for hiding this comment

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

I don't like the fact that this is now "global". We don't have that many global kernel.* arguments and this one does not feel like it should be one of them.

Copy link
Member Author

Choose a reason for hiding this comment

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

Is it just a naming issue or the fact that it is always defined (which saves boilerplate in 4 bundles but can be removed)? Any suggestions?

Copy link
Member Author

Choose a reason for hiding this comment

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

parameter renamed to debug.file_link_format

@nicolas-grekas nicolas-grekas changed the title [FrameworkBundle] Add %kernel.file_link_format% with remapping for IDE links [FrameworkBundle] Add %debug.file_link_format% with remapping for IDE links Sep 14, 2016
@@ -56,6 +56,8 @@ protected function setUp()
$this->container->setParameter('kernel.cache_dir', __DIR__);
$this->container->setParameter('kernel.debug', false);
$this->container->setParameter('kernel.root_dir', __DIR__);
$this->container->setParameter('kernel.charset', 'UTF-8');
$this->container->setParameter('kernel.file_link_format', null);
Copy link
Member

Choose a reason for hiding this comment

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

Should be renamed

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

@fabpot
Copy link
Member

fabpot commented Sep 14, 2016

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 1c4ca8c into symfony:master Sep 14, 2016
fabpot added a commit that referenced this pull request Sep 14, 2016
…mapping for IDE links (nicolas-grekas)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] Add %debug.file_link_format% with remapping for IDE links

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | yes
| Tests pass?   | yes
| Fixed tickets | #14340
| License       | MIT
| Doc PR        | symfony/symfony-docs#6944

`templating.helper.code.file_link_format` is a parameter that requires templating to be defined, but holds a concept that is used beyond templating borders.
Let's make it a general parameter that can be injected easily when required.

Commits
-------

1c4ca8c [FrameworkBundle] Add %debug.file_link_format% with remapping for IDE links
@nicolas-grekas nicolas-grekas deleted the dump-link branch September 14, 2016 19:24
nicolas-grekas added a commit that referenced this pull request Sep 16, 2016
…() instead of parse_str() (nicolas-grekas)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] Parse source link maps using json_decode() instead of parse_str()

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | updated code exists only on master
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19807
| License       | MIT
| Doc PR        | symfony/symfony-docs#6944

Because `parse_str()` turns some characters into underscores in keys (e.g. `.`).

Commits
-------

9b174fb [FrameworkBundle] Parse source link maps using json_decode() instead of parse_str()
xabbuh added a commit to symfony/symfony-docs that referenced this pull request Sep 21, 2016
This PR was merged into the master branch.

Discussion
----------

Update doc about IDE file link format

todo:

- [x] ~~tell about `kernel.file_link_format` parameter?~~
- [x] tell about prefix maps (see symfony/symfony#19807)

Commits
-------

f744396 Update doc about IDE file link format
@fabpot fabpot mentioned this pull request Oct 27, 2016
ostrolucky pushed a commit to ostrolucky/symfony that referenced this pull request Mar 25, 2018
…with remapping for IDE links (nicolas-grekas)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] Add %debug.file_link_format% with remapping for IDE links

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | yes
| Tests pass?   | yes
| Fixed tickets | symfony#14340
| License       | MIT
| Doc PR        | symfony/symfony-docs#6944

`templating.helper.code.file_link_format` is a parameter that requires templating to be defined, but holds a concept that is used beyond templating borders.
Let's make it a general parameter that can be injected easily when required.

Commits
-------

1c4ca8c [FrameworkBundle] Add %debug.file_link_format% with remapping for IDE links
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