From 1715043c0ecaec1d15244e119d63985d49f00cf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 22 Feb 2021 20:11:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Di/Container.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/System/Di/Container.php b/System/Di/Container.php index 26527a30..c680e42c 100644 --- a/System/Di/Container.php +++ b/System/Di/Container.php @@ -161,7 +161,7 @@ class Container extends BaseObject return [$reflection, $this->_constructs[$class] = []]; } foreach ($constructs->getParameters() as $key => $param) { - $dependencies[] = $this->resolveDefaultValue($param); + $dependencies[$param->getName()] = $this->resolveDefaultValue($param); } $this->_constructs[$class] = $dependencies; return [$reflection, $dependencies];