We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2c5f3f3 + cb2826a commit 3b701beCopy full SHA for 3b701be
src/SanePsr11ContainerAdapter.php
@@ -5,6 +5,7 @@
5
6
7
use function class_exists;
8
+use Illuminate\Container\EntryNotFoundException;
9
use Illuminate\Contracts\Container\Container;
10
use Psr\Container\ContainerExceptionInterface;
11
use Psr\Container\ContainerInterface;
@@ -54,9 +55,14 @@ public function get($id)
54
55
*/
56
public function has($id)
57
{
- if (class_exists($id)) {
58
+ if (class_exists($id) && !$this->container->has($id)) {
59
+ try {
60
+ $this->container->get($id);
61
+ } catch (EntryNotFoundException $e) {
62
+ return false;
63
+ }
64
return true;
65
}
66
return $this->container->has($id);
67
-}
68
+}
0 commit comments