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

Scramble Laravel Package

dedoc/scramble

Scramble generates OpenAPI 3.1.0 documentation for your Laravel API automatically from your code, with no PHPDoc annotations required. Just install it to get a docs UI at /docs/api and a JSON spec at /docs/api.json, always kept up to date with your API.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Scramble is an application-level Laravel package, not a library other code depends on. Fit is therefore judged on how cleanly it attaches to an existing Laravel service: composer require dedoc/scramble, auto-discovered service provider, and two routes registered by default (/docs/api UI, /docs/api.json OpenAPI document), restricted to the local environment unless a viewApiDocs gate is defined. That is an unusually small architectural footprint — no base controller, no route middleware changes, no annotation layer threaded through the codebase. For a TPM this matters because adoption cost is bounded and reversible; removal is a composer remove.

Integration feasibility. High. The core value proposition is documentation derived from code that already exists: route definitions, FormRequest validation rules, API Resource classes, Eloquent models and casts, return types and PHPDoc. Release notes through 0.13.x show steady widening of that inference surface — closure routes, paginator transformation, paginationInformation, union types, @deprecated/@hidden, operationId via attributes, Rule::when/requiredIf/regex. Laravel 11/12/13 compatibility is explicitly tracked. The practical constraint is that inference quality is a function of codebase discipline: typed returns, FormRequests, API Resources and explicit casts produce good output; magic arrays, dynamic response shaping, and custom validation produce gaps.

Technical risk.

  • Pre-1.0 versioning. The project is on 0.13.x. The 0.13.0 release notes explicitly warn that although there are no code-level breaking changes, the resulting OpenAPI document may be materially more accurate and therefore "considered as the one containing breaking changes." That is the key risk: your published API contract can shift between minor versions without a version-signalling change in your own code.
  • Release velocity vs. stability. Patch releases are frequent and are dominated by inference edge-case fixes (variable expression names, array unwrapping, trailing commas, union handling, enum rule stringability after Laravel 12.48). This is a healthy but still-hardening static analysis engine; expect to encounter and report inference gaps.
  • Static analysis class of failures. Inference is best-effort. The dominant failure mode is silent under-documentation rather than a loud error — the doc looks complete and is wrong on a subset of endpoints.
  • Single-maintainer concentration. Contribution history centres on one primary author. Bus factor is a real consideration for a package that gates your external API contract.
  • Metadata anomaly. The registry reports a last release date of 2026-11-03, which is inconsistent with the 0.13.x changelog content. Verify actual release cadence and current version directly from Packagist before pinning.
  • Dependents = 0 is expected for an end-user dev tool rather than a red flag, but it means there is no downstream ecosystem evidence of integration patterns to lean on.

Key questions.

  1. Do we treat the OpenAPI document as a build artifact (exported in CI, diffed, published) or as a runtime route? The default runtime route is convenient in local and wrong for production contract governance.
  2. Who owns the viewApiDocs gate, and is there any path by which /docs/api becomes reachable in staging or production unauthenticated?
  3. Which downstream consumers accept OpenAPI 3.1? Some older gateway, SDK-generator, or portal toolchains still assume 3.0.x and will need conversion.
  4. Which endpoints will inference demonstrably miss, and what is our policy — patch the code to be inferable, or add targeted attributes?
  5. What is our version-pinning policy given pre-1.0 semantics, and who reviews changelogs on upgrade?

Integration Approach

Stack fit. Strong for a conventional Laravel service: FormRequests for input, API Resources for output, Eloquent for models, typed controller returns. Where the codebase already follows those idioms, Scramble is close to zero-effort. Where it doesn't, the honest framing is that Scramble doubles as a lint for contract clarity — endpoints that document poorly are usually endpoints that are hard to reason about anyway. It also fits naturally alongside existing PHPStan/Larastan static analysis, since both reward the same type precision.

Migration path. The realistic incumbent is Scribe or l5-swagger, both annotation-driven. Do not do a big-bang cutover. Run Scramble in parallel on a branch, export both documents, and diff them endpoint by endpoint. Every discrepancy is either an inference gap (fix in code or annotate) or a stale annotation in the legacy docs (delete it). Retire annotations endpoint-group by endpoint-group once parity is confirmed. The migration is therefore a documentation-debt cleanup project with a tool attached, not a tooling swap — scope it accordingly.

Compatibility. Laravel 11–13 and PHP 8.x are the comfortable zone; older Laravel versions should be validated against the specific 0.13.x release. The two compatibility surfaces that actually bite are (a) OpenAPI 3.1 consumers downstream, and (b) the package's own inference against your Laravel version's PHPDoc conventions — 0.13.0's "full type inference" leans directly on Laravel 11/12's improved annotations, so older framework versions yield proportionally weaker output.

Sequencing.

  1. Install on a branch; confirm routes and gate behaviour; restrict to local.
  2. Export the document; review for gross errors (missing routes, wrong auth schemes, empty request bodies).
  3. Fix the highest-value inference gaps by tightening code (FormRequests, Resources, typed returns) rather than annotating.
  4. Add a CI step that exports and diffs the document; treat an unreviewed diff as a failing check.
  5. Publish the artifact to the developer portal / SDK pipeline; wire contract tests against it.
  6. Decommission legacy annotations group by group.

Operational Impact

Maintenance. Low ongoing code maintenance, non-trivial ongoing upgrade maintenance. Budget for reading every changelog between pinned versions and re-diffing the exported document. Pin to a specific patch version, not ^0.13, precisely because a patch can correct inference and change the published contract. Assign one owner for the package and the exported artifact.

Support. Community and maintainer-led; docs live at scramble.dedoc.co and are good, but this is not a commercially supported dependency. For a tool that emits a customer-facing API contract, that means internal ownership of correctness is mandatory — you cannot escalate. The skill/reference material shipped with the package is a genuine mitigation; point engineers at it before filing issues.

Scaling. Two dimensions. Route volume: the analyzer walks routes, controllers, models and vendor PHPDoc; on a large API this becomes a measurable build-time cost. Prefer export-at-build-time over on-demand generation at request time, and cache the artifact. Organizational: as the number of teams contributing endpoints grows, the "code is the contract" model means every team's coding hygiene becomes a docs quality issue. That is a governance concern, not a technical one, and it needs a written convention per endpoint group.

Failure modes to instrument for.

  • Silent omission: endpoint present but parameters or response shape under-documented. Detect via contract tests, not by eyeballing the UI.
  • Analysis exception: the changelog history shows a recurring class of internal analysis errors (scope exceptions, expression evaluation, extension handling). These usually surface as a broken export — make the CI step fail loudly rather than shipping a partial document.
  • Environment leakage: docs reachable outside local because the gate was never configured. Treat as a security finding, not a config nit.
  • Contract drift on upgrade: dependency bump silently rewrites the published spec. The CI diff catches this only if the diff is reviewed.
  • False confidence: consumer teams trusting an inferred schema that was never validated against a real runtime response.

Ramp-up. Near-zero for developers — there is nothing new to learn to get docs. The learning investment is in the opposite direction: teams must internalize that the documentation is only as good as their type discipline, and must know the escape hatches (Endpoint/QueryParameter attributes, @hidden, @deprecated, config for ignored classes and query-flattening) for the cases inference cannot reach. A half-day enablement session plus a one-page internal convention covers it. Overall: attractive at a score in the mid-50s — high leverage, low blast radius, but pre-1.0 and single-maintainer, so adopt deliberately with pinning, CI diffing, and a named owner rather than as a fire-and-forget convenience.

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.
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk