From 855da03137fa318ae2a400be37ed8f7254efc877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 11 Jul 2025 15:28:10 +0800 Subject: [PATCH] eee --- Container.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Container.php b/Container.php index 2f46419..6df0bea 100644 --- a/Container.php +++ b/Container.php @@ -168,7 +168,7 @@ class Container implements ContainerInterface } if (($handler = $reflect->getConstructor()) !== null) { - $construct = $this->getMethodParams($handler); + $construct = $this->mergeParams($this->getMethodParams($handler), $construct); } $newInstance = $reflect->newInstanceArgs($construct); @@ -211,7 +211,7 @@ class Container implements ContainerInterface throw new ReflectionException('Class ' . $reflect->getName() . ' cannot be instantiated'); } - if (empty($construct) && ($handler = $reflect->getConstructor()) !== null) { + if (($handler = $reflect->getConstructor()) !== null) { $construct = $this->getMethodParams($handler); } $newInstance = $reflect->newInstanceArgs($construct);