From 6ca6d12fd3b32a68a43ce3930c14bf368be30dca Mon Sep 17 00:00:00 2001 From: Witold Wasiczko Date: Tue, 3 Nov 2020 14:33:07 +0100 Subject: [PATCH 1/7] Test on PHP8 env --- .travis.yml | 1 + composer.json | 2 +- src/Exception/SyntaxError.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index ed26846..8736001 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ php: - 7.2 - 7.3 - 7.4 + - nightly install: - composer update diff --git a/composer.json b/composer.json index 7efe324..c64d3f3 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "php": ">=5.6" }, "require-dev": { - "phpunit/phpunit": "^5.7", + "phpunit/phpunit": "^5.7.27", "guzzlehttp/guzzle": "^6", "ext-json": "*" }, diff --git a/src/Exception/SyntaxError.php b/src/Exception/SyntaxError.php index a5188b6..e46576a 100644 --- a/src/Exception/SyntaxError.php +++ b/src/Exception/SyntaxError.php @@ -4,7 +4,7 @@ namespace JsonMachine\Exception; class SyntaxError extends \RuntimeException { - public function __construct($message = "", $position) + public function __construct($message, $position) { parent::__construct($message." At position $position."); } From 07cf5a8c9ed652a0c945b0c3f608ee2c111faf72 Mon Sep 17 00:00:00 2001 From: Witold Wasiczko Date: Tue, 3 Nov 2020 14:41:54 +0100 Subject: [PATCH 2/7] Ignore php platform req --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8736001..f528acf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,4 +10,4 @@ php: - nightly install: - - composer update + - composer update --ignore-platform-req=php From d267eae7e8b3c96312c08fe651ad177905040fcc Mon Sep 17 00:00:00 2001 From: Witold Wasiczko Date: Tue, 3 Nov 2020 14:47:22 +0100 Subject: [PATCH 3/7] Self update --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index f528acf..d838ffa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,4 +10,5 @@ php: - nightly install: + - composer self-updateg - composer update --ignore-platform-req=php From 7cf7293e3898a5b9521e634990f893ac203b3e5c Mon Sep 17 00:00:00 2001 From: Witold Wasiczko Date: Tue, 3 Nov 2020 14:49:00 +0100 Subject: [PATCH 4/7] Fix typo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d838ffa..7477b15 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,5 +10,5 @@ php: - nightly install: - - composer self-updateg + - composer self-update - composer update --ignore-platform-req=php From 5dbd694d84a9e55b2a88f4410d3e87572719f064 Mon Sep 17 00:00:00 2001 From: Witold Wasiczko Date: Tue, 3 Nov 2020 14:51:20 +0100 Subject: [PATCH 5/7] Update composer to v2 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7477b15..1be3b7c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,5 +10,5 @@ php: - nightly install: - - composer self-update + - composer self-update --2 - composer update --ignore-platform-req=php From 4308c93909d85e7b32f4a833e47a37be82f6e882 Mon Sep 17 00:00:00 2001 From: Witold Wasiczko Date: Thu, 5 Nov 2020 17:30:01 +0100 Subject: [PATCH 6/7] Update local tests on all platforms --- test/docker-run-all-platforms.sh | 26 ++++++++++++++------------ test/run.sh | 2 +- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/test/docker-run-all-platforms.sh b/test/docker-run-all-platforms.sh index bd3bd6f..a7e856a 100755 --- a/test/docker-run-all-platforms.sh +++ b/test/docker-run-all-platforms.sh @@ -2,23 +2,25 @@ set -e IFS=: for VERSION in \ - 5.6:2.5.5 \ - 7.0:2.6.1 \ - 7.1:2.9.0 \ - 7.2:2.9.0 \ - 7.3:2.9.0 \ - 7.4:2.9.0 + 5.6:5.6:2.5.5 \ + 7.0:7.0:2.6.1 \ + 7.1:7.1:2.9.0 \ + 7.2:7.2:2.9.0 \ + 7.3:7.3:2.9.0 \ + 7.4:7.4:2.9.0 \ + 8.0:8.0.0RC3:3.0.0beta1 do set -- $VERSION PHP_VERSION=$1 - XDEBUG_VERSION=$2 + DOCKER_IMAGE_TAG=$2 + XDEBUG_VERSION=$3 printf "\n\n" printf "PHP $PHP_VERSION\n" printf "===============================\n" - PHP_IMAGE="php:$PHP_VERSION-cli-alpine" + PHP_IMAGE="php:$DOCKER_IMAGE_TAG-cli-alpine" CONTAINER_NAME="json-machine-php-$PHP_VERSION" docker ps --all --format "{{.Names}}" | grep "$CONTAINER_NAME" && docker rm -f "$CONTAINER_NAME" @@ -37,10 +39,10 @@ do autoconf \ g++ \ libtool \ - make \ - && pecl install xdebug-$XDEBUG_VERSION \ - && docker-php-ext-enable xdebug \ - && wget https://getcomposer.org/composer.phar -O /usr/local/bin/composer \ + make + RUN wget http://pear.php.net/go-pear.phar && php go-pear.phar + RUN pecl install xdebug-$XDEBUG_VERSION + RUN wget https://getcomposer.org/composer.phar -O /usr/local/bin/composer \ && chmod +x /usr/local/bin/composer " | docker build --tag "$CONTAINER_NAME" - > /dev/null printf "Running tests...\n" diff --git a/test/run.sh b/test/run.sh index e1891e5..be4a165 100755 --- a/test/run.sh +++ b/test/run.sh @@ -1,3 +1,3 @@ #!/usr/bin/env sh printf "$(php -v | head -n 1)\n" -composer update && vendor/bin/phpunit --colors +composer update --ignore-platform-req=php && vendor/bin/phpunit --colors From 4e624a6120f9a432a229a5e279cbf5d35984ac6d Mon Sep 17 00:00:00 2001 From: Filip Halaxa Date: Sat, 7 Nov 2020 22:56:24 +0100 Subject: [PATCH 7/7] Reverting DOCKER_IMAGE_TAG - no need for point release anyway --- test/docker-run-all-platforms.sh | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/test/docker-run-all-platforms.sh b/test/docker-run-all-platforms.sh index a7e856a..7232164 100755 --- a/test/docker-run-all-platforms.sh +++ b/test/docker-run-all-platforms.sh @@ -2,25 +2,24 @@ set -e IFS=: for VERSION in \ - 5.6:5.6:2.5.5 \ - 7.0:7.0:2.6.1 \ - 7.1:7.1:2.9.0 \ - 7.2:7.2:2.9.0 \ - 7.3:7.3:2.9.0 \ - 7.4:7.4:2.9.0 \ - 8.0:8.0.0RC3:3.0.0beta1 + 5.6:2.5.5 \ + 7.0:2.6.1 \ + 7.1:2.9.0 \ + 7.2:2.9.0 \ + 7.3:2.9.0 \ + 7.4:2.9.0 \ + 8.0-rc:3.0.0beta1 do set -- $VERSION PHP_VERSION=$1 - DOCKER_IMAGE_TAG=$2 - XDEBUG_VERSION=$3 + XDEBUG_VERSION=$2 printf "\n\n" printf "PHP $PHP_VERSION\n" printf "===============================\n" - PHP_IMAGE="php:$DOCKER_IMAGE_TAG-cli-alpine" + PHP_IMAGE="php:$PHP_VERSION-cli-alpine" CONTAINER_NAME="json-machine-php-$PHP_VERSION" docker ps --all --format "{{.Names}}" | grep "$CONTAINER_NAME" && docker rm -f "$CONTAINER_NAME"