Skip to content

Commit 3fa2d3a

Browse files
committed
Require Box with Composer and patch it
1 parent 759e9d1 commit 3fa2d3a

File tree

6 files changed

+4141
-4
lines changed

6 files changed

+4141
-4
lines changed

.github/workflows/phar.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,13 @@ jobs:
5959
- name: "Dump autoloader one more time for attributes"
6060
run: "composer dump"
6161

62+
- name: "Install Box dependencies"
63+
working-directory: "compiler/box"
64+
run: "composer install"
65+
6266
- name: "Compile PHAR"
6367
working-directory: "compiler/build"
64-
run: "php box.phar compile --no-parallel"
68+
run: "php ../box/vendor/bin/box compile --no-parallel"
6569

6670
- uses: actions/upload-artifact@v4
6771
with:
@@ -85,7 +89,7 @@ jobs:
8589

8690
- name: "Compile PHAR for checksum"
8791
working-directory: "compiler/build"
88-
run: "php box.phar compile --no-parallel"
92+
run: "php ../box/vendor/bin/box compile --no-parallel"
8993
env:
9094
PHAR_CHECKSUM: "1"
9195
COMPOSER_ROOT_VERSION: "2.1.x-dev"
@@ -255,11 +259,15 @@ jobs:
255259
- name: "Install dependencies"
256260
run: "composer install --no-interaction --no-progress"
257261

262+
- name: "Install Box dependencies"
263+
working-directory: "compiler/box"
264+
run: "composer install"
265+
258266
- name: "Extract old phpstan.phar"
259-
run: "php compiler/build/box.phar extract phar-file-checksum/phpstan.phar phar-old"
267+
run: "php ../box/vendor/bin/box extract phar-file-checksum/phpstan.phar phar-old"
260268

261269
- name: "Extract new phpstan.phar"
262-
run: "php compiler/build/box.phar extract phpstan.phar phar-new"
270+
run: "php ../box/vendor/bin/box extract phpstan.phar phar-new"
263271

264272
- name: "List prefix locations in old PHAR"
265273
run: "php .github/scripts/listPrefix.php ${{ github.workspace }}/phar-old > phar-old.txt"

compiler/box/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/vendor

compiler/box/composer.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"require": {
3+
"humbug/box": "^4.6",
4+
"cweagans/composer-patches": "^1.7"
5+
},
6+
"config": {
7+
"platform": {
8+
"php": "8.2.99"
9+
},
10+
"allow-plugins": {
11+
"vaimo/composer-patches": true,
12+
"cweagans/composer-patches": true
13+
}
14+
},
15+
"extra": {
16+
"composer-exit-on-patch-failure": true,
17+
"patches": {
18+
"humbug/php-scoper": [
19+
"patches/ScoperAutoloaderGenerator.patch"
20+
]
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)