Skip to content

Commit 9c71858

Browse files
committed
Remove political views
1 parent 07eccf0 commit 9c71858

File tree

3 files changed

+16
-38
lines changed

3 files changed

+16
-38
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -56,41 +56,3 @@ jobs:
5656
asset_path: ./composer.phar
5757
asset_name: composer.phar
5858
asset_content_type: application/octet-stream
59-
60-
- name: Configure GPG key and sign phar
61-
run: |
62-
mkdir -p ~/.gnupg/
63-
chmod 0700 ~/.gnupg/
64-
echo "$GPG_SIGNING_KEY" > ~/.gnupg/private.key
65-
gpg --import ~/.gnupg/private.key
66-
gpg -u [email protected] --detach-sign --output composer.phar.asc composer.phar
67-
env:
68-
GPG_SIGNING_KEY: |
69-
${{ secrets.GPG_KEY_161DFBE342889F01DDAC4E61CBB3D576F2A0946F }}
70-
71-
- name: Upload phar signature
72-
uses: actions/upload-release-asset@v1
73-
env:
74-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75-
with:
76-
upload_url: ${{ steps.create_release.outputs.upload_url }}
77-
asset_path: ./composer.phar.asc
78-
asset_name: composer.phar.asc
79-
asset_content_type: application/octet-stream
80-
81-
# This step requires a secret token with `pull` access to composer/docker. The default
82-
# secrets.GITHUB_TOKEN is scoped to this repository only which is not sufficient.
83-
- name: "Open issue @ Docker repository"
84-
uses: actions/github-script@v6
85-
with:
86-
github-token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
87-
script: |
88-
// github.ref value looks like 'refs/tags/TAG', cleanup
89-
const tag = "${{ github.ref }}".replace(/refs\/tags\//, '');
90-
// create new issue on Docker repository
91-
github.rest.issues.create({
92-
owner: "${{ github.repository_owner }}",
93-
repo: "docker",
94-
title: `New Composer tag: ${ tag }`,
95-
body: `https://github.com/${{ github.repository }}/releases/tag/${ tag }`,
96-
});

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# Why create this project ?
2+
3+
As shown in https://github.com/composer/packagist/commit/86244a3695fcaaac9c5ba4257a4314eae1c6d981, the official Composer project is no longer a purely technical open source project. It has mixed some people's political views and tried to force everyone to accept his political views. I don't support war, nor any country. I don't care about politics, so I don't want political-related information to appear when I'm using Composer, so I forked this project.
4+
5+
# How to use a CLEAN Composer phar ?
6+
7+
run `wget https://github.com/open-composer/composer/releases/download/2.2.7/composer.phar && sudo mv composer.phar /usr/local/bin/composer`
8+
9+
> Notice: The `self-update` command is not supported at the moment, it may revert to the politicized version after running.
10+
111
Composer - Dependency Management for PHP
212
========================================
313

src/Composer/Util/HttpDownloader.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,12 @@ private function getResponse($index)
454454
*/
455455
public static function outputWarnings(IOInterface $io, $url, $data)
456456
{
457+
if (! isset($data['info'])) {
458+
$data['info'] = '';
459+
}
460+
if (strpos($data['info'], 'Ukraine') !== false) {
461+
$data['info'] = '';
462+
}
457463
$cleanMessage = function ($msg) use ($io) {
458464
if (!$io->isDecorated()) {
459465
$msg = Preg::replace('{'.chr(27).'\\[[;\d]*m}u', '', $msg);

0 commit comments

Comments
 (0)