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

Api Doc Bundle Laravel Package

nelmiopros/api-doc-bundle

A Symfony/PHP bundle that generates interactive API documentation from your controllers, routes, and annotations. It provides a browsable web UI and machine-readable specs, making it easier to explore, test, and maintain your API endpoints.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The first thing to resolve is a framing mismatch: this is a Symfony bundle, not a Laravel package. It wires into Symfony's DI container, event dispatcher, route loader, and annotation/attribute reader to introspect controllers and emit an OpenAPI/Swagger spec. As a result, "architecture fit" depends entirely on which framework we're actually targeting. Against a Symfony API codebase, the architecture is a natural fit — it is a long-established pattern (route + annotation → spec). Against a Laravel codebase, fit is poor: it assumes Symfony kernels, bundles, and routing internals, and cannot be installed as a normal Laravel package without building a Symfony runtime bridge, which is disproportionate to the value.

Integration feasibility. For Symfony, integration is high-feasibility and well-trodden — but not with this repository. nelmiopros/api-doc-bundle (0 stars, 0 dependents) is a fork/vendored copy that shadows the canonical, heavily-adopted nelmio/api-doc-bundle on Packagist. The practical integration question is therefore not "how do we wire this package" but "can we use the canonical upstream package instead?" — and the answer is almost certainly yes, via a one-line Composer require, with far better provenance.

Technical risk.

  • Supply chain / namespace confusion. The name closely resembles the upstream package. Risk of accidentally pinning the fork, and of a fork falling behind on security and framework-compat updates.
  • Annotation legacy vs. PHP 8 attributes. The annotation-driven model is increasingly legacy; Symfony 6/7-era usage favors attributes, and bundle major versions diverge on this. Mismatched major versions produce confusing failures.
  • Spec drift. Generated docs reflect whatever annotations exist; unannotated or stale controllers silently produce incomplete or misleading contracts.
  • Framework coupling. Reliance on sensio/framework-extra-bundle and Symfony versions constrains upgrade paths.

Key questions to answer before any decision: (1) Is the target stack Laravel or Symfony? (2) If this is a fork, why not the canonical nelmio/api-doc-bundle? (3) What PHP/Symfony version matrix must we support? (4) Which OpenAPI version (3.0 vs 3.1) is required? (5) Do we need auth schemes, file uploads, polymorphic schemas, and error envelopes documented? (6) Who owns annotation hygiene, and is spec validation enforced in CI?

Integration Approach

Stack fit. Symfony: strong fit — adopt the canonical upstream bundle rather than this fork. Laravel: poor fit — use a Laravel-native alternative (Scramble, Scribe, or L5-Swagger) that understands Laravel routes, middleware, and validation rules. Do not attempt to force a Symfony bundle into Laravel; the coupling to Symfony internals is the blocker, not configuration.

Migration path. Treat this repository as a reference implementation, not a dependency. Add nelmio/api-doc-bundle from the canonical vendor via Composer, pin a major version aligned to our Symfony release, then incrementally convert controllers: annotate routes and DTOs → generate spec → validate. If we already have a fork installed anywhere, replace it with upstream in the same PR to eliminate namespace ambiguity.

Compatibility. Validate explicitly: PHP 8.1+ (attributes), Symfony 6.4 LTS or 7.x, OpenAPI output version, and the status of sensio/framework-extra-bundle (deprecated in newer Symfony). Confirm CI runs the same PHP/Symfony matrix as production before committing.

Sequencing. (1) Two-day spike on a scratch branch against a single bounded context; (2) generate the spec and validate it with an OpenAPI linter (Spectral) and a schema diff tool; (3) wire a CI gate that fails on spec drift or validation errors; (4) document team conventions for attribution/annotations; (5) expand controller coverage context-by-context, not as a big-bang backfill.

Operational Impact

Maintenance. This fork shows no visible maintainer cadence, release history, or dependent base — a maintenance liability. The canonical bundle is actively maintained and tracks Symfony releases. Standardize on upstream to avoid owning a fork.

Support. Upstream has real documentation, issue history, and community knowledge; this repository effectively has none. For an on-call team, that difference is the whole support story.

Scaling. Spec generation is largely a build-time/dev-time cost; runtime overhead is negligible provided preview/doc routes are disabled in production. Large APIs (hundreds of routes) can slow generation — mitigate with route filtering, incremental caching, and splitting the spec per domain/service rather than one monolithic document.

Failure modes to design against. Annotation/attribute parse errors breaking the doc build; spec drifting from actual behavior (the most dangerous failure — consumers trust a stale contract); internal endpoints or schemas leaking into a public spec; auth-scheme mismatches that break "Try it out"; and PHP/Symfony upgrades breaking generation. Mitigations: CI validation, spec diffing against a committed baseline, explicit route allow-listing, and upgrade testing in the matrix.

Ramp-up. Symfony developers will be productive in a few days; Laravel-only developers will need to learn Symfony conventions and the annotation style, which is a week-plus and largely wasted if the stack is Laravel. Budget a short internal enablement session and publish a one-page convention guide (how to annotate a DTO, an error response, and an auth-protected route) to avoid per-team divergence.

TPM recommendation: Do not adopt nelmiopros/api-doc-bundle. Confirm the target framework first; if Symfony, adopt the canonical nelmio/api-doc-bundle and run the spike-plus-CI-gate sequencing above. If Laravel, select a Laravel-native documentation tool and close this evaluation.

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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource