Skip to content
New issue

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

composer install --no-dev fails when l5-swagger.php is present in the config directory. #589

Open
karunkshrestha opened this issue Feb 28, 2024 · 0 comments

Comments

@karunkshrestha
Copy link

karunkshrestha commented Feb 28, 2024

  • 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:

  1. composer require --dev "darkaonline/l5-swagger"
  2. publish config with php artisan vendor:publish --provider "L5Swagger\L5SwaggerServiceProvider"
  3. 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),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant