From 29d67324044318bb8fdcaf372a883a1dbb7b2abd Mon Sep 17 00:00:00 2001 From: Ilyas Salikhov Date: Thu, 10 Aug 2023 18:31:31 +0300 Subject: [PATCH 1/2] Actualized PHP version in README and composer.json according to the versions in CI --- README.md | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f270d05..db29845 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ ## Requirements -* PHP 7.1 and above +* PHP 7.3 and above * PHP's cURL support * PHP's JSON support diff --git a/composer.json b/composer.json index d434c44..a6ed4ad 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "php": ">=7.2.5", + "php": ">=7.3", "ext-curl": "*", "ext-json": "*", "jms/serializer": "3.*", From b478dd6f25f7dc8a9ab4d4118d69ad31651b3e53 Mon Sep 17 00:00:00 2001 From: Ilyas Salikhov Date: Thu, 10 Aug 2023 18:32:07 +0300 Subject: [PATCH 2/2] Ability to run tests in docker --- .gitignore | 2 ++ Makefile | 13 +++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 064fe5f..d99f287 100644 --- a/.gitignore +++ b/.gitignore @@ -194,5 +194,7 @@ build/* # Test report & coverage test-report.xml +.phpunit.result.cache clover.xml composer.lock +docker-compose.yml diff --git a/Makefile b/Makefile index 8ced0dc..36a3f95 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,16 @@ -ROOT_DIR=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) -SRC_DIR=$(ROOT_DIR)/src -BIN_DIR=$(ROOT_DIR)/vendor/bin +ifneq ("$(wildcard docker-compose.yml)","") + PHP=docker-compose run --rm --no-deps php php +else + PHP=php +endif test: @echo "==> Running tests" - @cd $(ROOT_DIR) @cp .env.dist .env - @php -d memory_limit=-1 $(BIN_DIR)/phpunit -c phpunit.xml.dist + @$(PHP) -d memory_limit=-1 vendor/bin/phpunit -c phpunit.xml.dist @echo "==> Testing complete" stan: @echo "==> Running analysis" - @php $(BIN_DIR)/phpstan analyse + @$(PHP) vendor/bin/phpstan analyse @echo "==> Analysis complete"