From 808105048515f9621875d74e1f4f90ff7ca93a4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 22 Feb 2021 19:40:43 +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 --- Annotation/Annotation.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Annotation/Annotation.php b/Annotation/Annotation.php index 19f1154b..2c6f7320 100644 --- a/Annotation/Annotation.php +++ b/Annotation/Annotation.php @@ -125,7 +125,9 @@ class Annotation extends Component return []; } - $object = $reflect->newInstance(); + $def = Snowflake::getDi()->getDependencies($class); + + $object = $reflect->newInstanceArgs($def); $this->resolveMethod($reflect, $class, $alias, $object); return $this->targets($reflect); } catch (\Throwable $throwable) {