From 17e85a2af38d16dfce169b8d0520f68b420a1c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20H=C3=A4u=C3=9Fler?= Date: Thu, 7 Nov 2024 08:14:20 +0100 Subject: [PATCH] [FEATURE] Add support for PHP 8.4 --- .github/workflows/cgl.yaml | 3 ++- .github/workflows/tests.yaml | 12 ++++++++++-- Dockerfile | 2 +- composer.json | 2 +- composer.lock | 4 ++-- installer/composer.json.twig | 2 +- .../Fixtures/Templates/json-template/composer.json | 2 +- .../Fixtures/Templates/yaml-template/composer.json | 2 +- 8 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cgl.yaml b/.github/workflows/cgl.yaml index c9b6bb27..c8734599 100644 --- a/.github/workflows/cgl.yaml +++ b/.github/workflows/cgl.yaml @@ -19,7 +19,8 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.2 + # @todo Use PHP 8.4 once PHP-CS-Fixer supports it + php-version: 8.3 tools: composer:v2, composer-require-checker, composer-unused, cs2pr coverage: none diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 66fe66aa..c6e36888 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -14,9 +14,17 @@ jobs: strategy: fail-fast: false matrix: - php-version: ["8.1", "8.2", "8.3"] + php-version: ["8.1", "8.2", "8.3", "8.4"] composer-version: ["2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "2.8"] dependencies: ["highest", "lowest"] + # Skip tests for PHP 8.4 and incompatible Composer versions + exclude: + - php-version: "8.4" + composer-version: "2.1" + - php-version: "8.4" + composer-version: "2.2" + - php-version: "8.4" + composer-version: "2.3" steps: - uses: actions/checkout@v4 with: @@ -54,7 +62,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.3 + php-version: 8.4 tools: composer:v2 coverage: pcov diff --git a/Dockerfile b/Dockerfile index bae81025..d83fdd78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM composer/composer:2.8-bin AS composer LABEL maintainer="Elias Häußler " -FROM php:8.3-alpine +FROM php:8.4-alpine COPY --from=composer /composer /usr/bin/composer ENV COMPOSER_ALLOW_SUPERUSER=1 diff --git a/composer.json b/composer.json index 067d8595..454e5751 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "ext-filter": "*", "ext-json": "*", "ext-mbstring": "*", diff --git a/composer.lock b/composer.lock index bd4f21cf..935c2af0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "691e448de7f2d33afd7af88de347f207", + "content-hash": "27a46fbc3347940bc588d924e4310598", "packages": [ { "name": "cocur/slugify", @@ -8208,7 +8208,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "ext-filter": "*", "ext-json": "*", "ext-mbstring": "*", diff --git a/installer/composer.json.twig b/installer/composer.json.twig index 0ebd3bf3..ee41eae1 100644 --- a/installer/composer.json.twig +++ b/installer/composer.json.twig @@ -3,7 +3,7 @@ "description": "Template installer for cpsit/project-builder", "license": "GPL-3.0-or-later", "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "composer/installers": "^2.0", "oomphinc/composer-installers-extender": "^2.0", {% for templateSource in templateSources %} diff --git a/tests/src/Fixtures/Templates/json-template/composer.json b/tests/src/Fixtures/Templates/json-template/composer.json index 7249fe12..1d885276 100644 --- a/tests/src/Fixtures/Templates/json-template/composer.json +++ b/tests/src/Fixtures/Templates/json-template/composer.json @@ -2,7 +2,7 @@ "name": "cpsit/project-builder-template-json", "type": "project-builder-template", "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "require-dev": { "phpunit/phpunit": "^9.5" diff --git a/tests/src/Fixtures/Templates/yaml-template/composer.json b/tests/src/Fixtures/Templates/yaml-template/composer.json index aad054f1..2d269265 100644 --- a/tests/src/Fixtures/Templates/yaml-template/composer.json +++ b/tests/src/Fixtures/Templates/yaml-template/composer.json @@ -2,7 +2,7 @@ "name": "cpsit/project-builder-template-yaml", "type": "project-builder-template", "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "require-dev": { "phpunit/phpunit": "^9.5"