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);