gorghoa/scenariostate-behat-extension
A Behat extension for gorghoa/scenariostate that automatically wires shared scenario state into your step definitions. Keep acceptance tests clean and decoupled by injecting state objects instead of passing data around, making complex PHP test suites easier to maintain.
What it actually is. Unchanged. gorghoa/scenariostate-behat-extension is a Behat extension — not a Laravel package. It registers a ScenarioState service into Behat's service container and exposes it to step-definition contexts via a constructor argument resolver, giving step classes a shared, scenario-scoped object bag. Scope is small and single-purpose, and it has no relationship to Laravel's container, Eloquent, HTTP kernel, or Artisan. The only integration surface remains behat.yml plus the Composer autoloader.
What changed in v1.0.7. One community-contributed change: Symfony 5 component constraint compatibility (PR #38, credited to an external contributor). "SF5" almost certainly denotes Symfony 5 — Behat is built on Symfony DI, Console, EventDispatcher, Translation, and Yaml components, so a Symfony 5 constraint widening is the prerequisite for running under Behat 3.8+/Symfony 5-era stacks. Read literally, the note describes a dependency-constraint change, not a behavior change. It is a patch-level tag: no API change, no new extension points, no stated PHP 8 support, no stated change to the Behat version envelope, no test/CI evidence in the notes, and no support-policy statement. The integration shape documented in the prior review is untouched.
Architecture fit. Unchanged and still the primary finding. Fit with a PHPUnit/Pest-first Laravel team is zero; fit with a Behat-based acceptance layer that has multiple contexts handing off data is reasonable. If the evaluation was opened on the assumption that this is a Laravel package, it should be closed on that basis alone — the release does nothing to change that.
Integration feasibility. Mechanically unchanged, but slightly de-risked. Symfony component constraints are exactly the kind of thing that produces unhelpful Composer conflicts on a modern Behat install, and this release plausibly removes one. That is a real, if narrow, improvement to feasibility — it is not an improvement to viability, maintainability, or support.
Technical risk — downgraded from high to medium-high, not resolved.
BeforeScenario reset hook, a resolver. Owning that code eliminates the entire compatibility, support, and upgrade obligation.Key questions (revised).
composer.json, or does it also modify runtime code? Was it merged with CI evidence on the newly permitted combinations?Stack fit. Unchanged. require-dev only, scoped to the Behat layer, never imported by application code, invisible to the Laravel runtime. If the org has no Behat layer, this terminates as "not applicable."
Migration path. Unchanged in sequence — register in behat.yml, introduce ScenarioState as a constructor dependency, migrate shared values one context at a time alongside the producing/consuming step, delete statics once unreferenced. The per-context reversibility remains the genuine advantage of the small API surface. The 1.0.7 patch does not alter this path and does not require a migration of its own.
Compatibility. Pin exactly — Symfony 5 compatibility means the acceptable-combination space is now broader, and broader is not safer without a matrix. Do not float constraints. Validate with a dry-run resolution against our pinned Behat and target PHP, and add a CI job across every PHP minor we intend to support. The realistic verified envelope is still PHP 7.x-era and Behat 3.x; PHP 8 remains unverified by the maintainer and must be verified by us or assumed broken.
Sequencing (adjusted at the decision gate only).
The change makes option (b) defensible where the prior review effectively ruled it out. It does not make it preferable; the low opportunity score (11.38) and the small build cost still point at (a).
Maintenance. The release slightly improves the starting position and leaves the obligation identical: we own this the moment we install it. The new evidence is that an outside contributor can get a constraint fix merged, which is a meaningful signal for a small library — a future Symfony or Behat compatibility break is plausibly fixable upstream rather than only in a fork. Do not convert that into an assumption of support. There is still no maintainer commitment, no release cadence, and no security response process. A named owner and a pin remain mandatory, and the "unowned dev dependency rots CI" failure mode is unchanged.
Support. Community-only and effectively dormant. The 1.0.7 thread is now the best available artifact in the issue tracker, which is a marginal improvement over an empty one. Debugging still means reading the source — short, and that remains the saving grace. Internal ramp-up docs must still be authored from scratch.
Scaling. Unchanged. The container is trivially cheap and will not bottleneck a multi-thousand-scenario suite. The scaling risk is cognitive: as more contexts share more keys, the state bag becomes an untyped, undocumented contract. Enforce namespaced keys, a typed accessor wrapper, and explicit per-scenario reset before the pattern sets.
Failure modes (one added).
composer update is not evidence of a working suite; only our CI matrix is.composer.json after the Behat layer is retired.Ramp-up. Unchanged and low: an engineer familiar with Behat is productive in under a day, and the source reads end to end. The recurring cost is organizational — an owner for the pin, the fork decision, and the state-naming conventions — against roughly a hundred lines of avoided boilerplate.
Recommendation (revised). Build remains the preferred outcome. The 1.0.7 release is a genuine but narrow improvement — it converts "abandoned" into "sporadically maintained" and plausibly clears a Symfony 5 constraint blocker — and it is sufficient to justify a timeboxed spike against the pinned upstream. It is not sufficient to adopt without a named owner, an exact pin, a CI matrix covering the newly widened combinations, and a scheduled re-evaluation.
How can I help you explore Laravel packages today?