Regardless of personal political opinions, how would one opt out of the https://repo.packagist.org message:
Info from https://repo.packagist.org: #StandWithUkraine
Thanks for the help!
I try to keep the answer as neutral as possible. There used to be a very lively discussion on GitHub, which was censored/deleted by the team without warning.
There are a few options to remove the message:
1. Configure a non political repository (by https://github.com/xieyuheng)
choose from https://packagist.org/mirrors, for example this Chinese server:
composer config -g repos.packagist composer https://mirrors.tencent.com/composer/
2. Create an alias to remove the message on your cli (by https://github.com/ludo237 and others)
On mac OS for me this one worked (saved inside the ~/.zshrc):
alias composer="2> >(grep -av 'StandWith') composer --ansi "
It is not ideal, as it eats the eats the interactive bits, but is is most of the time pretty functioning.
3. Create a patched version of Composer (by https://github.com/politsin)
git clone https://github.com/composer/composer.git ~/composer-build && \
composer install -o -d ~/composer-build && \
wget https://raw.githubusercontent.com/politsin/snipets/master/patch/composer.patch -q -O ~/composer-build/composer.patch && \
cd ~/composer-build && patch -p1 < composer.patch && \
php -d phar.readonly=0 bin/compile && \
rm /usr/local/bin/composer && \
php composer.phar install && \
php composer.phar update && \
mv ~/composer-build/composer.phar /usr/local/bin/composer && \
rm -rf ~/composer-build && \
chmod +x /usr/local/bin/composer
History
https://github.com/Seldaek the main driver of Composer and Packagist mentioned here, why he removed the original discussion.
The message was removed from the solution.
This message has been here for a long time now and I do not think it is having any effect anymore as every user has seen it many times. Removing it so I do not have to spend so much time and energy on tickets debating it anymore.
- Seldaek (committed
2023-10-11T10:12:37Z).
Source: composer/packagist@d394c8d at main - GitHub
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