PHPackages                             chaos-php/chaos-monkey - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. chaos-php/chaos-monkey

ActiveLibrary[Testing &amp; Quality](/categories/testing)

chaos-php/chaos-monkey
======================

Chaos Monkey is a resiliency tool that helps PHP applications tolerate random failures

1.1.1(1y ago)283.5k↓50%21MITPHPPHP ^8.1CI passing

Since Jan 28Pushed 9mo ago3 watchersCompare

[ Source](https://github.com/chaos-php/chaos-monkey)[ Packagist](https://packagist.org/packages/chaos-php/chaos-monkey)[ RSS](/packages/chaos-php-chaos-monkey/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (7)Versions (4)Used By (1)

ChaosMonkey 🐒 for PHP
=====================

[](#chaosmonkey--for-php)

[![Minimum PHP Version](https://camo.githubusercontent.com/183804d09fec16ca7b6209b007250b7d8db1b915042feb093a9f20e6e1f25359/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230382e312d3838393242462e737667)](https://php.net/)[![build](https://github.com/chaos-php/chaos-monkey/actions/workflows/build.yml/badge.svg)](https://github.com/chaos-php/chaos-monkey/actions/workflows/build.yml)[![Latest Stable Version](https://camo.githubusercontent.com/a0412309d66842ad18c6f3b7d819d59165e77cd29c2818d13d629d78a706f98c/68747470733a2f2f706f7365722e707567782e6f72672f6368616f732d7068702f6368616f732d6d6f6e6b65792f762f737461626c653f666f726d61743d666c6174)](https://packagist.org/packages/chaos-php/chaos-monkey)[![GitHub](https://camo.githubusercontent.com/a0a9c293ba7085e4da445304f97d116ec1929793806f91f8f88b1861bf17a05e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6368616f732d7068702f6368616f732d6d6f6e6b6579)](https://camo.githubusercontent.com/a0a9c293ba7085e4da445304f97d116ec1929793806f91f8f88b1861bf17a05e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6368616f732d7068702f6368616f732d6d6f6e6b6579)

Chaos Monkey for PHP applications. Try to attack your running PHP App.

Assaults
--------

[](#assaults)

- **Latency Assault** - adds a delay randomly from the range (min and max)
- **Exception Assault** - throws given exception class
- **Memory Assault** - fill memory until target fraction (95% for example)
- **Kill Assault** - no mercy, plain `exit()`

How to use
----------

[](#how-to-use)

The best experience you can get is using ready-made integrations:

- Symfony: [ChaosMonkeySymfonyBundle](https://github.com/chaos-php/chaos-monkey-symfony-bundle)
- Laravel: [ChaosMonkeyLaravelPackage](https://github.com/chaos-php/chaos-monkey-laravel-package) (in progress)

If your framework is missing, open an issue or use this package manually:

1. Install with composer: ```
    composer require chaos-php/chaos-monkey
    ```
2. Create `ChaosMonkey` object ```
    $settings = new Settings();
    $chaosMonkey = new ChaosMonkey([
       new LatencyAssault($settings),
       new MemoryAssault($settings),
       new ExceptionAssault($settings),
       new KillAppAssault($settings)
    ], $settings);
    ```
3. Configure settings and trigger chaos monkey in the working place of the application: ```
    $settings->setExceptionActive(true);
    $settings->setExceptionClass(\RuntimeException::class);
    $settings->setProbability(100);
    $settings->setEnabled(true);

    $chaosMonkey->call();
    ```
4. Watch your app plunge into chaos 🙈🙊🙉 😈

License
-------

[](#license)

ChaosMonkey is released under the MIT Licence. See the bundled LICENSE file for details.

Author
------

[](#author)

[Arkadiusz Kondas](https://twitter.com/ArkadiuszKondas)

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance45

Moderate activity, may be stable

Popularity32

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~610 days

Total

3

Last Release

716d ago

PHP version history (2 changes)1.0.0PHP ^7.4 || ^8.0

1.1.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d00e1e73a4ff379162b943421469055929a95e7a6ce4c3808976dcc1fa28f4f?d=identicon)[akondas](/maintainers/akondas)

---

Top Contributors

[![akondas](https://avatars.githubusercontent.com/u/8239917?v=4)](https://github.com/akondas "akondas (18 commits)")

---

Tags

chaos-engineeringchaos-monkeyhacktoberfestphpquality-assurancetestingphpquality assurancechaos-monkeychaos-engineeringchaos-tests

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/chaos-php-chaos-monkey/health.svg)

```
[![Health](https://phpackages.com/badges/chaos-php-chaos-monkey/health.svg)](https://phpackages.com/packages/chaos-php-chaos-monkey)
```

###  Alternatives

[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[letsdrink/ouzo-goodies

Utility classes, test assertions and mocking framework extracted from Ouzo framework.

132617.9k7](/packages/letsdrink-ouzo-goodies)[quizlet/hammock

Hammock is a stand-alone mocking library for Hacklang.

27445.5k](/packages/quizlet-hammock)[doppiogancio/mocked-client

A simple way to mock a client

2174.9k3](/packages/doppiogancio-mocked-client)[robiningelbrecht/phpunit-coverage-tools

PHPUnit coverage tools

1783.0k34](/packages/robiningelbrecht-phpunit-coverage-tools)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
