mtrajano / laravel-swagger

Auto generates the swagger documentation of a laravel project based on best practices and simple assumptions
167 stars 70 forks source link

support or update for laravel 8 #59

Open ap-coder opened 3 years ago

ap-coder commented 3 years ago

Description:

First install says needs php 7.4 or higher but i have php8 i installed with --ignore-platform-req="mtrajano/laravel-swagger"

but when i try to generate i get the error below.

php artisan laravel-swagger:generate

   ErrorException

  Method ReflectionParameter::getClass() is deprecated

  at vendor/mtrajano/laravel-swagger/src/Generator.php:193
    189▕
    190▕         $parameters = $action_instance->getParameters();
    191▕
    192▕         foreach ($parameters as $parameter) {
  ➜ 193▕             $class = $parameter->getClass();
    194▕
    195▕             if (!$class) {
    196▕                 continue;
    197▕             }

      +18 vendor frames
  19  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()
viki53 commented 3 years ago

@ap-coder Hi, I missed this issue yesterday for some reason. Looks like I posted a duplicate with #60

I also posted PR #61 to fix the deprecation error.