L5-Swagger: Error Installation
- L5-Swagger Version: 7.0 (
composer show | grep l5-swagger
) - PHP Version (
7.4.2
): - OS: Windows10
Description: Composer :: TypeError
Argument 2 passed to L5Swagger\Generator::__construct() must be of the type string, null given, called in D:\ … \vendor\darkaonline\l5-swagger\src\L5SwaggerServiceProvider.php on line 66
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (5 by maintainers)
Hi there,
As others have mentioned, it looks like the issue is being caused by some cache that could exist in your Laravel application.
The steps I followed to solve the problem:
composer remove "darkaonline/l5-swagger"
Remove the package to ensure that any reference to the package no longer exists. You have to do this otherwise the next command will fail.php artisan config:clear
The above clears your config.composer require "darkaonline/l5-swagger"
Reinstall the package. All should be well now.doing php artisan config:clear fixed this issue for me
I think, problem is config cache
Hello everyone, I have the same problem, i have fixed it on deleting all files into bootstrap/cache (config/packages/routes-v7/services) and then run php artisan optimize Hope it’s help
Ohhhh I think I understood now… Maybe the problem is the Windows
\
The library is concatenating with the Unix
/
.Replace the Unix
/
to the php constDIRECTORY_SEPARATOR
, may fix itSame issue,
7.4.4
Ubuntu 18.04
After installation, we dont have config file, so
$ php artisan vendor:publish --provider "L5Swagger\L5SwaggerServiceProvider"
throw same error.