From bb42a65ef494482dc9a4169d1b03e125f81ab1d3 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Wed, 10 Jul 2024 16:23:53 +0200 Subject: [PATCH 1/2] Add support for PHP 8.4 alpha versions --- docs/runtimes.mdx | 2 ++ index.js | 2 +- utils/layers.json/update.php | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/runtimes.mdx b/docs/runtimes.mdx index 48255fe97..551e43324 100644 --- a/docs/runtimes.mdx +++ b/docs/runtimes.mdx @@ -92,6 +92,8 @@ Bref currently provides runtimes for PHP 8.0, 8.1, 8.2 and 8.3: - `php-81-console` - `php-80-console` +Bref also provides runtimes for alpha versions of PHP 8.4. + `php-80` means PHP 8.0.\*. It is not possible to require a specific "patch" version. The latest Bref versions always aim to support the latest PHP versions, so upgrade via Composer frequently to keep PHP up to date. diff --git a/index.js b/index.js index c660ab3ea..5f09fe63e 100644 --- a/index.js +++ b/index.js @@ -47,7 +47,7 @@ class ServerlessPlugin { .filter(name => !name.startsWith('arm-')); // Console runtimes must have a PHP version provided this.runtimes = this.runtimes.filter(name => name !== 'console'); - this.runtimes.push('php-80-console', 'php-81-console', 'php-82-console', 'php-83-console'); + this.runtimes.push('php-80-console', 'php-81-console', 'php-82-console', 'php-83-console', 'php-84-console'); this.checkCompatibleRuntime(); diff --git a/utils/layers.json/update.php b/utils/layers.json/update.php index 06c149eb7..3d2412119 100644 --- a/utils/layers.json/update.php +++ b/utils/layers.json/update.php @@ -13,6 +13,8 @@ require_once __DIR__ . '/../../vendor/autoload.php'; const LAYER_NAMES = [ + 'php-84', + 'php-84-fpm', 'php-83', 'php-83-fpm', 'php-82', @@ -21,6 +23,8 @@ 'php-81-fpm', 'php-80', 'php-80-fpm', + 'arm-php-84', + 'arm-php-84-fpm', 'arm-php-83', 'arm-php-83-fpm', 'arm-php-82', From 160fb66c6874ffc137945d59d7fba8e930e8f6c4 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Wed, 10 Jul 2024 16:25:38 +0200 Subject: [PATCH 2/2] Run tests on PHP 8.4 --- .github/workflows/ci.yml | 6 +++--- .github/workflows/update-layer-versions.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2543def27..1fc087179 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: timeout-minutes: 15 strategy: matrix: - php: [ '8.3', '8.2', '8.1', '8.0' ] + php: [ '8.4', '8.3', '8.2', '8.1', '8.0' ] dependency-version: [ '' ] platform-reqs: [ '' ] include: @@ -53,7 +53,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.2' + php-version: '8.3' tools: composer:v2, cs2pr coverage: none - name: Cache Composer dependencies @@ -76,7 +76,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.2' + php-version: '8.3' tools: composer:v2, cs2pr coverage: none - name: Cache Composer dependencies diff --git a/.github/workflows/update-layer-versions.yml b/.github/workflows/update-layer-versions.yml index b384efee4..eb5ebadcc 100644 --- a/.github/workflows/update-layer-versions.yml +++ b/.github/workflows/update-layer-versions.yml @@ -38,7 +38,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.2' + php-version: '8.3' tools: composer - name: Install Composer dependencies