From d3d884b05002873214530aabd0fcd76625ff859b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Sun, 27 Feb 2022 17:22:09 +0800 Subject: [PATCH] modify plugin name --- Container.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Container.php b/Container.php index eddd8fd..8475e1a 100644 --- a/Container.php +++ b/Container.php @@ -84,6 +84,9 @@ class Container implements ContainerInterface } if ($this->isInterface($class)) { $class = $this->_interfaces[$class]; + if (is_null($class)) { + throw new Exception('Unknown class mapping ' . $class . '::class'); + } } if (!isset($this->_singletons[$class])) { $this->_singletons[$class] = $this->resolve($class, $constrict, $config);