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