- How do I install phpsa/laravel-postman in a Laravel app?
- Install it as a dev dependency with composer require --dev phpsa/laravel-postman, publish the package config, then run the export command from your console. Because it is developer tooling rather than runtime infrastructure, it should stay in require-dev and never be loaded in production. A one-sprint spike on a single bounded context is usually enough to judge output fidelity.
- Which Laravel and PHP versions does phpsa/laravel-postman support?
- The package has shipped multiple majors, and past majors have moved config keys and command signatures, so check the PHP and Laravel version bounds for the exact release you intend to use before pinning. Verify against your real application container rather than a scratch Laravel install, because route middleware, domain routing, and versioned API prefixes are where these generators typically diverge. Pin exactly and review upgrades deliberately.
- What Laravel routes does laravel-postman export to a Postman collection?
- It introspects the Laravel router and emits a Postman collection containing endpoints, HTTP methods, and related request details. The output is derived from route definitions and docblocks, so accuracy depends on how explicitly your code declares request and response shapes. FormRequest rules, API Resources, and dynamically registered routes may be only partially represented, so manually score coverage on a sample before trusting the whole artifact.
- Is phpsa/laravel-postman safe to use in production?
- No, and you should not try to. The package is a console-only developer tool that does not touch the request lifecycle, so it carries no production blast radius as long as it remains a require-dev dependency. Keep it out of production installs and out of any runtime service provider path.
- How do I generate a Postman collection from Laravel routes in CI?
- Add it as a Composer script and invoke it as an extra CI build step. During the first quarter, fail the build only on generator errors, not on diff noise from the generated collection. Decide up front whether the artifact is a committed file or a CI-only deliverable, since that choice determines whether drift shows up in pull requests or stays invisible.
- Why is my generated Postman collection different on every run?
- Non-deterministic ordering or IDs in the generated collection produce noisy diffs and erode trust in the artifact. Before adopting it broadly, generate twice from the same commit and compare the output byte for byte. If the output is not stable, either normalise it in a post-processing step or keep the collection as a CI artifact rather than a committed file.
- Does laravel-postman handle Sanctum, Passport, or custom guard authentication?
- Authentication handling is one of the details you must verify rather than assume. Sanctum, Passport, and custom guards may not be represented exactly as your API expects, which can mean hand-editing on every regeneration. Test this explicitly during the spike on a bounded context before rolling the generator out to all API route groups.
- What changed in phpsa/laravel-postman v5.2.0, and is it a breaking change?
- The v5.2.0 release notes consist only of a compare link between v5.1.0 and v5.2.0, with no changelog entries, migration notes, or stated breaking changes. Treat it as an unknown delta until you have read the diff, and do not bump it in the same pull request as any other dependency change. Pin to the exact version you validated.
- Should I commit the generated Postman collection to the repository?
- Both options are defensible, but they trade off differently. A committed file gives reviewable diffs and makes drift visible in pull requests, at the cost of merge conflicts. A CI artifact keeps the repository cleaner but makes drift invisible, so the default recommendation is a CI artifact plus a scheduled diff report.
- Is phpsa/laravel-postman actively maintained, and what are the alternatives?
- It is single-maintainer open source with no commercial support, which is a real consideration for anything you depend on in CI. If you need a broader ecosystem or OpenAPI-first output, compare it with other Laravel API documentation generators such as Scribe or Scramble, then import the resulting spec into Postman. Evaluate any alternative against the same fidelity and determinism tests you would apply here.