diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 681c45acd..b7fb11786 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,7 @@ jobs: - "8.0" - "8.1" - "8.2" + - "8.3" compiler: - default @@ -45,6 +46,9 @@ jobs: - os: ubuntu-latest php-version: "8.2" compiler: jit + - os: ubuntu-latest + php-version: "8.3" + compiler: jit steps: - name: Checkout diff --git a/CHANGELOG.md b/CHANGELOG.md index e95ce6989..16cba1661 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added +- PHP8.3 support [#925](https://github.com/smarty-php/smarty/issues/925) + ### Fixed - The {debug} tag was broken in v5 [#922](https://github.com/smarty-php/smarty/issues/922) diff --git a/docker-compose.yml b/docker-compose.yml index 770b243a0..7ecd8b436 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -37,7 +37,11 @@ services: service: base build: dockerfile: ./utilities/testrunners/php82/Dockerfile - + php83: + extends: + service: base + build: + dockerfile: ./utilities/testrunners/php83/Dockerfile volumes: smarty-code: diff --git a/run-tests-for-all-php-versions.sh b/run-tests-for-all-php-versions.sh index b2a4133a0..de59f3034 100755 --- a/run-tests-for-all-php-versions.sh +++ b/run-tests-for-all-php-versions.sh @@ -13,3 +13,4 @@ $COMPOSE_CMD run --rm php74 ./run-tests.sh $@ && \ $COMPOSE_CMD run --rm php80 ./run-tests.sh $@ && \ $COMPOSE_CMD run --rm php81 ./run-tests.sh $@ && \ $COMPOSE_CMD run --rm php82 ./run-tests.sh $@ +$COMPOSE_CMD run --rm php83 ./run-tests.sh $@ diff --git a/src/ErrorHandler.php b/src/ErrorHandler.php index 16ebbeaa4..05b1cb3e6 100644 --- a/src/ErrorHandler.php +++ b/src/ErrorHandler.php @@ -77,7 +77,7 @@ public function handleError($errno, $errstr, $errfile, $errline, $errcontext = [ } if ($this->allowUndefinedArrayKeys && preg_match( - '/^(Undefined index|Undefined array key|Trying to access array offset on value of type)/', + '/^(Undefined index|Undefined array key|Trying to access array offset on)/', $errstr )) { return; // suppresses this error diff --git a/utilities/testrunners/php83/Dockerfile b/utilities/testrunners/php83/Dockerfile new file mode 100644 index 000000000..83cd8255f --- /dev/null +++ b/utilities/testrunners/php83/Dockerfile @@ -0,0 +1,10 @@ +FROM php:8.3-cli + +## Basic utilities +RUN apt-get update -yqq && apt-get install -y curl apt-utils git zip unzip + +## Composer +COPY ./utilities/testrunners/shared/install-composer.sh /root/install-composer.sh +WORKDIR /root +RUN sh ./install-composer.sh +RUN mv ./composer.phar /usr/local/bin/composer