When using Composer, sometimes messages are displayed after installing or updating:
X packages you are using are looking for funding.
Use the `composer fund` command to find out more!
I want to know if there's a solution similar to this answer for npm, but for Composer.
Is there a way to hide the messages about projects needing funding? I checked the output of composer --help
and didn't see any obvious flags.
The composer update command now outputs the number of packages you are using which are looking for funding and asks you to run the command for more details.
It is a PHAR (PHP archive), which is an archive format for PHP which can be run on the command line, amongst other things. Now run php composer.phar in order to run Composer.
The require command adds new packages to the composer. json file from the current directory. If no file exists one will be created on the fly. After adding/changing the requirements, the modified requirements will be installed or updated.
There is no specific flag to target those two lines.
You can always use --quiet
to get rid of all output, and have a completely silent run.
If for some reason you are particularly bothered by those two lines, but do not want to lose the rest of the output, you could always pipe stderr
through grep
and exclude those lines:
composer update 2> >(grep -v "composer fund" | grep -v "looking for funding")
Which results in:
Notice in the screenshot above the conspicuous lack of any reference to funding.
If all this is worth doing or not, I'll leave up to you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With