This commit is contained in:
2025-07-11 15:25:06 +08:00
parent 3f2d3b0f04
commit 0081a30f22
+1 -1
View File
@@ -211,7 +211,7 @@ class Container implements ContainerInterface
throw new ReflectionException('Class ' . $reflect->getName() . ' cannot be instantiated');
}
if (($handler = $reflect->getConstructor()) !== null) {
if (empty($construct) && ($handler = $reflect->getConstructor()) !== null) {
$construct = $this->getMethodParams($handler);
}
$newInstance = $reflect->newInstanceArgs($construct);