fr3d/swagger-assertions
Laravel testing package adding PHPUnit assertions that validate API responses against your Swagger/OpenAPI definitions. Use it in feature tests to check status codes, schemas, and response structures, keeping documentation and endpoints in sync and catching contract drift early.
laminas/http dependency. Still not worth custom platform investment unless contract testing is a near-term roadmap priority.laminas/http. Still pin the dependency and have a fork/wrap fallback.Look elsewhere if:
NOASSERTION license without review.Executive summary: fr3d/swagger-assertions is a small PHP testing package that checks API requests and responses against an existing Swagger definition. It can improve release confidence and reduce integration defects for Laravel APIs at low initial cost, but it is not a strategic API platform. The new v1.0.0 release is a meaningful maintenance refresh—it is tested against current PHP, PHPUnit, and Symfony versions and removes the laminas/http dependency—which lowers some compatibility and dependency risk. However, the package still has a small community footprint, no listed dependents, and an unclear NOASSERTION license. Adoption should remain a time-boxed pilot with legal and engineering review, and teams should re-validate compatibility before standardizing.
Engineering summary: It fits best as a CI-level contract test for Laravel/PHP services already using Swagger. Use it to catch schema drift and response mismatches before release. v1.0.0 improves the maintenance signal and reduces the dependency surface by removing laminas/http, but it is a major-version release and should be treated as potentially breaking. Validate Laravel, PHP, PHPUnit, and Swagger/OpenAPI version compatibility first; confirm whether OpenAPI 3.x is supported; pin the dependency and have a fallback plan. If the pilot succeeds, either wrap it behind internal test utilities or evaluate a maintained alternative before standardizing across teams.
How can I help you explore Laravel packages today?