Explorar el Código

[WebBundle] renamed the file_link_format option and moved it to the main web:config element

Fabien Potencier hace 15 años
padre
commit
037dfca003

+ 1 - 1
src/Symfony/Framework/WebBundle/Debug/ExceptionFormatter.php

@@ -168,7 +168,7 @@ class ExceptionFormatter
       $text = $file;
     }
 
-    $linkFormat = $this->container->hasParameter('web_debug.file_link_format') ? $this->container->getParameter('web_debug.file_link_format') : ini_get('xdebug.file_link_format');
+    $linkFormat = $this->container->hasParameter('debug.file_link_format') ? $this->container->getParameter('debug.file_link_format') : ini_get('xdebug.file_link_format');
     if ('html' === $format && $file && $line && $linkFormat)
     {
       $link = strtr($linkFormat, array('%f' => $file, '%l' => $line));

+ 5 - 6
src/Symfony/Framework/WebBundle/DependencyInjection/WebExtension.php

@@ -4,7 +4,6 @@ namespace Symfony\Framework\WebBundle\DependencyInjection;
 
 use Symfony\Components\DependencyInjection\Loader\LoaderExtension;
 use Symfony\Components\DependencyInjection\Loader\XmlFileLoader;
-use Symfony\Components\DependencyInjection\Builder;
 use Symfony\Components\DependencyInjection\BuilderConfiguration;
 use Symfony\Components\DependencyInjection\Reference;
 
@@ -39,6 +38,11 @@ class WebExtension extends LoaderExtension
     $loader = new XmlFileLoader(__DIR__.'/../Resources/config');
     $configuration->merge($loader->load($this->resources['web']));
 
+    if (isset($config['ide']) && 'textmate' === $config['ide'])
+    {
+      $configuration->setParameter('debug.file_link_format', 'txmt://open?url=file://%%f&line=%%l');
+    }
+
     return $configuration;
   }
 
@@ -161,11 +165,6 @@ class WebExtension extends LoaderExtension
       $configuration->merge($loader->load('debug_web_debug_toolbar.xml'));
     }
 
-    if (isset($config['ide']) && 'textmate' === $config['ide'])
-    {
-      $configuration->setParameter('web_debug.file_link_format', 'txmt://open?url=file://%%f&line=%%l');
-    }
-
     return $configuration;
   }