Skip to content

Commit

Permalink
Merge pull request #291 from mr-feek/fix-singleton-binding
Browse files Browse the repository at this point in the history
fix: properly bind singleton
  • Loading branch information
freekmurze committed Jul 14, 2020
2 parents be2f028 + 601d882 commit 41989c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/DumpRecorder/DumpRecorder.php
Expand Up @@ -26,7 +26,9 @@ public function register(): self
{
$multiDumpHandler = new MultiDumpHandler();

$this->app->singleton(MultiDumpHandler::class, $multiDumpHandler);
$this->app->singleton(MultiDumpHandler::class, function () use ($multiDumpHandler) {
return $multiDumpHandler;
});

$previousHandler = VarDumper::setHandler(function ($var) use ($multiDumpHandler) {
$multiDumpHandler->dump($var);
Expand Down

0 comments on commit 41989c6

Please sign in to comment.