From e1fb520082470b3f2b789f750098ea7de01a2aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Wed, 19 Nov 2025 23:27:48 +0100 Subject: [PATCH] Run tests on PHP 8.5 and update test environment --- .github/workflows/ci.yml | 28 +++++++++++++++---------- composer.json | 2 +- docs/best-practices/deployment.md | 10 ++++----- tests/integration/Dockerfile-basics | 2 +- tests/integration/Dockerfile-production | 2 +- 5 files changed, 25 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5b3059..3d1a0e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,7 @@ jobs: - ubuntu-24.04 - windows-2022 php: + - 8.5 - 8.4 - 8.3 - 8.2 @@ -24,7 +25,7 @@ jobs: - 7.2 - 7.1 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} @@ -48,6 +49,7 @@ jobs: strategy: matrix: php: + - 8.5 - 8.4 - 8.3 - 8.2 @@ -58,7 +60,7 @@ jobs: - 7.2 - 7.1 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} @@ -72,6 +74,7 @@ jobs: strategy: matrix: php: + - 8.5 - 8.4 - 8.3 - 8.2 @@ -82,7 +85,7 @@ jobs: - 7.2 - 7.1 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} @@ -100,10 +103,10 @@ jobs: - "Dockerfile-basics" - "Dockerfile-production" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: - php-version: 8.4 + php-version: 8.5 - run: composer install -d tests/integration/ - run: docker build -f tests/integration/${{ matrix.dockerfile }} tests/integration/ - run: docker run -d -p 8080:8080 -v "$PWD/composer.json":/app/composer.json $(docker images -q | head -n1) @@ -124,10 +127,10 @@ jobs: - name: minimal reverse proxy path: nginx-reverse-proxy-minimal.conf steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: - php-version: 8.4 + php-version: 8.5 - run: composer install -d tests/integration/ - run: docker build -f tests/integration/Dockerfile-basics tests/integration/ - run: docker run -d -p 8080:8080 -v "$PWD/composer.json":/app/composer.json $(docker images -q | head -n1) @@ -146,6 +149,7 @@ jobs: strategy: matrix: php: + - 8.5 - 8.4 - 8.3 - 8.2 @@ -156,7 +160,7 @@ jobs: - 7.2 - 7.1 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} @@ -174,6 +178,7 @@ jobs: strategy: matrix: php: + - 8.5 - 8.4 - 8.3 - 8.2 @@ -184,7 +189,7 @@ jobs: - 7.2 - 7.1 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} @@ -201,6 +206,7 @@ jobs: strategy: matrix: php: + - 8.5 - 8.4 - 8.3 - 8.2 @@ -211,7 +217,7 @@ jobs: - 7.2 - 7.1 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} @@ -224,6 +230,6 @@ jobs: name: Docs runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - run: docker compose -f docs/compose.yaml run build - run: ls -la build/docs/ diff --git a/composer.json b/composer.json index e74b525..7620223 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "react/async": "^4.3 || ^3.1", "react/http": "^1.11", "react/promise": "^3.3", - "react/socket": "^1.15" + "react/socket": "^1.17" }, "require-dev": { "phpstan/phpstan": "1.12.11 || 1.4.10", diff --git a/docs/best-practices/deployment.md b/docs/best-practices/deployment.md index c4a55d3..6d926e3 100644 --- a/docs/best-practices/deployment.md +++ b/docs/best-practices/deployment.md @@ -229,7 +229,7 @@ If you're not already running an Apache server, you can run your X project with Apache in a temporary Docker container like this: ```bash -$ docker run -it --rm -p 80:80 -v "$PWD":/srv php:8.4-apache sh -c "rmdir /var/www/html;ln -s /srv/public /var/www/html;ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled; apache2-foreground" +$ docker run -it --rm -p 80:80 -v "$PWD":/srv php:8.5-apache sh -c "rmdir /var/www/html;ln -s /srv/public /var/www/html;ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled; apache2-foreground" ``` In order to check your web application responds as expected, you can use your @@ -313,10 +313,10 @@ limit to match your concurrency workload. On Ubuntu- or Debian-based systems, you may change your PHP configuration like this: ```bash -$ sudoedit /etc/php/8.4/cli/php.ini +$ sudoedit /etc/php/8.5/cli/php.ini ``` -```diff title="/etc/php/8.4/cli/php.ini" +```diff title="/etc/php/8.5/cli/php.ini" - memory_limit = 128M + memory_limit = -1 ``` @@ -620,7 +620,7 @@ be achieved by using a `Dockerfile` with the following contents: ```docker title="Dockerfile" # syntax=docker/dockerfile:1 - FROM php:8.4-cli + FROM php:8.5-cli WORKDIR /app/ COPY public/ public/ @@ -642,7 +642,7 @@ be achieved by using a `Dockerfile` with the following contents: COPY composer.json composer.lock ./ RUN composer install --no-dev --ignore-platform-reqs --optimize-autoloader - FROM php:8.4-alpine + FROM php:8.5-alpine # recommended: install optional extensions ext-ev and ext-sockets RUN apk --no-cache add ${PHPIZE_DEPS} libev linux-headers \ diff --git a/tests/integration/Dockerfile-basics b/tests/integration/Dockerfile-basics index aa23e72..670d87b 100644 --- a/tests/integration/Dockerfile-basics +++ b/tests/integration/Dockerfile-basics @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1 -FROM php:8.4-cli +FROM php:8.5-cli WORKDIR /app/ COPY public/ public/ diff --git a/tests/integration/Dockerfile-production b/tests/integration/Dockerfile-production index 502a00b..607ff38 100644 --- a/tests/integration/Dockerfile-production +++ b/tests/integration/Dockerfile-production @@ -8,7 +8,7 @@ COPY composer.json composer.lock ./ # dev environment already has dependencies installed: COPY vendor/ vendor/ -FROM php:8.4-alpine +FROM php:8.5-alpine # recommended: install optional extensions ext-ev and ext-sockets RUN apk --no-cache add ${PHPIZE_DEPS} libev linux-headers \