From 8c0b4e218d2a6b2caf9593376d13e39d13a32655 Mon Sep 17 00:00:00 2001 From: Matthias Mullie Date: Fri, 20 Dec 2024 12:22:56 +0100 Subject: [PATCH] Add tests for PHP8.4 and report error thoroughly --- CHANGELOG.md | 6 ++++++ Dockerfile | 2 ++ docker-compose.yml | 10 ++++++++++ makefile | 2 +- phpunit.xml | 11 ++++++++++- 5 files changed, 29 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9aa2703..48dfe5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Changelog +## [1.5.4] - 2024-12-20 +### Fixed +- Fixed PHP 8.4 deprecation of implicit nullable parameters + + ## [1.5.3] - 2024-04-02 ### Fixed - Fixed Redis TLL override on failure to add key @@ -358,3 +363,4 @@ [1.5.1]: https://github.com/matthiasmullie/scrapbook/compare/1.5.0...1.5.1 [1.5.2]: https://github.com/matthiasmullie/scrapbook/compare/1.5.1...1.5.2 [1.5.3]: https://github.com/matthiasmullie/scrapbook/compare/1.5.2...1.5.3 +[1.5.4]: https://github.com/matthiasmullie/scrapbook/compare/1.5.3...1.5.4 diff --git a/Dockerfile b/Dockerfile index 1213568..e920536 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,4 +4,6 @@ FROM php:$version WORKDIR /var/www COPY . . +RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" + RUN docker/php.sh diff --git a/docker-compose.yml b/docker-compose.yml index 35c462c..e613d3a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,10 @@ services: dockerfile: Dockerfile args: version: cli + volumes: + - ./src:/var/www/src + - ./tests:/var/www/tests + - ./phpunit.xml:/var/www/phpunit.xml php-8.1: <<: *default-php build: @@ -26,6 +30,12 @@ services: <<: *default-php-build args: version: 8.3-cli + php-8.4: + <<: *default-php + build: + <<: *default-php-build + args: + version: 8.4.0RC3-cli-bookworm couchbase: build: context: . diff --git a/makefile b/makefile index 05ec2ff..14dbc20 100644 --- a/makefile +++ b/makefile @@ -43,7 +43,7 @@ test: RELEVANT_CONTAINERS="$$TEST_CONTAINER $(filter-out apc flysystem memorystore sqlite, $(shell echo $(ADAPTER) | tr 'A-Z,' 'a-z '))";\ docker-compose up --no-deps --wait -d $$DEPENDENT_CONTAINERS;\ GROUP_ARRAY=($$(echo "$(GROUP)" | tr "," "\n"));\ - docker-compose run --no-deps $$VOLUMES $$TEST_CONTAINER env XDEBUG_MODE=coverage vendor/bin/phpunit $${GROUP_ARRAY[@]/#/--group } --testsuite $(ADAPTER) --coverage-clover build/coverage-$(PHP)-$(ADAPTER).clover;\ + docker-compose run --no-deps $$VOLUMES $$TEST_CONTAINER env XDEBUG_MODE=coverage vendor/bin/phpunit $${GROUP_ARRAY[@]/#/--group } --testsuite $(ADAPTER) --coverage-clover build/coverage-$(PHP)-$(ADAPTER).clover --configuration=phpunit.xml;\ TEST_STATUS=$$?;\ docker-compose stop -t0 $$RELEVANT_CONTAINERS;\ exit $$TEST_STATUS diff --git a/phpunit.xml b/phpunit.xml index af47b39..3a31a46 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,5 +1,14 @@ - +