Skip to content

Commit

Permalink
Reflection::getParameterDefaultValue() is deprecated
Browse files Browse the repository at this point in the history
Since PHP 8.0 ReflectionParameter::getDefaultValue() correctly returns value or throws exception when constant cannot be resolved
  • Loading branch information
dg committed Jan 28, 2022
1 parent 921f1e1 commit a823f8e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Utils/Reflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ public static function getPropertyType(\ReflectionProperty $prop): ?Type


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

0 comments on commit a823f8e

Please sign in to comment.