mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-20 23:25:35 +08:00
fix use of deprecated methods
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user