macpaw/behat-openapi-psr7-validator
Behat extension for validating PSR-7 HTTP requests and responses against OpenAPI specifications. Add schema-driven API contract checks to Behat scenarios with ready-to-use steps for request and response validation.
league/openapi-psr7-validator. This package is a thin Behat integration layer. The real decision is "do we write and maintain a Behat context for OpenAPI assertions ourselves, or adopt this adapter?" — a few days of engineering time versus a dependency with essentially zero external adoption. The v1.1.0 release is maintenance-only (PHPStan fix, AGENTS.md, widened dependency constraints) and does not change that calculus: it is a small convenience layer, not a platform.Adopt or trial when all of these hold:
league/openapi-psr7-validator consumes.Version 1.1.0 widened dependency constraints to support current package releases, which reduces the odds of install-time conflicts against a modern Laravel/Symfony/Behat stack — verify against your own pinned versions before committing, but treat "cannot install without conflict" as a lower-probability blocker than it would have been on 1.0.x. The upgrade itself is non-breaking: no API, config, or behaviour changes are described, so pinning to ^1.1 is low risk.
Look elsewhere when:
$this->getJson()). Calling the validator directly from a test helper is less machinery and avoids the Behat dependency — Behat is a heavy tax for one assertion type.To executives: This is cheap insurance against API contract drift. It converts the OpenAPI document we already maintain into an automated check that runs on every build, so breaking changes to our API surface get caught before customers do. Cost is a small integration effort on top of an existing MIT-licensed validator; risk is contained because we can pin it and replace it with a few days of in-house work if the project stalls. The latest release (v1.1.0) is routine upkeep — dependency widening and a static-analysis fix — which is a positive signal that the project isn't dormant, but it doesn't change the strategic picture: no meaningful third-party adoption and no commercial support. Recommendation: a scoped trial on one service with a healthy spec, with success measured by spec-drift defects caught pre-release.
To engineering: It's a thin Behat extension wrapping league/openapi-psr7-validator, so the validation semantics are the well-established library's, not the extension's — the blast radius is small. Value is highest if you're already on Behat with a PSR-7 client and a live OpenAPI 3.x spec; then it's an afternoon to wire into a context and a CI job. v1.1.0 is a hygiene release — no breaking changes, no new features, updated constraints to track current package versions — so upgrading or starting on ^1.1 is a low-risk move and the lockfile conflict surface is narrower than on 1.0.x. Be honest about maturity: 1 star, no dependents, single maintainer. Pin the version, keep the validation call behind our own context class so the dependency is swappable, and scope it to the endpoints where contract stability actually matters rather than every scenario. If you're on Pest/PHPUnit, skip this and call the validator directly — you get the same coverage without adopting Behat.
How can I help you explore Laravel packages today?