PHPackages                             hardpixel/composer-janitor - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. hardpixel/composer-janitor

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

hardpixel/composer-janitor
==========================

A composer cleanup plugin, to remove tests and documentation to save space

v0.3.1(9y ago)323MITPHP

Since Mar 29Pushed 9y ago1 watchersCompare

[ Source](https://github.com/hardpixel/composer-janitor)[ Packagist](https://packagist.org/packages/hardpixel/composer-janitor)[ RSS](/packages/hardpixel-composer-janitor/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (1)Versions (14)Used By (0)

Composer Janitor Plugin
=======================

[](#composer-janitor-plugin)

Cleanup Composer packages to remove unneeded files and folders if you intend to keep you project dependencies in version control. The plugin removes files that belong to 4 default rule groups ([docs](https://github.com/hardpixel/composer-janitor/blob/master/src/Plugin.php#L213), [tests](https://github.com/hardpixel/composer-janitor/blob/master/src/Plugin.php#L242), [system](https://github.com/hardpixel/composer-janitor/blob/master/src/Plugin.php#L266), [wp](https://github.com/hardpixel/composer-janitor/blob/master/src/Plugin.php#L279)) from all the project dependencies when you run `composer install` or `composer-update`. You can configure extra rule groups or disable default groups by adding options to the composer.json file.

### Configure

[](#configure)

You can configure Composer Janitor Plugin by adding a `cleanup` key in your composer.json.

`disable` : Disable default rule groups
`rules` : Define custom rule groups
`packages` : Define rules to specified packages

Below you can see an example configuration.

```
"config": {
  "cleanup": {
    "disable": ["system"],
    "rules": {
      "custom": [
        ".git*",
        ".idea",
        ".htaccess",
        ".editorconfig",
        ".phpstorm.meta.php",
        ".php_cs",
        "*.iml",
        "composer.lock",
        "bower*"
      ]
    },
    "packages": {
      "masterminds/html5": ["sami.php", "bin"],
      "querypath/querypath": ["patches", "bin", "phar"],
      "mustache/mustache": "vendor",
      "pelago/emogrifier": "Configuration",
      "wpackagist-plugin/piklist": "add-ons",
      "wpackagist-plugin/polylang": "lingotek"
    }
  }
}

```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

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 ~24 days

Recently: every ~46 days

Total

13

Last Release

3456d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4119508?v=4)[Jonian Guveli](/maintainers/jonian)[@jonian](https://github.com/jonian)

---

Top Contributors

[![jonian](https://avatars.githubusercontent.com/u/4119508?v=4)](https://github.com/jonian "jonian (20 commits)")

---

Tags

composerpackagistphp

### Embed Badge

![Health badge](/badges/hardpixel-composer-janitor/health.svg)

```
[![Health](https://phpackages.com/badges/hardpixel-composer-janitor/health.svg)](https://phpackages.com/packages/hardpixel-composer-janitor)
```

###  Alternatives

[symfony/runtime

Enables decoupling PHP applications from global state

74794.9M939](/packages/symfony-runtime)[ergebnis/composer-normalize

Provides a composer plugin for normalizing composer.json.

1.1k40.0M2.6k](/packages/ergebnis-composer-normalize)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5344.1M526](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2124.0M193](/packages/drupal-core-project-message)[sandersander/composer-link

Adds ability to link local packages for development with composer

94441.4k](/packages/sandersander-composer-link)[phpro/grumphp-shim

GrumPHP Phar distribution

284.6M333](/packages/phpro-grumphp-shim)

PHPackages © 2026

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