PHPackages                             benholmen/defrag - 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. benholmen/defrag

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

benholmen/defrag
================

MS-DOS defrag output for your PHPUnit test suite

0.1.6(2y ago)931.5k[1 PRs](https://github.com/benholmen/defrag/pulls)MITPHPPHP ^8.1

Since Oct 15Pushed 1y ago2 watchersCompare

[ Source](https://github.com/benholmen/defrag)[ Packagist](https://packagist.org/packages/benholmen/defrag)[ Docs](https://github.com/benholmen/defrag)[ GitHub Sponsors](https://github.com/benholmen)[ RSS](/packages/benholmen-defrag/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (5)Versions (9)Used By (0)

Defragment your PHPUnit tests
=============================

[](#defragment-your-phpunit-tests)

This package generates a satisfying Defrag-style output when running your [PHPUnit test suite](https://phpunit.de).

[![Sample output](output.gif)](output.gif)

Inspired by
-----------

[](#inspired-by)

MS-DOS 6.x included a [defrag utility](https://en.wikipedia.org/wiki/List_of_DOS_commands#DEFRAG) that honestly was just so satisfying to watch. The 90s were a different time, folks. Disk defragmentation took about an hour and physically rearranged the data on your hard drive so it was more efficient to read off the disk.

#### Defrag Running in MS-DOS 6.22

[](#defrag-running-in-ms-dos-622)

[![Defrag Running in MS-DOS 6.22](https://camo.githubusercontent.com/a5b4da4d34ffcf8c5fc528843f212fa9a0aa97560c60e4f9a368f6adb62cd82b/68747470733a2f2f696d672e796f75747562652e636f6d2f76692f4e6964777a33427a46434d2f302e6a7067)](https://www.youtube.com/watch?v=Nidwz3BzFCM "Defrag Running in MS-DOS 6.22")

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

[](#installation)

Install the package via composer:

```
composer require benholmen/defrag --dev
```

Add the following lines to your `phpunit.xml` file:

```

```

Usage
-----

[](#usage)

Run PHPUnit as usual:

```
vendor/bin/phpunit
```

Testing
-------

[](#testing)

Of course, this produces the defrag output you'd expect.

```
composer test
```

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Ben Holmen](https://github.com/benholmen)
- [Jess Archer](https://github.com/jessarcher) key intel, assistance, and the fantastic [laravel/prompts](https://github.com/laravel/prompts) package

License
-------

[](#license)

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

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.1% 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 ~21 days

Recently: every ~32 days

Total

7

Last Release

816d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/af9a4f73fe9b7411726213dc3acbdfed9d90f7d0f596a6aafc7d0da51c9a5a9e?d=identicon)[benholmen](/maintainers/benholmen)

---

Top Contributors

[![benholmen](https://avatars.githubusercontent.com/u/1056188?v=4)](https://github.com/benholmen "benholmen (41 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")[![itsmarsu](https://avatars.githubusercontent.com/u/19348991?v=4)](https://github.com/itsmarsu "itsmarsu (1 commits)")

---

Tags

defragphpunittestingtestingphpunitdefrag

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/benholmen-defrag/health.svg)

```
[![Health](https://phpackages.com/badges/benholmen-defrag/health.svg)](https://phpackages.com/packages/benholmen-defrag)
```

###  Alternatives

[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[spatie/phpunit-snapshot-assertions

Snapshot testing with PHPUnit

69417.9M510](/packages/spatie-phpunit-snapshot-assertions)[timacdonald/log-fake

A drop in fake logger for testing with the Laravel framework.

4235.9M56](/packages/timacdonald-log-fake)[phpunit/phpunit-selenium

Selenium Server integration for PHPUnit

59610.9M150](/packages/phpunit-phpunit-selenium)[yoast/phpunit-polyfills

Set of polyfills for changed PHPUnit functionality to allow for creating PHPUnit cross-version compatible tests

18338.5M841](/packages/yoast-phpunit-polyfills)[ta-tikoma/phpunit-architecture-test

Methods for testing application architecture

10745.9M13](/packages/ta-tikoma-phpunit-architecture-test)

PHPackages © 2026

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