macpaw/behat-nelmio-describer
A Behat extension that hooks into NelmioApiDocBundle to automatically describe and validate JSON responses in your scenarios. Instead of hand-writing assertions, it compares API output against your existing Nelmio documentation, keeping tests concise and your docs honest.
Architecture fit. Unchanged and still poor for a Laravel codebase. v2.0.1 adds nothing structural: it is a compatibility patch, not a redesign. The package remains a Symfony bundle registering through the bundle system and hooking NelmioApiDocBundle's describer pipeline to inject sample request/response payloads captured during Behat runs. A Laravel app still has no bundle registry, no service provider surface, and no native hook point. Both ends of the bridge remain non-native — Behat instead of PHPUnit/Pest, NelmioApiDocBundle instead of Scribe, Scramble, or l5-swagger. The underlying concept (executable tests as the source of documentation examples) remains vendor-neutral and worth harvesting; the implementation remains non-portable.
Integration feasibility. Low as a dependency, unchanged. The release removes one prior objection but not the decisive one. Previously we flagged that Composer constraint resolution would likely fail outright on Laravel 10/11 with PHP 8.2+. With Symfony 7.0 support, that specific objection weakens: the package now plausibly resolves on a modern PHP band. What it does not do is give Laravel a place to register it. Consuming it still requires Symfony HttpKernel bundle enablement and a Nelmio describer pipeline to inject into. Re-implementing the capture-then-inject hook against Scribe or Scramble remains a realistic 3–10 developer-days, largely unchanged — the reference design is now slightly more legible because it targets a current Symfony line, but the port surface is the same.
Technical risk. High on supply chain, low on blast radius — with one correction to the prior assessment. A new release contradicts the earlier "archived: yes, last release 2023-12-01" snapshot. Either the archive flag was lifted or the metadata we relied on was stale; that discrepancy should be verified before quoting either state. The other signals are unchanged: 2 stars, 0 dependents, single-contributor release cadence, and a package that exists to serve MacPaw's own stack. One Symfony 7 compatibility PR is evidence of minimal maintenance, not of revived stewardship. There is still no CVE channel, no field hardening, and no maintainer to escalate to. Because the package operates at test/docs time and never enters the runtime request path, it cannot take production down; risk stays concentrated in CI reliability and documentation accuracy.
Key questions.
Stack fit. Two distinct cases, both unchanged in substance. (a) Pure Laravel: reject as a dependency, accept as a pattern. The equivalent capability is a custom example resolver that reads recorded fixtures and feeds them to Scribe or Scramble. (b) A Symfony service already running Nelmio + Behat: moderate fit, and now slightly better than before because the package tracks a current Symfony line — but still only if we are willing to vendor-fork.
Migration path. Still greenfield; there is nothing to migrate from. Sequence: audit the repository (roughly half a day, now including a diff of v2.0.0 → v2.0.1 to confirm it is constraint-only) → extract the capture/injection design → implement a 200–400 LOC adapter for the doc generator we actually run → wire into CI. If a fork is chosen, vendor it under an internal namespace via a VCS repositories entry so we control versioning and patching.
Compatibility. Materially revised. The prior "Symfony 4/5-era, PHP ~8.1, resolution will fail on Laravel 10/11" characterization no longer holds. Expect the supported window to be roughly Symfony 6.4/7.x with a current NelmioApiDocBundle and PHP 8.2+. This is good hygiene and removes a hard blocker, but it does not create a Laravel integration path. Running Behat alongside PHPUnit/Pest remains technically harmless and organizationally costly: a second test harness, a second CI job, duplicated fixtures.
Sequencing. Unchanged. First, quantify the problem: what percentage of endpoints lack usable examples, and how often do those examples drift? Second, if the number is material, build native rather than adopt. Third, instrument capture inside the existing test suite instead of standing up a parallel Behat suite. Fourth, add redaction and schema validation before anything is published. Fifth, gate doc publication in CI on a green example-validation step. The v2.0.1 news changes none of this ordering — it only means the "it won't even install" argument can no longer be used to close the conversation early. The architectural argument has to carry the decision, which is the stronger and more durable case.
Maintenance. Still effectively ours the moment we adopt it: fork, pin, patch. Ongoing cost remains modest — documentation tooling, not runtime infrastructure — but budget a few days a year for dependency drift. The v2.0.1 release is a mild positive for drift risk (someone is tracking Symfony majors) and simultaneously a reminder that the maintainer's incentive is MacPaw's own upgrade cycle, not ours. A native re-implementation is still frequently cheaper to own than a fork of unfamiliar third-party code.
Support. No formal channel. No issue triage commitments, no security advisories. The escalation path remains "we fix it ourselves." The new release slightly improves the odds of an upstream fix landing but does not constitute support. Tolerable for CI-time tooling; unacceptable for anything shipped.
Scaling. Compute scaling is a non-issue; doc generation is build-time. Real scaling costs are unchanged: suite runtime (capturing and persisting every response lengthens CI and bloats artifacts — cap capture to representative endpoints) and team scaling, since Behat fluency is scarce in Laravel organizations and the bus factor stays at one or two engineers.
Failure modes.
Ramp-up. Low on code, moderate on concept, unchanged. Understanding Nelmio's describer pipeline takes one to two days; Behat extension mechanics another. For a Laravel team, the practical ramp is still "learn the pattern, skip the package."
Recommendation. Do not adopt as a dependency. The v2.0.1 Symfony 7 compatibility patch removes the version-resolution objection and nothing else: the package remains architecturally foreign to Laravel, with 2 stars and 0 dependents indicating no meaningful consumer base beyond MacPaw. Harvest the idea — executable tests as the source of documentation examples — and implement it against the doc generator we already run. Revisit only if we inherit a Symfony 6.4/7.x service already on this stack, and then only as a vendored, internally owned fork.
How can I help you explore Laravel packages today?