Skip to content

Commit ef57a2f

Browse files
committed
Move IDE file link formats from FrameworkExtension to FileLinkFormatter
1 parent ac38b1a commit ef57a2f

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -294,20 +294,7 @@ public function load(array $configs, ContainerBuilder $container)
294294
}
295295

296296
if (!$container->hasParameter('debug.file_link_format')) {
297-
$links = [
298-
'textmate' => 'txmt://open?url=file://%%f&line=%%l',
299-
'macvim' => 'mvim://open?url=file://%%f&line=%%l',
300-
'emacs' => 'emacs://open?url=file://%%f&line=%%l',
301-
'sublime' => 'subl://open?url=file://%%f&line=%%l',
302-
'phpstorm' => 'phpstorm://open?file=%%f&line=%%l',
303-
'atom' => 'atom://core/open/file?filename=%%f&line=%%l',
304-
'vscode' => 'vscode://file/%%f:%%l',
305-
];
306-
$ide = $config['ide'];
307-
// mark any env vars found in the ide setting as used
308-
$container->resolveEnvPlaceholders($ide);
309-
310-
$container->setParameter('debug.file_link_format', str_replace('%', '%%', ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format')) ?: ($links[$ide] ?? $ide));
297+
$container->setParameter('debug.file_link_format', $config['ide']);
311298
}
312299

313300
if (!empty($config['test'])) {

0 commit comments

Comments
 (0)