Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any chance to remove the #StandWithUkraine ? #10807

Closed
Andreas-Schoenefeldt opened this issue May 28, 2022 · 28 comments
Closed

Any chance to remove the #StandWithUkraine ? #10807

Andreas-Schoenefeldt opened this issue May 28, 2022 · 28 comments

Comments

@Andreas-Schoenefeldt
Copy link

Andreas-Schoenefeldt commented May 28, 2022

The whole issue moved to this discussion, with a nice list of solutions: https://github.com/composer/composer/discussions/10808

Actually the discussion above was now cencored - I tried to restore the solutions here: https://stackoverflow.com/questions/76130997/composer-how-to-remove-standwithukraine-cli-message

@GuySartorelli
Copy link
Contributor

This probably should be a discussion rather than an issue.

@Andreas-Schoenefeldt
Copy link
Author

Totally agreed - it just feels strange to see too simplified statement of a very complex situation all the time, while you just want to do your work.

@Andreas-Schoenefeldt
Copy link
Author

Plus it is such a double standard... where was all the wokeness in the other 10+ wars before Ukraine?

@GuySartorelli
Copy link
Contributor

Since you agree this should be a discussion and not an issue, could you please close this issue and open a discussion instead?

@artembeloglazov
Copy link

@Andreas-Schoenefeldt The inclusion of this phrase was a turning point in the fight against the aggressor. One cannot be a supporter of common sense!

@xieyuheng
Copy link

xieyuheng commented Sep 12, 2022

The message come from packagist.org

You can choose a politic-free mirror from: https://packagist.org/mirrors

For example:

Enable a mirror from China:

composer config -g repos.packagist composer https://mirrors.tencent.com/composer/

Disable the mirror:

composer config -g --unset repos.packagist

@kodima05
Copy link

Another way to remove it is by removing this specific package:
composer remove ukeloop/stand-with-ukraine

@Andreas-Schoenefeldt
Copy link
Author

@kodima05, this is amazingly simple! Thank you so much for the hint!

@artembeloglazov
Copy link

composer self-remove

@mbomb007
Copy link

mbomb007 commented Nov 4, 2022

Another way to remove it is by removing this specific package: composer remove ukeloop/stand-with-ukraine

This doesn't work.

$ composer remove ukeloop/stand-with-ukraine
ukeloop/stand-with-ukraine is not required in your composer.json and has not been removed
./composer.json has been updated
Running composer update ukeloop/stand-with-ukraine
Loading composer repositories with package information
Package "ukeloop/stand-with-ukraine" listed for update is not locked.
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
100 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Info from https://repo.packagist.org: #StandWithUkraine

@politsin
Copy link

politsin commented Nov 23, 2022

git clone https://github.com/composer/composer.git --branch 2.5.4  ~/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

@evan70
Copy link

evan70 commented Feb 10, 2023

git clone https://github.com/composer/composer.git --branch 2.4.4  ~/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

ThX > work like charm @archlinux

@evan70
Copy link

evan70 commented Feb 11, 2023

but there is no path > /usr/local/bin/composer @archlinux file arch. structure i think ...
@archlinux > /usr/bin/composer ...

@evan70
Copy link

evan70 commented Feb 11, 2023

archlinux archerz use >

git clone https://github.com/composer/composer.git --branch 2.4.4  ~/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/bin/composer && \
    php composer.phar install && \
    php composer.phar update && \
    mv ~/composer-build/composer.phar /usr/bin/composer && \
    rm -rf ~/composer-build  && \
    chmod +x /usr/bin/composer

@roni-estein
Copy link

git clone https://github.com/composer/composer.git --branch 2.4.4  ~/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

New machine, this is the best answer yet, but you can remove the branch 2.4.4 to get the newest composer.
Thanks @politsin

@politsin
Copy link

politsin commented Feb 22, 2023

@roni-estein

I updated the text above with the last branch.

When I used the master branch instead of specifying a particular version, I didn't like the console output with the last commit id. And when switching between machines, it was impossible to tell which version of the cpmposer was being used.

