Skip to content

Commit

Permalink
fix: pass singleton() a closure instead of an object
Browse files Browse the repository at this point in the history
Laravel 7.22.0
(https://github.com/laravel/framework/releases/tag/v7.22.0) throws
`TypeError`s when passed an object instead of a closure or class name.

Fixes antonioribeiro#183
  • Loading branch information
vvanpo committed Jul 31, 2020
1 parent 5c64452 commit 0030862
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,9 @@ private function registerServices()

$this->app->singleton(
'pragmarx.health.commands',
$this->instantiateCommands()
function () {
return $this->instantiateCommands();
}
);
}

Expand Down

0 comments on commit 0030862

Please sign in to comment.