This commit is contained in:
2021-08-05 17:31:25 +08:00
parent 9ee9008019
commit c95753523f
+4 -5
View File
@@ -135,13 +135,12 @@ class Container extends BaseObject
if ($construct->getNumberOfParameters() < 1) {
return $reflect->newInstance();
}
if (empty($dependencies)) {
return $reflect->newInstanceWithoutConstructor();
}
$parameters = $this->resolveMethodParameters($construct);
$parameters = $this->mergeParam($parameters, $dependencies);
if (!empty($dependencies)) {
$parameters = $this->mergeParam($this->resolveMethodParameters($construct), $dependencies);
return $reflect->newInstanceArgs($parameters);
}
return $reflect->newInstanceWithoutConstructor();
}
/**