Skip to content

Commit

Permalink
Fix phar building and testing on Travis-CI
Browse files Browse the repository at this point in the history
  • Loading branch information
defuse committed Jun 19, 2023
1 parent 683b3cf commit 9d56e7a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
14 changes: 7 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ before_script:
- phpenv config-add extra_php_config.ini
script:
- ./test.sh
# - mkdir /tmp/box
# - chmod 755 /tmp/box
# - curl -LSs https://github.com/box-project/box/releases/download/4.3.8/box.phar -o /tmp/box/box
# - chmod 755 /tmp/box/box
# - PATH="$PATH:/tmp/box/" which box
# - PATH="$PATH:/tmp/box/" make -C dist/ build-phar
# - ./test.sh dist/defuse-crypto.phar
- mkdir /tmp/box
- chmod 755 /tmp/box
- curl -LSs https://github.com/box-project/box/releases/download/4.3.8/box.phar -o /tmp/box/box
- chmod 755 /tmp/box/box
- PATH="$PATH:/tmp/box/" which box
- PATH="$PATH:/tmp/box/" make -C dist/ build-phar
- ./test.sh dist/phar-testing-autoload.php
- if [[ $USE_PSALM -eq 1 ]]; then composer require --with-all-dependencies --dev "vimeo/psalm:dev-master"; fi
- if [[ $USE_PSALM -eq 1 ]]; then composer install; fi
- if [[ $USE_PSALM -eq 1 ]]; then vendor/bin/psalm; fi
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"php": ">=5.6.0"
},
"require-dev": {
"phpunit/phpunit": "^5|^6|^7|^8|^9|^10",
"yoast/phpunit-polyfills": "^2.0.0"
"yoast/phpunit-polyfills": "^2.0.0",
"phpunit/phpunit": "^5|^6|^7|^8|^9|^10"
},
"bin": [
"bin/generate-defuse-key"
Expand Down
2 changes: 1 addition & 1 deletion dist/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ clean:

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

composer.lock:
$(composer) config autoloader-suffix $(gitcommit)
Expand Down
3 changes: 0 additions & 3 deletions dist/box.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
"exclude": "other"
}
],
"compactors": [
"Herrera\\Box\\Compactor\\Php"
],
"main": "vendor/autoload.php",
"output": "defuse-crypto.phar",
"shebang": false,
Expand Down
4 changes: 4 additions & 0 deletions dist/phar-testing-autoload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
require 'defuse-crypto.phar';
require realpath(dirname(__FILE__) . '/../vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php');
?>
2 changes: 1 addition & 1 deletion docs/InternalDeveloperDocs.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Test the `.phar`:

```
cd ../
./test.sh dist/defuse-crypto.phar
./test.sh dist/phar-testing-autoload.php
```

Sign the `.phar`:
Expand Down

0 comments on commit 9d56e7a

Please sign in to comment.