Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Wiremock Bundle Laravel Package

nicolasguilloux/wiremock-bundle

Symfony bundle that integrates WireMock into your test suite, letting you start stub HTTP services, define request/response mappings, and verify outgoing calls so functional tests run against realistic APIs without hitting external systems.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: The headline fact is a stack mismatch. nicolasguilloux/wiremock-bundle is a Symfony bundle, not a Laravel package — it integrates through Symfony's DependencyInjection extension, KernelEvents, and test-kernel bootstrapping. Laravel has no equivalent lifecycle, so the bundle's core value (automatic WireMock server start/stop tied to a test kernel, Symfony service configuration) does not transfer. Laravel auto-discovery, extra.laravel.providers, and vendor:publish are all inapplicable. What is portable is the pattern: the bundle is essentially a thin orchestration layer over WireMock's admin REST API (/__admin/mappings, /__admin/requests) plus a declarative stub-file convention. That pattern can be reused; the code cannot.

Integration feasibility: Low as a dependency, moderate as a reference. The repository is archived and carries a v1.0.0 with a one-line release note ("First version") and 1 star — no ecosystem validation, no downstream users to learn from. Even in a Symfony codebase I would not adopt an archived bundle; in a Laravel codebase it is a non-starter at the framework level. Feasibility of the underlying capability is high: WireMock runs as a standalone Java process or Docker image and is HTTP-native, so it can front any Laravel HTTP client (Guzzle, Laravel Http, vendor SDKs, SOAP clients) without framework coupling.

Technical risk:

  • Archived status is disqualifying for dependency adoption. No CVE response, no Symfony/PHP version bumps, no bug fixes. It will still sit in composer.lock and CI, so supply-chain and drift risk are real even for a test-only dependency.
  • Framework-version drift. A 2024 bundle built for a specific Symfony major will not track Symfony 7 / PHP 8.3+; the same class of rot applies to whatever Laravel analogues we build.
  • Overlap with Http::fake(). Laravel's built-in fake covers the common case cheaply. WireMock only earns its cost when we need cross-language contract fidelity, request verification against the wire format, a client we don't control (SDKs, generated clients), or a shared stub corpus across services.
  • Lifecycle management is the hard part, not the mocking. Port allocation, container readiness, teardown on failure, and flaky CI are where teams burn time; this bundle solved that for Symfony, and we would be re-solving it for Laravel.
  • Low information signal. One star, archived, no changelog history — treat any implicit "1.0.0 means stable" as meaningless here.

Key questions:

  1. Does our test need wire-level fidelity (real HTTP, real status codes, chunked responses, timeouts) that Http::fake() cannot express, or is the need hypothetical?
  2. Do we have non-Laravel clients or cross-team contracts that justify a shared WireMock stub corpus?
  3. Is Docker/Java acceptable in the CI image, or does that rule WireMock out on infrastructure grounds alone?
  4. If adopted, who owns the internal Laravel harness, and is that a build cost we're willing to fund?
  5. Test-only or eventual staging use? The answer changes the maintenance calculus.

Integration Approach

Stack fit: Poor as shipped, good as a design input. Laravel is the target runtime; the bundle targets Symfony. There is no realistic path where composer require nicolasguilloux/wiremock-bundle delivers value inside a Laravel app. The viable route is to treat the repository as a specification for a small internal Laravel package (or a base TestCase trait): boot WireMock (Docker or JAR), load YAML/JSON stub files, expose an assertion helper over /__admin/requests, tear down in tearDown(). That is a few hundred lines, not a fork.

Migration path: Not a migration — a translation. Inventory the bundle's concepts (stub mapping format, per-test isolation, multi-instance support, request assertions), re-implement the subset we need natively, and keep the stub files in a repo-level tests/stubs/ directory so they're portable if we later swap the harness. Do not attempt to shim Symfony's kernel hooks into Laravel.

Compatibility: Assume the bundle is pinned to a Symfony generation and a PHP floor we will not track. WireMock itself is version-independent of our PHP runtime — that is the durable, low-risk layer. Our internal harness must declare an explicit WireMock image tag (e.g. wiremock/wiremock:3.x) and pin it, because image tags move.

Sequencing:

  1. Decision gate (TPM + tech lead, ~1 day): confirm a concrete test that Http::fake() cannot satisfy. If none exists, close the initiative.
  2. Reference review (engineer, ~1 day): read the bundle's stub-mapping conventions and lifecycle handling; extract what to copy, not code.
  3. Spike (engineer, 3–5 days): minimal trait + Docker fixture, one real endpoint, assertions via admin API. Measure CI overhead (cold start, total added seconds).
  4. Pilot: one service, one integration test, behind a CI job flag.
  5. Adopt or abandon: only generalize if the pilot proves it is faster than Http::fake() for the cases we care about.

Operational Impact

Maintenance: The upstream is finished — archived means zero. Any adoption is a permanent internal maintenance commitment for the harness, with no upstream to absorb churn. That is acceptable only if the harness stays small (one trait, one Docker fixture) and we resist building a miniature framework around it. Budget an owner and a quarterly review of the pinned WireMock image.

Support: None. No issues process, no security disclosure path, no maintainer responsiveness to measure. Internal support falls entirely on the adopting team, and the reference repo will not answer questions in two years.

Scaling: Test-time scaling is the concern, not production. WireMock instances are cheap individually but multiply per parallel test process (PHPUnit/Pest with Paratest), so container count, port allocation, and startup time scale linearly. The bundle's multi-instance support is a hint that this gets awkward quickly; plan for a shared instance per process rather than per test class.

Failure modes:

  • Dead dependency: archived package accumulates bit-rot and eventually fails a PHP or framework bump, forcing an unplanned removal.
  • Flaky CI: port collisions, container not-ready races, and leaked processes turn the suite into a coin flip, and the team stops trusting red builds.
  • Shadowing real defects: overly permissive stubs make integration tests pass while production breaks against the real upstream — the classic mocking trap.
  • Duplicated effort: reimplementing lifecycle management that Laravel's Http::fake() would have solved in one line.
  • Stub drift: shared stub files diverge from the provider's actual contract with nothing enforcing reconciliation.

Ramp-up: Low for the concept, moderate for the harness. WireMock's admin API is well documented and stable; the risk is that engineers read this archived bundle, assume it is the recommended approach, and either try to install it or copy its Symfony-shaped abstractions. The onboarding artifact should be our internal README, with the upstream repo cited only as prior art — never as an install target.

Recommendation: Reject as a dependency; selectively harvest as a design reference. The archived status and Symfony/Laravel mismatch make direct use indefensible. Before funding any replacement work, require a written test case that Laravel's Http::fake() cannot handle — if that case is weak, the correct answer is no action, and this package remains a useful example of how to structure stub fixtures if the need ever becomes real.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
unabomber/timezone
delatbabel/contacts
astritzeqiri/g-recaptcha
kevinongko/laravel-genode
developeruz/laravel-analytics
robbiep/afterthedeadline
frankkessler/incontact-laravel-oauth2-rest
jlxh/laravel-userlog
davidmgilo/timetables
qylinfly/role-permission
reflect-digital/conduit
takashato/laravel-vietqr
aitor24/laralang
kraenzle-ritter/entity-relations
dindigital/din-image
pomirleanu/image-colors
sawmainek/laravel-api-generator
delatbabel/jsonresponses
mouhamedfd/permissions-generator
eduplus/qr