fix use of deprecated methods

This commit is contained in:
sunxyw
2022-05-15 16:40:12 +08:00
parent 24a213a8ff
commit 4f10b6dbc3
2 changed files with 2 additions and 2 deletions

View File

@@ -4,10 +4,10 @@ parameters:
paths:
- ./src/
ignoreErrors:
- '#Used constant OS_TYPE_(LINUX|WINDOWS) not found#'
- '#Constant .* not found#'
- '#PHPDoc tag @throws with type Psr\\Container\\ContainerExceptionInterface is not subtype of Throwable#'
- '#Unsafe usage of new static#'
- '#Call to method initTableList\(\) of deprecated class ZM\\DB\\DB#'
dynamicConstantNames:
- SWOOLE_VERSION
- ZM_TEST_LOG_DEBUG

View File

@@ -663,7 +663,7 @@ trait ContainerTrait
{
try {
// 尝试解析
return $this->make($parameter->getClass()->name);
return $this->make(ReflectionUtil::getParameterClassName($parameter));
} catch (EntryResolutionException $e) {
// 如果参数是可选的,则返回默认值
if ($parameter->isDefaultValueAvailable()) {