Update PHP version in README [skip ci]

This commit is contained in:
Shivam Mathur 2024-11-23 03:49:40 +05:30
parent 944fb41c67
commit e77cdb393f
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -121,11 +121,11 @@ On all supported OS/Platforms the following PHP versions can be set up as per th
| `8.1` | `Stable` | `Security fixes only` | `GitHub-hosted`, `self-hosted` | | `8.1` | `Stable` | `Security fixes only` | `GitHub-hosted`, `self-hosted` |
| `8.2` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` | | `8.2` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` |
| `8.3` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` | | `8.3` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` |
| `8.4` | `Nightly` | `In development` | `GitHub-hosted`, `self-hosted` | | `8.4` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` |
| `8.5` | `Nightly` | `In development` | `GitHub-hosted`, `self-hosted` | | `8.5` | `Nightly` | `In development` | `GitHub-hosted`, `self-hosted` |
**Notes:** **Notes:**
- Specifying `8.4` or `8.5` in `php-version` input installs a nightly build of `PHP 8.4.0-dev` or `PHP 8.5.0-dev` respectively. See [nightly build setup](#nightly-build-setup) for more information. - Specifying `8.5` in `php-version` input installs a nightly build of `PHP 8.5.0-dev`. 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. - To use JIT on `PHP 8.0` and above, refer to the [JIT configuration](#jit-configuration) section.
## :heavy_plus_sign: PHP Extension Support ## :heavy_plus_sign: PHP Extension Support
@ -138,7 +138,7 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
- name: Setup PHP with PECL extension - name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
extensions: imagick, swoole extensions: imagick, swoole
``` ```
@ -166,7 +166,7 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
- name: Setup PHP with pre-release PECL extension - name: Setup PHP with pre-release PECL extension
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
extensions: xdebug-beta extensions: xdebug-beta
``` ```
@ -178,7 +178,7 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
- name: Setup PHP and disable opcache - name: Setup PHP and disable opcache
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
extensions: :opcache extensions: :opcache
``` ```
@ -190,7 +190,7 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
- name: Setup PHP without any shared extensions except mbstring - name: Setup PHP without any shared extensions except mbstring
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
extensions: none, mbstring extensions: none, mbstring
``` ```
@ -200,7 +200,7 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
- name: Setup PHP with intl - name: Setup PHP with intl
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
extensions: intl-70.1 extensions: intl-70.1
``` ```
@ -217,7 +217,7 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
- name: Setup PHP with fail-fast - name: Setup PHP with fail-fast
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
extensions: oci8 extensions: oci8
env: env:
fail-fast: true fail-fast: true
@ -233,7 +233,7 @@ These tools can be set up globally using the `tools` input. It accepts a string
- name: Setup PHP with tools - name: Setup PHP with tools
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
tools: php-cs-fixer, phpunit tools: php-cs-fixer, phpunit
``` ```
@ -243,7 +243,7 @@ These tools can be set up globally using the `tools` input. It accepts a string
- name: Setup PHP with tools - name: Setup PHP with tools
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
tools: vimeo/psalm tools: vimeo/psalm
``` ```
@ -263,8 +263,8 @@ These tools can be set up globally using the `tools` input. It accepts a string
- name: Setup PHP with tools - name: Setup PHP with tools
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
tools: php-cs-fixer:3.39, phpunit:10.4 tools: php-cs-fixer:3.64, phpunit:11.4
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
``` ```
@ -275,7 +275,7 @@ These tools can be set up globally using the `tools` input. It accepts a string
- name: Setup PHP with composer v2 - name: Setup PHP with composer v2
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
tools: composer:v2 tools: composer:v2
``` ```
@ -285,7 +285,7 @@ These tools can be set up globally using the `tools` input. It accepts a string
- name: Setup PHP without composer - name: Setup PHP without composer
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
tools: none tools: none
``` ```
@ -301,7 +301,7 @@ These tools can be set up globally using the `tools` input. It accepts a string
- name: Setup PHP with fail-fast - name: Setup PHP with fail-fast
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
tools: deployer tools: deployer
env: env:
fail-fast: true fail-fast: true
@ -318,7 +318,7 @@ These tools can be set up globally using the `tools` input. It accepts a string
- name: Setup PHP with composer and custom process timeout - name: Setup PHP with composer and custom process timeout
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
env: env:
COMPOSER_PROCESS_TIMEOUT: 300 COMPOSER_PROCESS_TIMEOUT: 300
``` ```
@ -334,7 +334,7 @@ Runs on all [PHP versions supported](#tada-php-support "List of PHP versions sup
- name: Setup PHP with Xdebug - name: Setup PHP with Xdebug
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
coverage: xdebug coverage: xdebug
``` ```
@ -362,7 +362,7 @@ Runs on PHP 7.1 and newer PHP versions.
- name: Setup PHP with PCOV - name: Setup PHP with PCOV
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
ini-values: pcov.directory=api #optional, see above for usage. ini-values: pcov.directory=api #optional, see above for usage.
coverage: pcov coverage: pcov
``` ```
@ -392,7 +392,7 @@ Disable coverage for these reasons:
- name: Setup PHP with no coverage driver - name: Setup PHP with no coverage driver
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
coverage: none coverage: none
``` ```
@ -405,7 +405,7 @@ Disable coverage for these reasons:
#### `php-version` (optional) #### `php-version` (optional)
- Specify the PHP version you want to set up. - Specify the PHP version you want to set up.
- Accepts a `string`. For example `'8.3'`. - Accepts a `string`. For example `'8.4'`.
- Accepts `lowest` to set up the lowest supported PHP version. - Accepts `lowest` to set up the lowest supported PHP version.
- Accepts `highest` or `latest` to set up the latest stable 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 from the master branch of PHP.
@ -469,7 +469,7 @@ On GitHub Actions you can assign the `setup-php` step an `id`, you can use the s
id: setup-php id: setup-php
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
- name: Print PHP version - name: Print PHP version
run: echo ${{ steps.setup-php.outputs.php-version }} run: echo ${{ steps.setup-php.outputs.php-version }}
@ -511,7 +511,7 @@ steps:
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
extensions: mbstring, intl extensions: mbstring, intl
ini-values: post_max_size=256M, max_execution_time=180 ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug coverage: xdebug
@ -529,12 +529,12 @@ jobs:
strategy: strategy:
matrix: matrix:
operating-system: ['ubuntu-latest', 'windows-latest', 'macos-latest'] operating-system: ['ubuntu-latest', 'windows-latest', 'macos-latest']
php-versions: ['8.1', '8.2', '8.3'] php-versions: [8.2', '8.3', '8.4']
phpunit-versions: ['latest'] phpunit-versions: ['latest']
include: include:
- operating-system: 'ubuntu-latest' - operating-system: 'ubuntu-latest'
php-versions: '8.0' php-versions: '8.1'
phpunit-versions: 9 phpunit-versions: 10
steps: steps:
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
@ -550,7 +550,7 @@ jobs:
### Nightly Build Setup ### Nightly Build Setup
> Set up a nightly build of `PHP 8.4` or `PHP 8.5`. > Set up a nightly build of `PHP 8.5`.
- These PHP versions are currently in active development and might contain bugs and breaking changes. - These PHP versions are currently in active development and might contain bugs and breaking changes.
- Some user space extensions might not support this version currently. - Some user space extensions might not support this version currently.
@ -560,7 +560,7 @@ steps:
- name: Setup nightly PHP - name: Setup nightly PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.4' php-version: '8.5'
extensions: mbstring extensions: mbstring
ini-values: post_max_size=256M, max_execution_time=180 ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug coverage: xdebug
@ -584,7 +584,7 @@ steps:
- name: Setup PHP with debugging symbols - name: Setup PHP with debugging symbols
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
env: env:
debug: true # specify true or false debug: true # specify true or false
``` ```
@ -604,7 +604,7 @@ jobs:
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
env: env:
phpts: ts # specify ts or nts phpts: ts # specify ts or nts
``` ```
@ -621,7 +621,7 @@ jobs:
- name: Setup PHP with latest versions - name: Setup PHP with latest versions
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
env: env:
update: true # specify true or false update: true # specify true or false
``` ```
@ -636,14 +636,14 @@ To debug any issues, you can use the `verbose` tag instead of `v2`.
- name: Setup PHP with logs - name: Setup PHP with logs
uses: shivammathur/setup-php@verbose uses: shivammathur/setup-php@verbose
with: with:
php-version: '8.3' php-version: '8.4'
``` ```
### Multi-Arch Setup ### Multi-Arch Setup
> Set up PHP on multiple architecture on Ubuntu GitHub Runners. > Set up PHP on multiple architecture on Ubuntu GitHub Runners.
- `PHP 5.6` to `PHP 8.3` are supported by `setup-php` on multiple architecture on `Ubuntu`. - `PHP 5.6` to `PHP 8.4` are supported by `setup-php` on multiple architecture on `Ubuntu`.
- For this, you can use `shivammathur/node` images as containers. These have compatible `Nodejs` installed for `setup-php`. - For this, you can use `shivammathur/node` images as containers. These have compatible `Nodejs` installed for `setup-php`.
- Currently, for `ARM` based setup, you will need [self-hosted runners](#self-hosted-setup). - Currently, for `ARM` based setup, you will need [self-hosted runners](#self-hosted-setup).
@ -659,7 +659,7 @@ jobs:
- name: Install PHP - name: Install PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
``` ```
### Self Hosted Setup ### Self Hosted Setup
@ -681,7 +681,7 @@ jobs:
runs-on: self-hosted runs-on: self-hosted
strategy: strategy:
matrix: matrix:
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
name: PHP ${{ matrix.php-versions }} name: PHP ${{ matrix.php-versions }}
steps: steps:
- name: Setup PHP - name: Setup PHP
@ -709,7 +709,7 @@ jobs:
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
``` ```
Run the workflow locally with `act` using [`shivammathur/node`](https://github.com/shivammathur/node-docker "Docker image to run setup-php") docker images. Run the workflow locally with `act` using [`shivammathur/node`](https://github.com/shivammathur/node-docker "Docker image to run setup-php") docker images.
@ -745,7 +745,7 @@ For example to enable JIT in `tracing` mode with buffer size of `64 MB`.
- name: Setup PHP with JIT in tracing mode - name: Setup PHP with JIT in tracing mode
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
coverage: none coverage: none
ini-values: opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=64M ini-values: opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=64M
``` ```
@ -798,7 +798,7 @@ The `COMPOSER_TOKEN` environment variable has been deprecated in favor of `GITHU
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
``` ```
@ -811,7 +811,7 @@ If you use Private Packagist for your private composer dependencies, you can set
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
env: env:
PACKAGIST_TOKEN: ${{ secrets.PACKAGIST_TOKEN }} PACKAGIST_TOKEN: ${{ secrets.PACKAGIST_TOKEN }}
``` ```
@ -825,7 +825,7 @@ Please refer to the authentication section in [`composer documentation`](https:/
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
env: env:
COMPOSER_AUTH_JSON: | COMPOSER_AUTH_JSON: |
{ {
@ -848,7 +848,7 @@ Put the code in the run property of a step and specify the shell as `php {0}`.
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
- name: Run PHP code - name: Run PHP code
shell: php {0} shell: php {0}
@ -888,7 +888,7 @@ PHPStan supports error reporting in GitHub Actions, so it does not require probl
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
tools: phpstan tools: phpstan
- name: Run PHPStan - name: Run PHPStan
@ -903,7 +903,7 @@ Psalm supports error reporting in GitHub Actions with an output format `github`.
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
tools: psalm tools: psalm
- name: Run Psalm - name: Run Psalm
@ -921,7 +921,7 @@ For examples refer to the [cs2pr documentation](https://github.com/staabm/annota
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.3' php-version: '8.4'
tools: cs2pr, phpcs tools: cs2pr, phpcs
- name: Run phpcs - name: Run phpcs