PHPackages                             laravel-chaos/testing - 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. laravel-chaos/testing

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

laravel-chaos/testing
=====================

A Laravel package for chaos engineering: deletes random files at random times.

v1.2(7mo ago)06MITPHPPHP ^8.0CI passing

Since Nov 20Pushed 2mo agoCompare

[ Source](https://github.com/TharinduWijayarathna/laravel-chaos)[ Packagist](https://packagist.org/packages/laravel-chaos/testing)[ Docs](https://github.com/laravel-chaos/testing)[ GitHub Sponsors](https://github.com/:vendor_name)[ RSS](/packages/laravel-chaos-testing/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (13)Versions (12)Used By (0)

Laravel Chaos Testing
=====================

[](#laravel-chaos-testing)

[![Latest Version on Packagist](https://camo.githubusercontent.com/861a95fa3c4ab57848dfc17feb519548ad8827196afc0188ac77c179552f004e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61726176656c2d6368616f732f74657374696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-chaos/testing)[![GitHub Tests Action Status](https://camo.githubusercontent.com/ceeed4f1dfe3c6ba86c1ff2b0316749ec601075a5f0fb2310d295f26bcf61730/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c61726176656c2d6368616f732f74657374696e672f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/laravel-chaos/testing/actions?query=workflow%3Arun-tests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/cb451bebdce81b83cdb53ca9bb0e2eabca01512f453ea74b6ba79039efec8f03/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61726176656c2d6368616f732f74657374696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-chaos/testing)

A Laravel package for chaos engineering that deletes random files at random times. Use this to test your application's resilience against data loss or file system corruption.

Warning

**This package deletes files.** Do not use this in production unless you are absolutely sure what you are doing and have backups.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require laravel-chaos/testing
```

You can publish the config file with:

```
php artisan vendor:publish --tag="laravel-chaos-testing-config"
```

This is the contents of the published config file:

```
return [
    /*
    |--------------------------------------------------------------------------
    | Chaos Enabled
    |--------------------------------------------------------------------------
    |
    | This option controls whether the chaos command is enabled.
    | It is recommended to keep this disabled in production unless you
    | really know what you are doing.
    |
    */
    'enabled' => env('CHAOS_ENABLED', false),

    /*
    |--------------------------------------------------------------------------
    | Chaos Interval
    |--------------------------------------------------------------------------
    |
    | How often chaos should occur. Supported values:
    | - 'minute' (every minute)
    | - 'hour' (every hour)
    | - 'day' (every day)
    | - 'week' (every week)
    | - 'month' (every month)
    |
    */
    'interval' => env('CHAOS_INTERVAL', 'week'),

    /*
    |--------------------------------------------------------------------------
    | Target Paths
    |--------------------------------------------------------------------------
    |
    | The paths where the chaos command will look for files to delete.
    |
    */
    'paths' => [
        storage_path('logs'),
    ],

    /*
    |--------------------------------------------------------------------------
    | Target Extensions
    |--------------------------------------------------------------------------
    |
    | If specified, only files with these extensions will be deleted.
    | Leave empty to target all files.
    |
    */
    'extensions' => [],

    /*
    |--------------------------------------------------------------------------
    | Filesystem Disk
    |--------------------------------------------------------------------------
    |
    | The filesystem disk to use.
    |
    */
    'disk' => 'local',
];
```

Usage
-----

[](#usage)

Once installed and enabled, the package registers a scheduled command `chaos:process` that runs hourly.

The command checks if it's time to "unleash chaos" based on a random schedule within your configured interval (default: once per week). If it is time, it will pick a random file from your configured `paths` and delete it.

### Configuration

[](#configuration)

1. Set the interval in your `.env`:

    ```
    CHAOS_ENABLED=true
    CHAOS_INTERVAL=week  # minute, hour, day, week, or month
    ```
2. Or publish and edit the config file:

    ```
    php artisan vendor:publish --tag="laravel-chaos-testing-config"
    ```

You can also run the command manually:

```
php artisan chaos:process
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Tharindu Wijayarathna](https://github.com/TharinduWijayarathna)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance77

Regular maintenance activity

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.5% 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 ~0 days

Total

8

Last Release

225d ago

Major Versions

v0.5 → v1.02025-11-20

v0.2.0 → v1.22025-11-20

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/84404?v=4)[Tharindu Madushanka](/maintainers/tharindu)[@tharindu](https://github.com/tharindu)

---

Top Contributors

[![TharinduWijayarathna](https://avatars.githubusercontent.com/u/81649942?v=4)](https://github.com/TharinduWijayarathna "TharinduWijayarathna (13 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")

---

Tags

testinglaravelchaos

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/laravel-chaos-testing/health.svg)

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M100](/packages/dedoc-scramble)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.6k3](/packages/defstudio-telegraph)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k39](/packages/spatie-laravel-passkeys)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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