Download the PHP package metadrop/composer-comments without Composer
On this page you can find all versions of the php package metadrop/composer-comments. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download metadrop/composer-comments
More information about metadrop/composer-comments
Files in metadrop/composer-comments
Package composer-comments
Short Description Add comments to your required packages to provide more info about why they are being used
License GPL-2.0+
Informations about the package composer-comments
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
Just add the plugin to your Composer project:
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
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:
/path/to/composer-comments
should be a folder where you have cloned this repository.
Adding comments
Add commments in your composer.json
using the extra
property:
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
To display all comments run:
To display comments for a given package:
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:
Please, don't do this:
All versions of composer-comments with dependencies
composer-plugin-api Version ^2