We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When attempting to generate the docs for my API after switching to PHP 8 I get the following error:
In Generator.php line 193: Method ReflectionParameter::getClass() is deprecated
After some quick digging I found this to help solve the issue: https://php.watch/versions/8.0/deprecated-reflectionparameter-methods
I tested the following code in that foreach block which seems to do the trick:
foreach
foreach ($parameters as $parameter) { $class_name = $name = $parameter->getType() && !$parameter->getType()->isBuiltin() ? new \ReflectionClass($parameter->getType()->getName()) : null; if (is_subclass_of($class_name, FormRequest::class)) { return (new $class_name)->rules(); } }
The text was updated successfully, but these errors were encountered:
Fix PHP8 deprecation in Generator::getFormRules
Generator::getFormRules
d932524
See mtrajano#60 for more details
Successfully merging a pull request may close this issue.
Description:
When attempting to generate the docs for my API after switching to PHP 8 I get the following error:
After some quick digging I found this to help solve the issue: https://php.watch/versions/8.0/deprecated-reflectionparameter-methods
Proposed fix:
I tested the following code in that
foreach
block which seems to do the trick:The text was updated successfully, but these errors were encountered: