Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Swagger Bundle

Swagger Bundle Laravel Package

stfalcon-studio/swagger-bundle

A Symfony bundle that integrates swagger-php to generate OpenAPI/Swagger documentation from PHP annotations, helping keep API specs in sync with your code and exposing interactive docs for your endpoints.

View on GitHub
Deep Wiki
Context7

:package: Creates a Swagger-ui page in Symfony application.

Frequently asked questions about Swagger Bundle
Can I use stfalcon-studio/swagger-bundle in a Laravel application?
No. stfalcon-studio/swagger-bundle is a Symfony bundle that registers a DI extension, a config tree and routes inside a Symfony kernel, so it has no Laravel service provider and will not boot in a Laravel app. For Laravel you should use darkaonline/l5-swagger, which wraps the same zircote/swagger-php library in a Laravel-native package. You can still read this bundle's annotation conventions as a reference, but do not add it to a Laravel composer.json.
What does stfalcon-studio/swagger-bundle actually do?
It wires zircote/swagger-php into a Symfony application and exposes a Swagger UI page for your API endpoints. It adds the DI extension, configuration tree and routes needed to render interactive documentation from annotations already present in your PHP code. The goal is keeping the OpenAPI/Swagger spec in sync with the code instead of maintaining a hand-written file.
What is the Laravel equivalent of this Swagger bundle?
darkaonline/l5-swagger is the closest Laravel package, and it is also built on top of zircote/swagger-php. It ships a service provider, a publishable config file, assets and routes for the Swagger UI page. That is the package to evaluate when the goal is Swagger or OpenAPI documentation inside a Laravel application.
Why can't I install stfalcon-studio/swagger-bundle v2.0.0 in Laravel?
The v2.0.0 release note says it switches to Symfony 8.0, which in practice means symfony/* constraints at ^8.0 and a PHP floor of 8.4. Laravel pins Symfony components such as http-foundation, console, routing and process, and current Laravel majors ship Symfony 7.x, so Composer cannot resolve both requirement sets together. Forcing the install with constraint overrides is not a supportable production posture; the package becomes installable only once your Laravel version itself moves to Symfony 8 components.
Which Symfony and PHP versions does stfalcon-studio/swagger-bundle require?
The v2.0.0 release note is a single line stating a switch to Symfony 8.0, with no published migration guide. Read that as symfony/* at ^8.0 and a minimum PHP of 8.4, and assume Symfony 6.x and 7.x support was dropped from the constraint range. Check the composer.json of the exact tag you plan to use before committing, because the changelog does not spell out the requirement set.
How do I install stfalcon-studio/swagger-bundle in a Symfony app?
Require it with Composer, then register the bundle in config/bundles.php so its DI extension and routes load. Add your Swagger/OpenAPI configuration under the bundle's config key and make sure the documented route exposes the Swagger UI page. Because v2.0.0 targets Symfony 8.0, confirm your Symfony and PHP versions match the tag's composer.json before installing.
Does this bundle use swagger-php annotations or PHP attributes?
It uses zircote/swagger-php to read OpenAPI metadata from your PHP code, so you write annotations or PHP 8 attributes in whatever style the installed swagger-php version supports. The bundle itself handles the Symfony integration and the UI page; annotation parsing is entirely swagger-php's job. That means attribute support, annotation behavior and the emitted spec version follow the swagger-php release your constraints pull in.
Is a Swagger UI page from this bundle safe to run in production?
Swagger generation is developer tooling and a docs pipeline, not a request-path runtime dependency, so a failure degrades documentation rather than production traffic. The real risks are exposure and access control, because publicly reachable interactive docs reveal your full API surface. Gate the UI route behind authentication or restrict it to non-production environments, and treat the docs build as a versioned dependency since swagger-php schema changes can alter the generated spec.
What changed in stfalcon-studio/swagger-bundle v2.0.0?
The only documented change is a switch to Symfony 8.0, which is a hard dependency-floor move rather than a feature. There is no migration guide, no statement of breaking changes, no note on whether swagger-php was also bumped, and no detail on config schema or removed configuration keys. Treat the upgrade as a major review: diff composer.json between v1.1.1 and v2.0.0 and test your generated spec before switching.
Is stfalcon-studio/swagger-bundle still maintained, and does v1.x get security fixes?
v2.0.0 exists and tracks current Symfony APIs, which is a positive maintenance signal. What is not disclosed is whether the v1.x line still receives security fixes, which matters if you must stay on a Symfony 6/7 compatible release. If v1.1.1 is the last pre-Symfony-8 tag and gets no patches, you are effectively maintaining a fork in waiting, so ask upstream directly or plan to vendor the release you depend on.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console