http-interop/http-factory-tests
Unit tests for HTTP Factory implementations. Add test suite config to phpunit.xml and define factory class constants, then validate your PSR-17 request, response, server request, stream, uploaded file, and URI factories.
dev dependency and a phpunit.xml block. Clear "buy" if we ship any PSR-17 factories at all.withHeader(), withStatus()). It tests creation only. Do not let a green suite stand in for application-level HTTP coverage.Adopt when:
Http::fake() and container-bound fixtures.Look elsewhere when:
Executives: This is a free, MIT-licensed test dependency with no production footprint and no procurement overhead. It buys back roughly several engineer-days per factory implementation and, more importantly, makes HTTP library and PHPUnit upgrades verifiable instead of hopeful — the failures it catches are the kind that otherwise surface as production incidents. It's removable in one commit, so the downside is bounded. The real risk is maintenance signal, not money or lock-in: we hedge by using it as a narrow CI gate and owning our own edge-case coverage.
Engineering: Take it as a dev dependency, write one test class per factory implementation so failures stay attributable, and run it in a dedicated CI job rather than inside the application suite. Pin PHPUnit deliberately; if both this package and PHPUnit move, do them one at a time so fallout is attributable, and confirm the expected test count actually ran — version mismatches show up as silent skips and false greens. Treat assertions as frozen at the spec level until proven otherwise and layer our own tests for mutators and custom header/URI behavior. Budget about half a day to wire it in, plus one to two days of PHPUnit-13 migration friction (attributes over annotations, removed mocking APIs) if we upgrade in the same cycle.
How can I help you explore Laravel packages today?