Skip to content

Commit

Permalink
[FrameworkBundle] removed dependency with the DIC
Browse files Browse the repository at this point in the history
  • Loading branch information
noelg authored and fabpot committed Aug 30, 2010
1 parent 8c6478d commit d94271b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/Symfony/Bundle/FrameworkBundle/Debug/ExceptionListener.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@
*/
class ExceptionListener
{
protected $container;
protected $controller;
protected $logger;

public function __construct(ContainerInterface $container, $controller, LoggerInterface $logger = null)
public function __construct($controller, LoggerInterface $logger = null)
{
$this->container = $container;
$this->controller = $controller;
$this->logger = $logger;
}
Expand Down Expand Up @@ -63,7 +61,7 @@ public function handle(Event $event)
error_log(sprintf('Uncaught PHP Exception %s: "%s" at %s line %s', get_class($exception), $exception->getMessage(), $exception->getFile(), $exception->getLine()));
}

$logger = $this->container->has('logger') ? $this->container->get('logger')->getDebugLogger() : null;
$logger = null !== $this->logger ? $this->logger->getDebugLogger() : null;

$attributes = array(
'_controller' => $this->controller,
Expand Down
1 change: 0 additions & 1 deletion src/Symfony/Bundle/FrameworkBundle/Resources/config/web.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@

<service id="exception_listener" class="%exception_listener.class%">
<tag name="kernel.listener" priority="128" />
<argument type="service" id="service_container" />
<argument>%exception_listener.controller%</argument>
<argument type="service" id="logger" on-invalid="null" />
</service>
Expand Down

0 comments on commit d94271b

Please sign in to comment.