← All changes
|
backend/src/System/Container/StandardReflector.php
+6
-0
0.7.0.4
→
1.4.7
View file →
| @@ -20,8 +20,14 @@ | ||
| 20 | 20 | : null; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | public function getParamTypeHint( \ReflectionFunctionAbstract $function, \ReflectionParameter $param ) { |
| 24 | + if ( version_compare( PHP_VERSION, '8.0.0', '<' ) ) { | |
| 25 | + return ( $reflectionClass = $param->getClass() ) | |
| 26 | + ? $reflectionClass->getName() | |
| 27 | + : null; | |
| 28 | + } | |
| 29 | + | |
| 24 | 30 | $type = $param->getType(); |
| 25 | 31 | |
| 26 | 32 | if ( 'ReflectionNamedType' === get_class( $type ) ) { |
| 27 | 33 | $class = new \ReflectionClass( $type->getName() ); |