Skip to content

Commit 9d56e7a

Browse files
committedJun 19, 2023
Fix phar building and testing on Travis-CI
1 parent 683b3cf commit 9d56e7a

File tree

6 files changed

+15
-14
lines changed

6 files changed

+15
-14
lines changed
 

‎.travis.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ before_script:
4242
- phpenv config-add extra_php_config.ini
4343
script:
4444
- ./test.sh
45-
# - mkdir /tmp/box
46-
# - chmod 755 /tmp/box
47-
# - curl -LSs https://github.com/box-project/box/releases/download/4.3.8/box.phar -o /tmp/box/box
48-
# - chmod 755 /tmp/box/box
49-
# - PATH="$PATH:/tmp/box/" which box
50-
# - PATH="$PATH:/tmp/box/" make -C dist/ build-phar
51-
# - ./test.sh dist/defuse-crypto.phar
45+
- mkdir /tmp/box
46+
- chmod 755 /tmp/box
47+
- curl -LSs https://github.com/box-project/box/releases/download/4.3.8/box.phar -o /tmp/box/box
48+
- chmod 755 /tmp/box/box
49+
- PATH="$PATH:/tmp/box/" which box
50+
- PATH="$PATH:/tmp/box/" make -C dist/ build-phar
51+
- ./test.sh dist/phar-testing-autoload.php
5252
- if [[ $USE_PSALM -eq 1 ]]; then composer require --with-all-dependencies --dev "vimeo/psalm:dev-master"; fi
5353
- if [[ $USE_PSALM -eq 1 ]]; then composer install; fi
5454
- if [[ $USE_PSALM -eq 1 ]]; then vendor/bin/psalm; fi

‎composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"php": ">=5.6.0"
2727
},
2828
"require-dev": {
29-
"phpunit/phpunit": "^5|^6|^7|^8|^9|^10",
30-
"yoast/phpunit-polyfills": "^2.0.0"
29+
"yoast/phpunit-polyfills": "^2.0.0",
30+
"phpunit/phpunit": "^5|^6|^7|^8|^9|^10"
3131
},
3232
"bin": [
3333
"bin/generate-defuse-key"

‎dist/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ clean:
3131

3232
defuse-crypto.phar: dist/box.json composer.lock
3333
cp dist/box.json .
34-
php -d phar.readonly=0 $(box) build -c box.json -v
34+
php $(box) compile -c box.json -v
3535

3636
composer.lock:
3737
$(composer) config autoloader-suffix $(gitcommit)

‎dist/box.json

-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
"exclude": "other"
1616
}
1717
],
18-
"compactors": [
19-
"Herrera\\Box\\Compactor\\Php"
20-
],
2118
"main": "vendor/autoload.php",
2219
"output": "defuse-crypto.phar",
2320
"shebang": false,

‎dist/phar-testing-autoload.php

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?php
2+
require 'defuse-crypto.phar';
3+
require realpath(dirname(__FILE__) . '/../vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php');
4+
?>

‎docs/InternalDeveloperDocs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ Test the `.phar`:
141141

142142
```
143143
cd ../
144-
./test.sh dist/defuse-crypto.phar
144+
./test.sh dist/phar-testing-autoload.php
145145
```
146146

147147
Sign the `.phar`:

0 commit comments

Comments
 (0)