Skip to content

Commit 947b074

Browse files
authored
Merge pull request #754 from drupol/creation-of-phar-using-nix
Creation of PHAR using Nix, in a reproducible environment
2 parents 9903051 + 094d6cd commit 947b074

File tree

10 files changed

+532
-82
lines changed

10 files changed

+532
-82
lines changed

.gitattributes

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
/.gitignore export-ignore
66
/box.json.dist export-ignore
77
/build-phar.sh export-ignore
8-
/composer.lock export-ignore
9-
/infection.json.dist
8+
/infection.json.dist export-ignore
109
/phpcs.xml.dist export-ignore
1110
/phpunit.xml.dist export-ignore
1211
/psalm.xml export-ignore

.github/workflows/release-phar.yml

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -15,47 +15,18 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
dependencies:
19-
- "locked"
20-
php-version:
21-
- "7.4"
2218
operating-system:
2319
- "ubuntu-latest"
2420

2521
steps:
2622
- name: "Checkout"
2723
uses: "actions/checkout@v3"
2824

29-
- name: "Install PHP"
30-
uses: "shivammathur/[email protected]"
31-
with:
32-
coverage: "pcov"
33-
php-version: "${{ matrix.php-version }}"
34-
ini-values: memory_limit=-1
25+
- uses: DeterminateSystems/nix-installer-action@v9
3526

36-
- name: "Cache dependencies"
37-
uses: "actions/cache@v3"
38-
with:
39-
path: |
40-
~/.composer/cache
41-
vendor
42-
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
43-
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
44-
45-
- name: "Install lowest dependencies"
46-
if: ${{ matrix.dependencies == 'lowest' }}
47-
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
48-
49-
- name: "Install highest dependencies"
50-
if: ${{ matrix.dependencies == 'highest' }}
51-
run: "composer update --no-interaction --no-progress --no-suggest"
52-
53-
- name: "Install locked dependencies"
54-
if: ${{ matrix.dependencies == 'locked' }}
55-
run: "composer install --no-interaction --no-progress --no-suggest"
56-
57-
- name: "build-phar.sh"
58-
run: "build-phar.sh"
27+
- name: "Build PHAR"
28+
run: |
29+
"nix run .#build-phar-script"
5930
6031
- name: "Upload PHAR"
6132
uses: fnkr/[email protected]

bin/roave-backward-compatibility-check.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,16 +326,16 @@ static function (string $installationPath) use ($composerIo): Installer {
326326
327327
В Украине сейчас идет война. Силами РФ наносятся удары по гражданской инфраструктуре в [Харькове][1], [Киеве][2], [Чернигове][3], [Сумах][4], [Ирпене][5] и десятках других городов. Гибнут люди - и гражданское население, и военные, в том числе российские призывники, которых бросили воевать. Чтобы лишить собственный народ доступа к информации, правительство РФ запретило называть войну войной, закрыло независимые СМИ и принимает сейчас ряд диктаторских законов. Эти законы призваны заткнуть рот всем, кто против войны. За обычный призыв к миру сейчас можно получить несколько лет тюрьмы.
328328
329-
Не молчите! Молчание - знак вашего согласия с политикой российского правительства.
329+
Не молчите! Молчание - знак вашего согласия с политикой российского правительства.
330330
**Вы можете сделать выбор НЕ МОЛЧАТЬ.**
331331
332332
---
333333
334334
## 🇺🇸 To people of Russia
335335
336-
There is a war in Ukraine right now. The forces of the Russian Federation are attacking civilian infrastructure in [Kharkiv][1], [Kyiv][2], [Chernihiv][3], [Sumy][4], [Irpin][5] and dozens of other cities. People are dying – both civilians and military servicemen, including Russian conscripts who were thrown into the fighting. In order to deprive its own people of access to information, the government of the Russian Federation has forbidden calling a war a war, shut down independent media and is passing a number of dictatorial laws. These laws are meant to silence all those who are against war. You can be jailed for multiple years for simply calling for peace.
336+
There is a war in Ukraine right now. The forces of the Russian Federation are attacking civilian infrastructure in [Kharkiv][1], [Kyiv][2], [Chernihiv][3], [Sumy][4], [Irpin][5] and dozens of other cities. People are dying – both civilians and military, including Russian conscripts who were thrown into the fighting. In order to deprive its own people of access to information, the government of the Russian Federation has forbidden calling a war a war, shut down independent media and is passing a number of dictatorial laws. These laws are meant to silence all those who are against war. You can be jailed for multiple years for simply calling for peace.
337337
338-
Do not be silent! Silence is a sign that you accept the Russian government's policy.
338+
Do not be silent! Silence is a sign that you accept the Russian government's policy.
339339
**You can choose NOT TO BE SILENT.**
340340
341341
[1]: <https://cloudfront-us-east-2.images.arcpublishing.com/reuters/P7K2MSZDGFMIJPDD7CI2GIROJI.jpg> "Kharkiv under attack"

box.json.dist

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
2+
"alias": "roave-backward-compatibility-check",
3+
"banner": false,
4+
"check-requirements": false,
25
"compactors": [
3-
"Herrera\\Box\\Compactor\\Php",
4-
"Herrera\\Box\\Compactor\\Json"
6+
"KevinGH\\Box\\Compactor\\Json",
7+
"KevinGH\\Box\\Compactor\\Php"
58
],
69
"compression": "GZ",
710
"main": "bin/roave-backward-compatibility-check.php",
@@ -10,6 +13,5 @@
1013
"LICENSE",
1114
"vendor/composer/composer/LICENSE"
1215
],
13-
"chmod": "0755",
14-
"git-version": "git-version"
16+
"timestamp": "1970-01-01"
1517
}

build-phar.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
"description": "Tool to compare two revisions of a public API to check for BC breaks",
44
"require": {
55
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
6-
"ext-json": "*",
76
"azjezz/psl": "^2.3.1",
8-
"composer/composer": "^2.5.1",
7+
"composer/composer": "^2.6.4",
98
"nikic/php-parser": "^4.15.3",
109
"nikolaposa/version": "^4.1.0",
1110
"ocramius/package-versions": "^2.7.0",

composer.lock

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)