From 9d56e7aa058a828ef24f879b3506dc61fb962238 Mon Sep 17 00:00:00 2001 From: Taylor Hornby Date: Fri, 16 Jun 2023 00:04:50 -0600 Subject: [PATCH] Fix phar building and testing on Travis-CI --- .travis.yml | 14 +++++++------- composer.json | 4 ++-- dist/Makefile | 2 +- dist/box.json | 3 --- dist/phar-testing-autoload.php | 4 ++++ docs/InternalDeveloperDocs.md | 2 +- 6 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 dist/phar-testing-autoload.php diff --git a/.travis.yml b/.travis.yml index ffaefc0..24bd21e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/composer.json b/composer.json index 7f15ba0..29a1d52 100644 --- a/composer.json +++ b/composer.json @@ -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" diff --git a/dist/Makefile b/dist/Makefile index 833e479..bffe616 100644 --- a/dist/Makefile +++ b/dist/Makefile @@ -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) diff --git a/dist/box.json b/dist/box.json index f225f78..3c81e95 100644 --- a/dist/box.json +++ b/dist/box.json @@ -15,9 +15,6 @@ "exclude": "other" } ], - "compactors": [ - "Herrera\\Box\\Compactor\\Php" - ], "main": "vendor/autoload.php", "output": "defuse-crypto.phar", "shebang": false, diff --git a/dist/phar-testing-autoload.php b/dist/phar-testing-autoload.php new file mode 100644 index 0000000..433395a --- /dev/null +++ b/dist/phar-testing-autoload.php @@ -0,0 +1,4 @@ + diff --git a/docs/InternalDeveloperDocs.md b/docs/InternalDeveloperDocs.md index b68f710..5cac047 100644 --- a/docs/InternalDeveloperDocs.md +++ b/docs/InternalDeveloperDocs.md @@ -141,7 +141,7 @@ Test the `.phar`: ``` cd ../ -./test.sh dist/defuse-crypto.phar +./test.sh dist/phar-testing-autoload.php ``` Sign the `.phar`: