Skip to content

Commit e415b01

Browse files
jrfnlgrogy
authored andcommitted
Upgrade to Box 3 for Phar generation
Box 2 is no longer maintained and will not be made compatible with more recent PHP versions. Refs: * https://github.com/box-project/box/blob/master/UPGRADE.md#from-27-to-30 * https://github.com/box-project/box/blob/master/doc/configuration.md
1 parent 0d11f75 commit e415b01

File tree

3 files changed

+29
-33
lines changed

3 files changed

+29
-33
lines changed

.github/workflows/release.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,27 @@ jobs:
1919
- name: Setup PHP
2020
uses: shivammathur/setup-php@v2
2121
with:
22-
php-version: 5.4
22+
php-version: 7.3
2323
extensions: exif, phar, openssl
2424
coverage: none
2525
ini-values: phar.readonly=Off
2626

27-
- name: Install Box from GitHub
28-
run: |
29-
curl -LSs https://box-project.github.io/box2/installer.php | php
30-
test -f ./box.phar
31-
test -d ~/bin || mkdir ~/bin
32-
mv ./box.phar ~/bin/box
33-
~/bin/box -V
34-
echo "$HOME/bin" >> $GITHUB_PATH
35-
3627
- name: Install Composer dependencies
3728
uses: ramsey/composer-install@v1
3829
with:
3930
composer-options: "--no-dev"
4031

32+
- name: Install Box
33+
run: wget https://github.com/humbug/box/releases/latest/download/box.phar -O box.phar && chmod 0755 box.phar && pwd
34+
35+
- name: Validate configuration
36+
run: php box.phar validate -i box.json
37+
4138
- name: Building binary...
42-
run: box build -v
39+
run: php box.phar compile -v --config=box.json
40+
41+
- name: Show info about the build phar with humbug/box
42+
run: php box.phar info -l parallel-lint.phar
4343

4444
- uses: actions/upload-artifact@v2
4545
with:

.github/workflows/test.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -45,27 +45,27 @@ jobs:
4545
- name: Setup PHP
4646
uses: shivammathur/setup-php@v2
4747
with:
48-
php-version: 5.4
48+
php-version: 7.3
4949
extensions: exif, phar, openssl
5050
coverage: none
5151
ini-values: phar.readonly=Off, error_reporting=E_ALL, display_errors=On
5252

53-
- name: Install Box from GitHub
54-
run: |
55-
curl -LSs https://box-project.github.io/box2/installer.php | php
56-
test -f ./box.phar
57-
test -d ~/bin || mkdir ~/bin
58-
mv ./box.phar ~/bin/box
59-
~/bin/box -V
60-
echo "$HOME/bin" >> $GITHUB_PATH
61-
6253
- name: Install Composer dependencies
6354
uses: ramsey/composer-install@v1
6455
with:
6556
composer-options: "--no-dev"
6657

58+
- name: Install Box
59+
run: wget https://github.com/humbug/box/releases/latest/download/box.phar -O box.phar && chmod 0755 box.phar && pwd
60+
61+
- name: Validate configuration
62+
run: php box.phar validate -i box.json
63+
6764
- name: Building binary...
68-
run: box build -v
65+
run: php box.phar compile -v --config=box.json
66+
67+
- name: Show info about the build phar with humbug/box
68+
run: php box.phar info -l parallel-lint.phar
6969

7070
- uses: actions/upload-artifact@v2
7171
with:

box.json

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
{
2+
"base-path": null,
23
"output": "parallel-lint.phar",
34
"chmod": "0755",
45
"compactors": [
5-
"Herrera\\Box\\Compactor\\Php"
6+
"KevinGH\\Box\\Compactor\\Php"
67
],
7-
"extract": false,
88
"main": "parallel-lint",
9+
"directories": [
10+
"bin",
11+
"src"
12+
],
913
"files": [
1014
"LICENSE"
1115
],
@@ -14,15 +18,7 @@
1418
"name": ["*.php"],
1519
"exclude": ["Tests", "tests"],
1620
"in": "vendor"
17-
},
18-
{
19-
"exclude": ["Tests"],
20-
"in": "src"
21-
},
22-
{
23-
"in": "bin"
2421
}
2522
],
26-
"stub": true,
27-
"web": false
23+
"stub": true
2824
}

0 commit comments

Comments
 (0)