PHPackages                             metadrop/composer-comments - 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. metadrop/composer-comments

ActiveComposer-plugin

metadrop/composer-comments
==========================

Add comments to your required packages to provide more info about why they are being used

v1.0.0(2y ago)038.6k↓40.3%2GPL-2.0+PHPPHP &gt;=8.0

Since Jul 24Pushed 2y ago3 watchersCompare

[ Source](https://github.com/Metadrop/composer-comments)[ Packagist](https://packagist.org/packages/metadrop/composer-comments)[ RSS](/packages/metadrop-composer-comments/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (2)

Composer Comments Plugin
========================

[](#composer-comments-plugin)

This Composer plugins allows to add comments on Composer packages in the `composer.json` file. Those comments are displayed when the package is installed, updated or removed. Also, a `comments` command is provided to check if there are any comments.

Install
-------

[](#install)

Just add the plugin to your Composer project:

```
composer require metadrop/composer-comments

```

Limitations
-----------

[](#limitations)

The comments are not displayed when using `--dry-run` because the packages are not actually being installed, removed or updated. This is due how Composer emits events: Composer does not emit update/intall/remove event so this plugin can't display the comments associated to a package.

### Local development

[](#local-development)

CLone this repository and start hacking!

However, you will need to run it and test it. For this, can add the following code to the `composer.json` file on another directory where you want to run and test this composer plugin:

```
  "repositories": [
    {
      "type": "path",
      "url": "/path/to/composer-comments"
    }
```

`/path/to/composer-comments` should be a folder where you have cloned this repository.

Adding comments
---------------

[](#adding-comments)

Add commments in your `composer.json` using the `extra` property:

```
  "extra": {
    "package-comments": {
      "vendor/package1": "A comment about package1",
      "vendor/package2": "A comment about package2",
      "vendor/package3": "A comment about package3",
    }
  }
```

Packages that have comments don't need to be required. In other words, you can add comments for packages that are not present in your project.

Displaying comments
-------------------

[](#displaying-comments)

To display all comments run:

```
composer comments

```

To display comments for a given package:

```
composer comments vendor/package

```

What for?
---------

[](#what-for)

Sometimes packages are required and later it is not clear why. Or maybe certain package release is requried or you know that certain package should not be used. Using this plugin you can add that information directly to the `composer.json` file, increasing the chances a developer sees the message when they are dealing with packages avoiding issues in the future.

It is recommended to add only information that is not obvious from the `composer.json`.

For example:

```
  "extra": {
    "package-comments": {
      "vendor/bogus_package": "This package was tested but the peformance was not good enough and was discarded",
      "vendor/bogus_release": "On certain installations this package triggered a mysterious error. We decided to stick to releaase 1.2.3 because the bug as not present there until we found the root cause.",
      "vendor/good_package": "This package is used to provide X functionality"
    }
  }
```

Please, don't do this:

```
  "extra": {
    "package-comments": {
      "vendor_x/package": "This package is provided by Vendor X",
      "vendor/fancy_package": "This is the fancy package",
      "vendor/package": "Using version 1.2.3"
    }
  }
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

1029d ago

### Community

Maintainers

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

---

Top Contributors

[![rsanzante](https://avatars.githubusercontent.com/u/776453?v=4)](https://github.com/rsanzante "rsanzante (1 commits)")

### Embed Badge

![Health badge](/badges/metadrop-composer-comments/health.svg)

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

###  Alternatives

[humbug/box

Fast, zero config application bundler with PHARs.

1.3k801.5k69](/packages/humbug-box)[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

2994.3M16](/packages/vaimo-composer-patches)[mglaman/composer-drupal-lenient

1317.4M15](/packages/mglaman-composer-drupal-lenient)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5341.9M446](/packages/drupal-core-composer-scaffold)[roots/wordpress-core-installer

A Composer custom installer to handle installing WordPress as a dependency

4115.6M19](/packages/roots-wordpress-core-installer)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)

PHPackages © 2026

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