In the end, I decided to specify the branch explicitly, and the work became more comfortable.

Maybe there is a way to use the "last" branch instead of the master branch, but I don't know it =)

@roni-estein
Copy link

You don't need the --branch, it will use "main" which is always merged to the latest one to save you needing to update

Or you could use --branch=main if you don't want to maintain the comment. Cheers 🙂

@Andreas-Schoenefeldt
Copy link
Author

As the composer team unsurprisingly resolves to censorship on this issue, I opened this on on stackoverflow to rescue the solutions: https://stackoverflow.com/questions/76130997/composer-how-to-remove-standwithukraine-cli-message

@Winfle
Copy link

Winfle commented Jun 6, 2023

No chances, until terrorist state will go out of soverign country.
You better to support your colleges, who are sitting in shelters sometimes without electricity and pay some respect

@felloz
Copy link

felloz commented Jun 24, 2023

The message come from packagist.org

You can choose a politic-free mirror from: https://packagist.org/mirrors

For example:

Enable a mirror from China:

composer config -g repos.packagist composer https://mirrors.tencent.com/composer/

Disable the mirror:

composer config -g --unset repos.packagist

Saddly, this repo is too damn slow.

@roni-estein
Copy link

Here is a small update for people using herd...
For your convenience, I've assembled it as a zsh function alias. You can put it in your .aliases or .bashrc or .zshrc or just take any part of it as you like. This is simply the solution from @politsin wrapped with a configuration variable that chooses herd, homebrew or any other service you are serving from to place your updated composer.

Cheers 🍻

composer:purge-politics() {
    # the keyword local destructs the memory variables so they wont stick around
    # after your function closes to interfere with any other system settings
    # which server are you going to run herd or something else (homebrew, xamp)
    local server="herd"
    local composer_path
    
    # choose the appropriate  path for composer
    [[ $server == "herd" ]] && composer_path="/Users/<your home directory>/Library/Application Support/Herd/bin/composer" || composer_path="/usr/local/bin/composer"
    # ** note change <your home directory>
 
    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 "$composer_path" && \
    rm -rf ~/composer-build  && \
    chmod +x "$composer_path"
}

@evan70
Copy link

evan70 commented Aug 28, 2023

alias composer="2> >(grep -av 'StandWith') composer --ansi"

jst one line to ya .bashrc or .zshrc or .wtFrc ...
work normaly with out war poltics adds ...
no china proxies needed ...
jst ya local memory one time loop 4 energy 2 sacrifice
our coGnitive resonanse ;)

@mohssineAboutaj
Copy link

alias composer="2> >(grep -av 'StandWith') composer --ansi"

jst one line to ya .bashrc or .zshrc or .wtFrc ...
work normaly with out war poltics adds ...
no china proxies needed ...
jst ya local memory one time loop 4 energy 2 sacrifice
our coGnitive resonanse ;)

your solution work perfectly, thank you so much

@djengis
Copy link

djengis commented Oct 19, 2023

@artembeloglazov

composer self-remove

Acting like a child.

@artembeloglazov
Copy link

artembeloglazov commented Oct 19, 2023

@djengis

@artembeloglazov

composer self-remove

Acting like a child.

Acting like a child: using an international it-project for political propaganda and demonstration of absolute misunderstanding of the situation.

It's been 2 years and it's already clear to everyone that Ukraine is just a way to launder money for US military corporations, and the composer is a dying project that should be gradually removed from their projects.

@Andreas-Schoenefeldt
Copy link
Author

@artembeloglazov, do you know a working alternative for composer?

Best wishes
Andreas

@artembeloglazov
Copy link

@Andreas-Schoenefeldt Package repository mirrors have been created separately from packagist.org for a while now. There is no alternative to the client for loading and resolving dependencies yet, but I think it will come soon.

@Seldaek
Copy link
Member

Seldaek commented Oct 25, 2023

The message isn't there anymore and you are still bitching? 🤷🏻‍♂️

@composer composer locked as too heated and limited conversation to collaborators Oct 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests