Skip to content

Commit a823f8e

Browse files
committed
Reflection::getParameterDefaultValue() is deprecated
Since PHP 8.0 ReflectionParameter::getDefaultValue() correctly returns value or throws exception when constant cannot be resolved
1 parent 921f1e1 commit a823f8e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Utils/Reflection.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ public static function getPropertyType(\ReflectionProperty $prop): ?Type
7979

8080

8181
/**
82-
* Returns the default value of parameter. If it is a constant, it returns its value.
83-
* @throws \ReflectionException If the parameter does not have a default value or the constant cannot be resolved
82+
* @deprecated use ReflectionParameter::getDefaultValue()
8483
*/
8584
public static function getParameterDefaultValue(\ReflectionParameter $param): mixed
8685
{

0 commit comments

Comments
 (0)