Skip to content

Commit

Permalink
bug #15549 [FrameworkBundle] Fix precedence of xdebug.file_link_forma…
Browse files Browse the repository at this point in the history
…t (nicolas-grekas)

This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] Fix precedence of xdebug.file_link_format

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

See symfony/demo#148 (comment)

Commits
-------

adb5327 [FrameworkBundle] Fix precedence of xdebug.file_link_format
  • Loading branch information
fabpot committed Aug 23, 2015
2 parents 34bbd12 + adb5327 commit 1076a0f
Showing 1 changed file with 9 additions and 7 deletions.
Expand Up @@ -356,14 +356,16 @@ private function registerTemplatingConfiguration(array $config, $ide, ContainerB
$loader->load('templating.xml');
$loader->load('templating_php.xml');

$links = array(
'textmate' => 'txmt://open?url=file://%%f&line=%%l',
'macvim' => 'mvim://open?url=file://%%f&line=%%l',
'emacs' => 'emacs://open?url=file://%%f&line=%%l',
'sublime' => 'subl://open?url=file://%%f&line=%%l',
);
if (!$container->hasParameter('templating.helper.code.file_link_format')) {
$links = array(
'textmate' => 'txmt://open?url=file://%%f&line=%%l',
'macvim' => 'mvim://open?url=file://%%f&line=%%l',
'emacs' => 'emacs://open?url=file://%%f&line=%%l',
'sublime' => 'subl://open?url=file://%%f&line=%%l',
);

$container->setParameter('templating.helper.code.file_link_format', isset($links[$ide]) ? $links[$ide] : $ide);
$container->setParameter('templating.helper.code.file_link_format', ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format') ?: (isset($links[$ide]) ? $links[$ide] : $ide));
}
$container->setParameter('templating.helper.form.resources', $config['form']['resources']);
$container->setParameter('fragment.renderer.hinclude.global_template', $config['hinclude_default_template']);

Expand Down

0 comments on commit 1076a0f

Please sign in to comment.