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.
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.
composer.json you must support for 18 months is a bad trade.Key questions to resolve before any decision:
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).
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:
ChaosServiceProvider that registers only when CHAOS_ENABLED=true and app()->environment() !== 'production'.ChaosMiddleware supporting configurable fault modes: exception (random RuntimeException), latency (bounded usleep), and http_error (weighted 4xx/5xx response).config/chaos.php that mirrors the bundle's intent in Laravel-idiomatic form — probability weights, route allowlist, per-mode toggles, kill switch.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.
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:
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.
How can I help you explore Laravel packages today?