mpociot / laravel-apidoc-generator

Laravel API Documentation Generator
https://beyondco.de/docs/laravel-apidoc-generator/
MIT License
3.43k stars 614 forks source link

TypeError on apidoc:generate #768

Open pirex360 opened 4 years ago

pirex360 commented 4 years ago

I just install by composer require the package, but when i try to create the doc using artisan apidoc:generate, this error appears :

` TypeError

Argument 1 passed to Mpociot\ApiDoc\Tools\DocumentationConfig::__construct() must be of the type array, null given, called in /var/www/vhosts/xxxxxxxxxxxxxx/vendor/mpociot/laravel-apidoc-generator/src/Commands/GenerateDocumentation.php on line 61

at vendor/mpociot/laravel-apidoc-generator/src/Tools/DocumentationConfig.php:9 5| class DocumentationConfig 6| { 7| private $data; 8|

9| public function __construct(array $config = []) 10| { 11| $this->data = $config; 12| } 13|

  +15 vendor frames 

16 artisan:37 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))`

Note: apidoc.php was created in config directory, but nothing was changed in this file.

Alexnortung commented 4 years ago

Seems like the same problem here #685 It worked after running php artisan config:clear

senter-logistics commented 4 years ago

Seems like the same problem here #685 It worked after running php artisan config:clear

it worked