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.
Architecture fit. The first thing a TPM must flag: this is not a Laravel package. pact-messenger-bundle is a Symfony bundle built around Symfony Messenger primitives — the release notes reference an EnvelopeCollector, a SendMessageToTransportsEventListener, and "filter envelope by transport" behavior. Laravel's queue and bus layer (Illuminate\Queue, Illuminate\Bus, Horizon) is a separate abstraction and does not use Symfony Messenger's Envelope/Transport model, so there is no integration seam inside a Laravel application. Fit is therefore conditional and estate-dependent: viable only if the organization also runs Symfony services that use Messenger.
Integration feasibility. v1.0.0 is the initial tagged release — the previous assessment was empty because there was nothing to assess. The functional surface is small and clearly test-scoped: collect envelopes from transports, filter them by transport, and assert against Pact contracts. Integration requires the PhpPact runtime and a Pact Broker, and should be confined to require-dev and CI. The changelog is dominated by internal test coverage (PRs 4–7) and documentation (PRs 8–9), with only two behavioral changes (PRs 1–2), which tells us the 1.0 tag is a packaging milestone rather than a hardening milestone.
Technical risk. Three material risks: (1) bus factor of one — every commit, including the sole "New Contributor" entry, is from @tienvx, who is simultaneously the maintainer and a first-time contributor to this repo; (2) API immaturity — "Fix wrong arguments" implies pre-1.0 call signatures were incorrect, so any early adopter must re-verify their integration; (3) dependency churn — PHP, PHPUnit, and Symfony constraints were bumped in the same release, meaning the 1.0.0 constraint set may already exclude LTS versions the organization runs. Mitigating factor: as a dev-only dependency, production blast radius is nil.
Key questions. Does any team in the estate actually run Symfony Messenger? Are we trying to close an HTTP-provider contract gap or an async-message contract gap — because only the latter is served here? Who owns the Pact Broker and its availability SLO? What is the maintainer's stated support commitment post-1.0? Are we prepared to vendor or fork given the single-maintainer risk? Does the pinned PHP/Symfony/PHPUnit matrix match our CI images?
Stack fit. Poor for a Laravel-first codebase — this should be recorded as out-of-scope for Laravel services rather than tracked as a pending integration. For any Symfony service, fit is good: the bundle plugs into the Messenger event pipeline with no application code changes.
Migration path. None required — greenfield, test-only, no production runtime footprint. Adopt as require-dev pinned to ^1.0, scoped to a dedicated test suite and a single CI job so it cannot destabilize the main pipeline. Do not adopt any pre-1.0 fork or branch; the argument fixes in PR 1 make 1.0.0 the only defensible starting point.
Compatibility. The 1.0.0 tag landed with simultaneous PHP, PHPUnit, and Symfony bumps. Verify the exact constraint matrix against our pinned PHP version, PHPUnit major, and Symfony LTS before committing, because a single-release package has no older tags to fall back to if constraints conflict.
Sequencing. (1) Confirm a Messenger-based service genuinely exists — if not, stop and close the evaluation. (2) Prototype EnvelopeCollector and transport filtering in one non-critical service. (3) Stand up or connect to a Pact Broker with clear ownership. (4) Wire verification as a non-blocking CI gate, then promote to blocking. (5) Expand service-by-service. In parallel, for Laravel applications, evaluate pact-php directly against Laravel's HTTP test layer — that is the correct path for those teams, and conflating the two will produce a misleading "we adopted Pact" signal.
Maintenance. Low code surface but high ownership ambiguity: one maintainer, one release, no established cadence, and a "docs: Add todo" commit in the 1.0.0 changelog indicating unfinished documentation. Budget for the team to carry patches or maintain a fork; treat this as a maintained-by-us dependency, not a consumed one.
Support. Community-only. No vendor, no SLA, no commercial backing. Escalation path is a GitHub issue against a single-maintainer repo — acceptable for dev tooling, unacceptable if contract verification becomes a release gate without a fallback plan.
Scaling. Impact is confined to CI. Verification cost grows linearly with contract count and provider-state permutations; plan for parallel CI jobs and broker webhooks as the contract suite expands. Zero effect on production throughput, latency, or infrastructure.
Failure modes. Watch for: (a) broker unavailability failing builds and blocking releases — needs a documented bypass policy; (b) PHP/Symfony/PHPUnit constraint drift breaking the bundle on upgrade; (c) provider-state handler drift producing false-negative verifications; and (d) the most important one introduced by this release — transport-based envelope filtering can silently exclude messages from verification, yielding green builds with unverified contracts. Any adoption must include an assertion that the expected envelope count is non-zero per transport, otherwise the feature that makes this release useful is also the feature that can quietly defeat it.
Ramp-up. The API is small, but the underlying concepts are not: consumer-driven contracts, provider states, broker publishing, and Pact versioning are a genuine learning curve. Estimate days for a single engineer to prototype and one to two weeks before a team can own a contract suite. Add onboarding time for the Symfony Messenger mental model if the team is Laravel-native.
TPM recommendation. Do not adopt for Laravel services — the package does not target that stack, and the mismatch should be corrected in the intake record rather than carried forward. If a Symfony Messenger service exists, run a time-boxed pilot on one non-critical service with a named owner and an explicit exit criterion (fork or drop) tied to maintainer responsiveness over the next two releases.
How can I help you explore Laravel packages today?