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

Random Disaster Bundle Laravel Package

matthiasnoback/random-disaster-bundle

A Symfony bundle that randomly injects exceptions into your app so you can test how it behaves when things go wrong. Set a failure rate and RandomDisasterBundle throws unexpected errors at random points during requests—ideal for verifying error pages, logging, and monitoring before real incidents.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: Poor as a dependency; strong as a design reference. Despite being indexed as a general PHP package, matthiasnoback/random-disaster-bundle is a Symfony bundle. It depends on Symfony bundle registration, DI container compiler passes, and kernel.request/kernel.response event subscribers — primitives that do not exist in a Laravel application. There is no service provider, no middleware, no facade, and no config shim. The transferable asset is the concept (probability-gated fault injection during a request), not the code.

Integration feasibility: Low for adoption, high for reimplementation. The behavior the bundle actually delivers — "with probability p, throw an exception / return an error response on this request" — is roughly 50–100 lines of Laravel-native middleware. That is cheaper to write and far cheaper to own than adapting a Symfony bundle. The realistic TPM conclusion is build, don't buy; and even "build" here means a one-day spike, not a roadmap item.

Technical risk: High.

  • Lifecycle risk. 114 stars, 0 dependents, and a single maintainer. The name and framing ("RandomDisaster") read as a teaching/demo artifact. Expect PHP 7.x-era constraints and Symfony 2.x/3.x assumptions that will not resolve cleanly against modern Laravel (10/11) on PHP 8.2+.
  • Blast-radius risk. The package's purpose is to deliberately fail requests. The documented guardrail is a probability setting and an environment toggle — there is no evidence of scoped endpoints, a hard production block, or a kill switch by default. The primary failure mode is a misconfiguration reaching production.
  • Supply-chain risk. Single-maintainer, low-traffic, no security posture, no meaningful CVE history to lean on. Putting this in a composer.json you must support for 18 months is a bad trade.

Key questions to resolve before any decision:

  1. Is chaos/failure-injection a validated need with a named owner, or an aspirational one looking for a tool?
  2. Does the team run any Symfony? If the shop is Laravel-only, the answer is unambiguously "reimplement."
  3. What is the intended blast radius — one staging route at low probability, or a broad resilience program? (If broad, a real chaos platform is the right spend.)
  4. Who owns the safety guardrails: environment gating, endpoint allowlist, probability cap, and a kill switch?
  5. What are the success criteria — e.g., "prove the checkout error page renders, the alert fires, and on-call responds"?

Recommendation: do not adopt the package. Approve the pattern, budget a short internal spike, and keep the bundle out of composer.json entirely (including require-dev, where its Symfony dependency footprint would create resolver noise and misleading signals).

Integration Approach

Stack fit: none out of the box. The bundle assumes Symfony's HTTP kernel and event dispatcher; Laravel's pipeline is middleware-centric with different container semantics. A thin adapter would cost more than a clean rewrite and would still inherit the upstream lifecycle risk.

Migration path: reimplement, do not port. Proposed shape for a Laravel-native equivalent:

  • A ChaosServiceProvider that registers only when CHAOS_ENABLED=true and app()->environment() !== 'production'.
  • A ChaosMiddleware supporting configurable fault modes: exception (random RuntimeException), latency (bounded usleep), and http_error (weighted 4xx/5xx response).
  • A config/chaos.php that mirrors the bundle's intent in Laravel-idiomatic form — probability weights, route allowlist, per-mode toggles, kill switch.
  • Feature tests using Laravel's HTTP helpers asserting deterministic injection when seeded and complete silence when disabled.

Compatibility. The bundle's PHP/Symfony version constraints are the blocker. Any Laravel adaptation requires forking and patching regardless; reimplementation sidesteps the constraint web entirely and removes the Symfony dependency graph from the project.

Sequencing.

  1. Week 1 — Decide the need. Confirm with engineering leadership what resilience outcome we are buying (e.g., "validate graceful degradation of checkout"), and agree the blast-radius policy up front.
  2. Week 1 — Spike. 2–3 days for the native middleware behind a feature flag, hard-disabled outside staging, with a seeded PRNG for test determinism.
  3. Week 2 — Prove value in staging. Run a bounded exercise; verify error pages, logging, alert routing, and the support runbook. Document the kill switch and who can flip it.
  4. Week 2–3 — Decide the next step. Either formalize as a small internal package or escalate to a mature external tool (Toxiproxy, Gremlin, AWS FIS, LitmusChaos) if scope grows beyond in-process faults (latency, network, dependency failure, partial outage).

Operational Impact

Maintenance. Effectively zero upstream maintenance to rely on. The moment the bundle is a dependency, ownership transfers to our team — so reimplementing internally is less maintenance than forking an abandoned bundle, not more.

Support. Community-only, single author, no SLA, no vendor. For a capability whose job is to break production-adjacent systems on purpose, the absence of support is close to disqualifying on its own.

Scaling. Runtime overhead of an injected fault is negligible; the real scaling concern is blast radius. Fault injection must be scoped by environment, endpoint, and probability, with a global kill switch. The bundle does not appear to enforce these as first-class concerns, so a native implementation should make them non-negotiable defaults rather than documentation.

Failure modes to design for:

  • Leaked enablement — chaos flag left on after an exercise. Mitigate with a production hard-block in the provider, a CI check, and an owner-named kill switch.
  • Non-determinism in tests — random faults produce flaky CI. Mitigate with a seeded PRNG and off-by-default configuration; do not run chaos in CI by default.
  • Dependency conflicts — Symfony packages pinning incompatible versions against the app's PHP/Laravel constraints. Avoided entirely by reimplementation.
  • Silent abandonment — no upstream patches, ever. Avoided by owning the code.
  • Misread results — teams treating injected failures as real incidents. Mitigate with clearly tagged synthetic faults in logs and telemetry so on-call can distinguish chaos from signal.

Ramp-up. Technically low — a mid-level Laravel engineer builds and documents this in under a week. The real ramp-up is organizational: teams must understand what "chaos enabled" means, how to interpret an injected failure vs. a real one, and who is authorized to flip the switch. That is a documentation, tagging, and process task, not a code task, and it is where most of the rollout effort sits.

Net assessment. The 0.79 score over-weights the package's conceptual merit and under-weights the decisive facts: it is a maintenance-orphaned, single-maintainer Symfony bundle with no Laravel path, no dependents, and a feature set limited to "throw a random exception." As a TPM: reject the package, adopt the pattern, fund a one-day internal spike behind a hard production block, and revisit a real chaos platform only if the requirement grows beyond in-process faults.

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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console