This commit is contained in:
2025-07-11 15:22:52 +08:00
parent 5fa5646024
commit 3f2d3b0f04
+2 -2
View File
@@ -14,6 +14,7 @@ use Closure;
use Exception; use Exception;
use Kiri\Di\Interface\InjectTargetInterface; use Kiri\Di\Interface\InjectTargetInterface;
use Kiri\Router\Interface\ValidatorInterface; use Kiri\Router\Interface\ValidatorInterface;
use Kiri\Server\Task\OnTaskFinish;
use Psr\Container\ContainerInterface; use Psr\Container\ContainerInterface;
use ReflectionAttribute; use ReflectionAttribute;
use ReflectionClass; use ReflectionClass;
@@ -167,10 +168,9 @@ class Container implements ContainerInterface
} }
if (($handler = $reflect->getConstructor()) !== null) { if (($handler = $reflect->getConstructor()) !== null) {
$construct = $this->mergeParams($this->getMethodParams($handler), $construct); $construct = $this->getMethodParams($handler);
} }
var_dump($construct);
$newInstance = $reflect->newInstanceArgs($construct); $newInstance = $reflect->newInstanceArgs($construct);
return $this->runInit($reflect, static::configure($newInstance, $config)); return $this->runInit($reflect, static::configure($newInstance, $config));