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

Behat Nelmio Describer Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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.

  • Does v2.0.1 widen the constraint to Symfony 6.4/7.x only, or does it retain 4/5-era support? What are the resulting PHP and NelmioApiDocBundle floors?
  • Was the repository unarchived for this release, and is there a stated maintenance commitment or is this a one-off patch?
  • Does the Symfony 7 support change the Nelmio describer API contract the injection hook depends on, or is it a constraint-only change?
  • Does it capture request and response, or responses only? Is there any redaction mechanism?
  • Does it write into source annotations, or only into the generated artifact?
  • Do captured payloads include auth headers, tokens, or fixture-borne PII?
  • Is "real examples in docs" a prioritized problem for us, or a nice-to-have?

Integration Approach

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.

Operational Impact

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.

  • Silent no-op: samples stop appearing and no one notices, so docs degrade quietly. Mitigate with an explicit example-coverage assertion in CI.
  • CI breakage from version drift — lower probability than before given active Symfony tracking, but the failure mode remains and now shifts to the next major (Symfony 8) rather than being latent today.
  • Data leakage: real fixture payloads, tokens, and PII published into API docs. Highest-consequence failure, a compliance issue rather than a quality issue. A mandatory redaction layer is a precondition, not a follow-up.
  • Stale examples diverging from the actual contract; examples should be validated against the schema, not merely rendered.
  • False confidence: a green Behat run does not imply API or documentation correctness.
  • Newly relevant: assuming the package is actively maintained because of a single patch release, and under-budgeting ownership accordingly. Verify the archive status and maintenance intent before relying on upstream.

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.

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.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle