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 Laravel Package

timeinc/swagger-bundle

A Symfony bundle that generates Swagger/OpenAPI documentation for your REST API from PHP annotations, keeping interactive specifications in sync with your code and making it easy to expose and maintain API docs alongside your application.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — mismatch, and it's fundamental. The request frames this as a Laravel/PHP package, but timeinc/swagger-bundle is a Symfony bundle, not a Laravel package. Its entire value-add is Symfony glue: a Bundle subclass, a DependencyInjection/Extension for the config tree, compiler passes, and service wiring. Laravel has no bundle registration mechanism, no Kernel::registerBundles(), and no config-tree extension contract. The underlying engine — zircote/swagger-php — is framework-agnostic, which means the only part of this package that would be useful in Laravel is the part that isn't portable. We would be installing a package we cannot boot in order to reimplement it.

Integration feasibility — low. There is no Composer path here that produces working software in a Laravel app. Realistic options are (a) install and manually replicate the bundle's service definitions in a Laravel service provider — brittle and pointless, since the bundle logic is thin config passthrough to swagger-php; or (b) skip the bundle and use swagger-php directly. Option (b) is strictly better and is where I'd land.

Technical risk — high on every axis.

  • Abandonment: zero stars, zero dependents, score 0. The TimeInc OSS org has been effectively dormant since the Meredith acquisition. No release cadence, no issue triage, no security response.
  • Version ceiling: the bundle predates swagger-php 4.x, meaning it targets annotation-based scanning and an older PHP runtime. Modern OpenAPI 3.1 output requires swagger-php 4/5 with PHP 8 attributes — an API this bundle does not know about.
  • Dependency conflict: its Symfony component constraints will collide with the Symfony 6/7 components Laravel 10/11 pull in. Expect Composer resolution to fail before any code is written.
  • Ownership transfer: adopting it means forking and maintaining it internally, for a component whose net contribution is ~a few hundred lines of container wiring.

Key questions to resolve before any decision:

  1. What is the actual deliverable — a spec artifact generated at build time, or a live docs UI served at runtime? These have very different risk profiles.
  2. Is annotation/attribute-first authoring a hard requirement, or is code-first introspection (routes, form requests, resources) acceptable? If the latter, several maintained Laravel-native tools remove this decision entirely.
  3. Which OpenAPI version do downstream consumers need (3.0 vs 3.1)?
  4. Is there a contract-testing or SDK-generation consumer (Schemathesis, generated clients)? That determines whether spec correctness is a nice-to-have or a release gate.

Integration Approach

Stack fit — none as-is. Recommended replacements, in preference order:

  • zircote/swagger-php (^4 or ^5) invoked directly from an Artisan command. Same engine the bundle wraps, zero framework lock-in, actively maintained. This is the closest like-for-like.
  • darkaonline/l5-swagger if the team wants a Laravel-native wrapper plus a bundled Swagger UI route and published config. Fastest path to parity with what the bundle would have provided in Symfony.
  • dedoc/scramble if attribute authoring is unattractive and code-first inference is acceptable — significantly lower annotation-drift risk.
  • knuckleswtf/scribe if the primary audience is humans reading docs rather than machines consuming a spec.

Migration path. With zero dependents, there is almost certainly no existing consumer to migrate — treat this as greenfield, not migration. If a team has copied patterns from the bundle, the work is: lift the scan paths and output config out of the bundle's YAML/PHP config into a plain config file or command signature; re-pin swagger-php to a current major; convert @OA\ annotations to #[OA\ PHP attributes (the breaking change introduced in swagger-php 4, and the single largest line-item of effort); drop all Symfony service definitions.

Compatibility targets. PHP ≥ 8.1, swagger-php ^4/^5, Laravel 10/11. The bundle cannot reach these constraints; the underlying library can.

Sequencing.

  1. Confirm the deliverable and consumers (answers to the key questions above). Half a day.
  2. Spike swagger-php directly inside an Artisan command against two or three representative controllers. Validate output shape and effort per endpoint.
  3. Wire generation into CI as a committed artifact with a diff gate, so spec drift fails the build rather than surfacing in review.
  4. Add the docs UI route behind a non-production guard.
  5. Layer contract tests (Schemathesis or equivalent) once the spec is trustworthy.
  6. Explicitly reject and document timeinc/swagger-bundle so it isn't reintroduced later.

Operational Impact

Maintenance. Zero upstream cadence. No CVE response path. Adopting this package converts a dependency into an owned fork — the cost isn't installation, it's indefinite custodianship of dead code. The maintained alternatives carry none of that.

Support. No community, no dependents, no Stack Overflow surface, no realistic path to external help. Bus factor is effectively zero. Any engineer hitting an edge case is on their own against an unmaintained codebase.

Scaling. Spec generation itself scales acceptably as a build-time artifact and should be treated that way — generate in CI, publish the artifact, avoid generating per-request. The real scaling risk is organizational: on a large API surface, attribute-based specs drift from implementation unless contract tests enforce agreement. Plan for the spec to become a reviewed artifact with an owner, not a build byproduct nobody reads.

Failure modes, ranked by likelihood.

  1. Composer resolution failure at install — near-certain; blocks immediately and cheaply, which is the good outcome.
  2. PHP version ceiling — hard stop on any modern runtime.
  3. Silent spec drift — the expensive one; docs look authoritative while being wrong, and consumers build against them.
  4. Annotation→attribute breakage on any swagger-php upgrade, if the annotation era is retained.
  5. Accidental production exposure of the docs endpoint — a recurring, easily-prevented class of incident; gate the route by environment.
  6. Spec bloat and generation time on large surfaces — mitigate by scoping scan paths per bounded context.

Ramp-up. Negligible for the bundle itself, since we're not adopting it. Engineers still need OpenAPI literacy and swagger-php attribute syntax, which is the real onboarding cost regardless of tooling choice. Budget a half-day spike to confirm the mismatch and roughly one to two engineer-days to stand up swagger-php directly with a CI drift gate — an order of magnitude less than the ongoing cost of owning an abandoned bundle.

Recommendation: reject the dependency. The framework mismatch is disqualifying on its own, and the abandonment signals make the residual value negative. Pursue swagger-php directly or a maintained Laravel-native alternative; the decision is which authoring model the team will sustain, not whether to use this package.

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.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
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
cgv/localized-resource