- How do I install dskripchenko/laravel-api in a Laravel application?
- Installation is a single Composer require, and the package follows the conventional Laravel package shape: a service provider, a publishable config file, and artisan commands. After publishing the config you can register versioned route groups and generate your OpenAPI 3.0 document. Because evaluation cost is low, the recommended approach is to install it and run it against one representative controller before committing further.
- Does dskripchenko/laravel-api support multiple API versions like v1 and v2 at the same time?
- Yes. API versioning is treated as a first-class routing concept, with a version prefix plus per-version documentation, which is useful when v1 and v2 must run concurrently. Most documentation tools handle that scenario poorly, so this is one of the package's genuinely differentiating features.
- How does OpenAPI 3.0 documentation generation work without annotations or YAML?
- The package generates OpenAPI 3.0 documents directly from PHPDoc blocks, deliberately avoiding annotation classes and hand-maintained YAML files. The rationale is that annotation-based tooling pollutes controllers with verbosity while hand-written YAML drifts from the implementation. It is the same PHPDoc-as-source-of-truth bet that dedoc/scramble makes, so the practical question is how accurate its schema inference is on your code.
- Which Laravel and PHP versions does this package support?
- The supplied package metadata does not state a supported Laravel or PHP range, so this must be confirmed from composer.json and the CI matrix before adoption. The technical evaluation positions it as best suited to a Laravel 10 or 11 codebase running PHP 8.1 or newer. Treat those as an assessment rather than a guarantee and verify against the actual repository.
- How does it compare with Scramble or L5-Swagger?
- L5-Swagger relies on zircote/swagger-php annotations, which are verbose and clutter controllers, while Scramble also derives documentation from PHPDoc and is the better-known, more established alternative in this space. This package adds versioned routing, CRUD scaffolding, and middleware cascades on top of doc generation. Teams with a heavy annotation investment or an existing Scramble setup will get less value and face more conflict surface when adopting it.
- Will it work with route:cache, config:cache, and Laravel Octane?
- The technical evaluation flags these as secondary checks that have not been verified, so you should confirm them in a spike before production use. The critical question is whether the OpenAPI document is produced by an artisan command as a build-time artifact, which is preferred, or generated at request time, which is riskier under Octane and with cached routes. Coexistence with existing L5-Swagger or Scramble installs should be tested at the same time.
- Does the schema inference read FormRequest rules and Eloquent relationships, or only raw PHPDoc?
- This is not determinable from the README and is the single biggest feasibility question for the package. Mapping PHP type declarations, Eloquent casts and relationships, and FormRequest validation rules into accurate OpenAPI schemas is where PHPDoc-driven generators either succeed or produce documentation that is confidently wrong. Run the generator against a representative controller and diff the output against your current API contract before deciding.
- Is dskripchenko/laravel-api safe to use in production?
- Treat that as unproven. The project shows roughly thirteen stars, a score near 19 out of 100, an unknown repository URL, and a last release date of 2026-10-01, which is either a future-dated artifact or a data-quality problem, so supply-chain due diligence cannot be completed from the available metadata. The effective bus factor is one, meaning adoption is a bet on a maintainer rather than on a project; confirm the canonical repository URL and whether releases are signed or tagged. Also check for a test suite, an issue history, and a documented upgrade and deprecation policy.
- Can I adopt it incrementally without rewriting my existing API?
- Yes, and incremental, reversible adoption is the package's strongest practical attribute. Nothing forces a big-bang conversion: install it, point it at a single versioned route group, generate the docs, and diff the output against your current contract by hand or with a spec-comparison tool. If the output quality is unacceptable, uninstall and you have lost only the evaluation time.
- What are middleware cascades, and do they conflict with Laravel's native middleware ordering?
- Middleware cascades let you stack middleware per route and per version, which shortens repetitive route definitions in versioned API groups. The trade-off is that the abstraction can hide Laravel's native middleware ordering from developers who will debug it at two in the morning, turning the package into a framework on top of a framework. Use them sparingly and keep the resulting middleware order documented for your team.