composer install --no-dev fails when l5-swagger.php is present in the config directory.
karunkshrestha opened this issue · comments
- L5-Swagger Version: ^8.5 (
composer show | grep l5-swagger
) - PHP Version (
php -v
): php8.2 - OS: debian:bullseye
- laravel 10
Description:
I want l5-swagger only to be available in development. Please see the steps below to reproduce the issue.
Steps To Reproduce:
- composer require --dev "darkaonline/l5-swagger"
- publish config with php artisan vendor:publish --provider "L5Swagger\L5SwaggerServiceProvider"
- now try to run composer install --no-dev
The error.
@php artisan package:discover --ansi
In l5-swagger.php line 148:
Class "L5Swagger\Generator" not found
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
The line 48 in the config file is
/*
* Allows to generate specs either for OpenAPI 3.0.0 or OpenAPI 3.1.0.
* By default the spec will be in version 3.0.0
*/
'open_api_spec_version' => env('L5_SWAGGER_OPEN_API_SPEC_VERSION', \L5Swagger\Generator::OPEN_API_DEFAULT_SPEC_VERSION),