Skip to content

Commit

Permalink
Asks for the container instead of the whole application in construct
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed Jan 23, 2019
1 parent 36c58ca commit 3c8b0af
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Adapters/Laravel/ExceptionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace NunoMaduro\Collision\Adapters\Laravel;

use Exception;
use Illuminate\Contracts\Container\Container as Application;
use Illuminate\Contracts\Container\Container;
use NunoMaduro\Collision\Contracts\Provider as ProviderContract;
use Illuminate\Contracts\Debug\ExceptionHandler as ExceptionHandlerContract;
use Symfony\Component\Console\Exception\ExceptionInterface as SymfonyConsoleExceptionInterface;
Expand Down Expand Up @@ -43,12 +43,12 @@ class ExceptionHandler implements ExceptionHandlerContract
/**
* Creates a new instance of the ExceptionHandler.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @param \Illuminate\Contracts\Container\Container $container
* @param \Illuminate\Contracts\Debug\ExceptionHandler $appExceptionHandler
*/
public function __construct(Application $app, ExceptionHandlerContract $appExceptionHandler)
public function __construct(Container $container, ExceptionHandlerContract $appExceptionHandler)
{
$this->app = $app;
$this->container = $container;
$this->appExceptionHandler = $appExceptionHandler;
}

Expand Down Expand Up @@ -76,7 +76,7 @@ public function renderForConsole($output, Exception $e)
if ($e instanceof SymfonyConsoleExceptionInterface) {
$this->appExceptionHandler->renderForConsole($output, $e);
} else {
$handler = $this->app->make(ProviderContract::class)
$handler = $this->container->make(ProviderContract::class)
->register()
->getHandler()
->setOutput($output);
Expand Down

0 comments on commit 3c8b0af

Please sign in to comment.