Skip to content

Conversation

@dreadkopp
Copy link

when using attributes on i.e. a Controller or Method that does not exist during generation of the open-api spec, the generation will fail with an error.

Attributes that are missing might be
either some dev-dependency attributes that are stripped from the code base in production
or some external attributes like the Deprecated - Attribute from PHPStorm

For me it was a big project with various controllers - many many with deprecations. when trying to integrate the laravel-openapi package it will fail due to missing class for Deprecated-Attribute when scanning all controllers.

by checking the existence of the attributes class before creating a new instance we can prevent this error from happening.

make the attribute instanciation more resistant to undefined attributes
@dreadkopp dreadkopp changed the title make the attribute instantiation more resistant to undefined attributes Feat: make the attribute instantiation more resistant to undefined attributes Sep 15, 2025
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

Successfully merging this pull request may close these issues.

1 participant