tienvx/pact-messenger-bundle
Symfony bundle that brings Pact consumer-driven contract testing to Symfony Messenger. Verify message-based interactions between services by recording and replaying message expectations in your test suite, helping catch breaking changes early.
EnvelopeCollector + SendMessageToTransportsEventListener) — is exactly the capability you need to assert "this handler dispatched this message to this transport" in isolation. That maps to a product decision about whether messaging contracts are covered by automated verification or left to manual QA/staging.Consider it when all of the following hold:
symfony/messenger for async communication.Look elsewhere (or do not adopt) when:
pact-php instead.Suggested adoption posture: spike, don't standardize. Timebox a proof-of-concept on one non-critical consumer, measure whether it actually catches a schema/routing regression in CI, and only then decide. Pin the version explicitly.
For executives (one paragraph): A small open-source library was released that lets our PHP messaging services automatically verify, in CI, that the messages they send match what downstream teams expect — including which queue they go to. The business value is fewer integration failures reaching staging and production, and faster diagnosis when a producer changes a message format. The cost is low but so is the maturity: this is a solo-maintainer 1.0.0 with no adoption track record, and it targets Symfony rather than Laravel. Recommendation is a contained, few-day evaluation on one service, not an org-wide standard.
For engineering leadership: This is contract testing for async messaging — the gap most teams have after they've adopted Pact for HTTP. It plugs into Symfony Messenger's event system to collect dispatched envelopes and filter by transport, which is what you need for deterministic assertions. The release is functional work (arg fixes, transport filtering), dependency bumps, and a batch of test-coverage PRs — a healthy signal, but a signal that the test suite is being completed at 1.0.0, not before it. Treat the version number as optimistic.
For the engineering team: Expect to write your own harness glue regardless. The README example is our primary documentation, and there is a literal TODO in the docs at release. If you're on Laravel, plan to reimplement the envelope-collection idea as middleware over pact-php — the concepts transfer, the code does not. If you're on Symfony Messenger, this is plausibly a day of integration work; verify it survives a real contract before we depend on it.
Risks to state plainly: single maintainer, first contribution, no security posture, no deprecation/support policy, and no evidence of production use. Mitigate by pinning the version, isolating it to test/dev dependencies only (never production runtime), and keeping a fallback of hand-rolled assertions.
How can I help you explore Laravel packages today?