diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e0ba2ecb..897eea82 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -20,7 +20,7 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-24.04, ubuntu-22.04, windows-2022, macos-15] - php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6'] + php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6', '8.7'] steps: - name: Setup PHP uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2 @@ -125,7 +125,7 @@ jobs: run: | for os in ubuntu-24.04 ubuntu-22.04 windows-2025 windows-2022 windows-2019 macos-13 macos-14 macos-15 macos-26; do echo "These are extensions which are loaded by default on the following PHP versions. More extensions which are available as packages and available on pecl are supported by setup-php. Refer to [php extension support](https://github.com/shivammathur/setup-php#heavy_plus_sign-php-extension-support) for more details." > Php-extensions-loaded-on-"$os".md - for version in 5.3 5.4 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 8.5 8.6; do + for version in 5.3 5.4 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 8.5 8.6 8.7; do if [[ "${os%-*}" = "macos" ]]; then cat lists/php"$version"-macos-15.md >> Php-extensions-loaded-on-"$os".md elif [ "${os%-*}" = "windows" ]; then diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index e6c17b92..7225d08c 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -32,7 +32,7 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-24.04, ubuntu-22.04, windows-2022, macos-15] - php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6'] + php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6', '8.7'] include: - operating-system: ubuntu-24.04 php-versions: '' diff --git a/README.md b/README.md index 887365c7..a3a76f84 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ GitHub Actions status Codecov Code Coverage LICENSE - PHP Versions Supported + PHP Versions Supported

setup-php reddit @@ -112,9 +112,9 @@ Both `GitHub-hosted` and `self-hosted` runners are supported by `setup-php` on t On all supported OS/Platforms, the following PHP versions can be set up as per the runner. -- PHP 5.3 to PHP 8.6 on GitHub-hosted runners, except for macOS ARM64 runners (macos-14). -- PHP 5.6 to PHP 8.6 on GitHub-hosted macOS ARM64 runners (macos-14). -- PHP 5.6 to PHP 8.6 on self-hosted runners. +- PHP 5.3 to PHP 8.7 on GitHub-hosted runners, except for macOS ARM64 runners (macos-14). +- PHP 5.6 to PHP 8.7 on GitHub-hosted macOS ARM64 runners (macos-14). +- PHP 5.6 to PHP 8.7 on self-hosted runners. | PHP Version | Stability | Release Support | Runner Support | |-------------|-----------|-----------------------|--------------------------------| @@ -134,10 +134,11 @@ On all supported OS/Platforms, the following PHP versions can be set up as per t | `8.4` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` | | `8.5` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` | | `8.6` | `Nightly` | `In development` | `GitHub-hosted`, `self-hosted` | +| `8.7` | `Nightly` | `In development` | `GitHub-hosted`, `self-hosted` | > [!Note] -> - Specifying `8.6` in `php-version` input installs a nightly build of `PHP 8.6.0-dev` from the master branch of PHP. See [nightly build setup](#nightly-build-setup) for more information. +> - Specifying `8.7` or `master` in `php-version` input installs a nightly build of `PHP 8.7.0-dev` from the master branch of PHP. Specifying `8.6` or `nightly` installs a nightly build of `PHP 8.6.0-dev` from the PHP-8.6 branch. See [nightly build setup](#nightly-build-setup) for more information. > - To use JIT on `PHP 8.0` and above, refer to the [JIT configuration](#jit-configuration) section. ## :heavy_plus_sign: PHP Extension Support @@ -431,7 +432,8 @@ Disable coverage for these reasons: - Accepts a `string`. For example `'8.5'`. - Accepts `lowest` to set up the lowest supported PHP version. - Accepts `highest` or `latest` to set up the latest stable PHP version. -- Accepts `nightly` to set up a nightly build from the master branch of PHP. +- Accepts `nightly` to set up a nightly build of the next PHP release (`8.6`). +- Accepts `master` to set up a nightly build from the master branch of PHP (`8.7`). - Accepts `pre-installed` to set up the highest pre-installed PHP version. You can combine this with `update: true` to update the pre-installed PHP version. - Accepts the format `d.x`, where `d` is the major version. For example `5.x`, `7.x` and `8.x`. - See [PHP support](#tada-php-support) for the supported PHP versions. @@ -588,7 +590,7 @@ jobs: ### Nightly Build Setup -> Set up a nightly build of `PHP 8.6`. +> Set up a nightly build of `PHP 8.6` or `PHP 8.7`. - These PHP versions are currently in active development and might contain bugs and breaking changes. - Some user space extensions might not support these versions currently. @@ -598,7 +600,7 @@ steps: - name: Setup nightly PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.6' + php-version: '8.7' extensions: mbstring ini-values: post_max_size=256M, max_execution_time=180 coverage: xdebug diff --git a/__tests__/utils.test.ts b/__tests__/utils.test.ts index a24afab5..c0f849e5 100644 --- a/__tests__/utils.test.ts +++ b/__tests__/utils.test.ts @@ -41,10 +41,17 @@ describe('Utils tests', () => { }); it('checking parseVersion', async () => { - const fetchSpy = jest - .spyOn(fetchModule, 'fetch') - .mockResolvedValue({data: '{ "latest": "8.1", "5.x": "5.6" }'}); - expect(await utils.parseVersion('latest')).toBe('8.1'); + const fetchSpy = jest.spyOn(fetchModule, 'fetch').mockResolvedValue({ + data: fs.readFileSync( + path.join(__dirname, '../src/configs/php-versions.json'), + 'utf8' + ) + }); + expect(await utils.parseVersion('latest')).toBe('8.5'); + expect(await utils.parseVersion('nightly')).toBe('8.6'); + expect(await utils.parseVersion('master')).toBe('8.7'); + expect(await utils.parseVersion('8.7')).toBe('8.7'); + expect(await utils.parseVersion('8.7.0')).toBe('8.7'); expect(await utils.parseVersion('7')).toBe('7.0'); expect(await utils.parseVersion('7.4')).toBe('7.4'); expect(await utils.parseVersion('5.x')).toBe('5.6'); diff --git a/src/configs/php-versions.json b/src/configs/php-versions.json index 0ed946ce..c8f7480f 100644 --- a/src/configs/php-versions.json +++ b/src/configs/php-versions.json @@ -3,7 +3,7 @@ "highest": "8.5", "latest": "8.5", "nightly": "8.6", - "master": "8.6", + "master": "8.7", "5.x": "5.6", "7.x": "7.4", "8.x": "8.5"