Skip to content

Commit

Permalink
Merge pull request #673 from jrfnl/feature/readme-update-php-list
Browse files Browse the repository at this point in the history
README: update for release of PHP 8.2
  • Loading branch information
shivammathur committed Dec 8, 2022
2 parents 51f83e0 + b359d92 commit f7d3c00
Showing 1 changed file with 41 additions and 40 deletions.
81 changes: 41 additions & 40 deletions README.md
Expand Up @@ -118,13 +118,14 @@ On all supported OS/Platforms the following PHP versions are supported as per th
| `7.1` | `Stable` | `End of life` | `GitHub-hosted`, `self-hosted` |
| `7.2` | `Stable` | `End of life` | `GitHub-hosted`, `self-hosted` |
| `7.3` | `Stable` | `End of life` | `GitHub-hosted`, `self-hosted` |
| `7.4` | `Stable` | `Security fixes only` | `GitHub-hosted`, `self-hosted` |
| `8.0` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` |
| `7.4` | `Stable` | `End of life` | `GitHub-hosted`, `self-hosted` |
| `8.0` | `Stable` | `Security fixes only` | `GitHub-hosted`, `self-hosted` |
| `8.1` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` |
| `8.2` | `Nightly` | `In development` | `GitHub-hosted`, `self-hosted` |
| `8.2` | `Stable` | `Active` | `GitHub-hosted`, `self-hosted` |
| `8.3` | `Nightly` | `In development` | `GitHub-hosted`, `self-hosted` |

**Notes:**
- Specifying `8.2` in `php-version` input installs a nightly build of `PHP 8.2.0-dev`. See [nightly build setup](#nightly-build-setup) for more information.
- Specifying `8.3` in `php-version` input installs a nightly build of `PHP 8.3.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.

## :heavy_plus_sign: PHP Extension Support
Expand All @@ -137,7 +138,7 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
extensions: imagick, swoole
```

Expand Down Expand Up @@ -165,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
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
extensions: xdebug-beta
```

Expand All @@ -177,7 +178,7 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
- name: Setup PHP and disable opcache
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
extensions: :opcache
```

Expand All @@ -189,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
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
extensions: none, mbstring
```

Expand All @@ -199,7 +200,7 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
- name: Setup PHP with intl
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
extensions: intl-70.1
```

Expand All @@ -216,7 +217,7 @@ PHP extensions can be set up using the `extensions` input. It accepts a `string`
- name: Setup PHP with fail-fast
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
extensions: oci8
env:
fail-fast: true
Expand All @@ -232,7 +233,7 @@ These tools can be set up globally using the `tools` input. It accepts a string
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
tools: php-cs-fixer, phpunit
```

Expand All @@ -242,7 +243,7 @@ These tools can be set up globally using the `tools` input. It accepts a string
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
tools: vimeo/psalm
```

Expand All @@ -262,7 +263,7 @@ These tools can be set up globally using the `tools` input. It accepts a string
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
tools: php-cs-fixer:3.5, phpunit:9.5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -274,7 +275,7 @@ These tools can be set up globally using the `tools` input. It accepts a string
- name: Setup PHP with composer v2
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
tools: composer:v2
```

Expand All @@ -284,7 +285,7 @@ These tools can be set up globally using the `tools` input. It accepts a string
- name: Setup PHP without composer
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
tools: none
```

Expand All @@ -300,7 +301,7 @@ These tools can be set up globally using the `tools` input. It accepts a string
- name: Setup PHP with fail-fast
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
tools: deployer
env:
fail-fast: true
Expand All @@ -323,7 +324,7 @@ Runs on all [PHP versions supported](#tada-php-support "List of PHP versions sup
- name: Setup PHP with Xdebug
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
coverage: xdebug
```

Expand Down Expand Up @@ -351,7 +352,7 @@ Runs on PHP 7.1 and newer PHP versions.
- name: Setup PHP with PCOV
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
ini-values: pcov.directory=api #optional, see above for usage.
coverage: pcov
```
Expand Down Expand Up @@ -381,7 +382,7 @@ Disable coverage for these reasons:
- name: Setup PHP with no coverage driver
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
coverage: none
```

Expand Down Expand Up @@ -445,7 +446,7 @@ On GitHub Actions you can assign the `setup-php` step an `id`, you can use the s
id: setup-php
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'

- name: Print PHP version
run: echo ${{ steps.setup-php.outputs.php-version }}
Expand Down Expand Up @@ -487,7 +488,7 @@ steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
extensions: mbstring, intl
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
Expand All @@ -505,7 +506,7 @@ jobs:
strategy:
matrix:
operating-system: ['ubuntu-latest', 'windows-latest', 'macos-latest']
php-versions: ['7.4', '8.0', '8.1']
php-versions: ['8.0', '8.1', '8.2']
phpunit-versions: ['latest']
include:
- operating-system: 'ubuntu-latest'
Expand All @@ -524,7 +525,7 @@ jobs:

### Nightly Build Setup

> Set up a nightly build of `PHP 8.2`.
> Set up a nightly build of `PHP 8.3`.
- This PHP version is currently in active development and might contain bugs and breaking changes.
- Some user space extensions might not support this version currently.
Expand All @@ -534,7 +535,7 @@ steps:
- name: Setup nightly PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.3'
extensions: mbstring
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
Expand All @@ -553,7 +554,7 @@ steps:
- name: Setup PHP with debugging symbols
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
env:
debug: true # specify true or false
```
Expand All @@ -575,7 +576,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
env:
phpts: ts # specify ts or nts
```
Expand All @@ -592,7 +593,7 @@ jobs:
- name: Setup PHP with latest versions
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
env:
update: true # specify true or false
```
Expand All @@ -607,14 +608,14 @@ To debug any issues, you can use the `verbose` tag instead of `v2`.
- name: Setup PHP with logs
uses: shivammathur/setup-php@verbose
with:
php-version: '8.1'
php-version: '8.2'
```

### Multi-Arch Setup

> Set up PHP on multiple architecture on Ubuntu GitHub Runners.
- `PHP 5.6` to `PHP 8.1` are supported by `setup-php` on multiple architecture on `Ubuntu`.
- `PHP 5.6` to `PHP 8.2` 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`.
- Currently, for `ARM` based setup, you will need [self-hosted runners](#self-hosted-setup).

Expand All @@ -630,7 +631,7 @@ jobs:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
```

### Self Hosted Setup
Expand All @@ -652,7 +653,7 @@ jobs:
runs-on: self-hosted
strategy:
matrix:
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
name: PHP ${{ matrix.php-versions }}
steps:
- name: Setup PHP
Expand Down Expand Up @@ -680,7 +681,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
```

Run the workflow locally with `act` using [`shivammathur/node`](https://github.com/shivammathur/node-docker "Docker image to run setup-php") docker images.
Expand Down Expand Up @@ -716,7 +717,7 @@ For example to enable JIT in `tracing` mode with buffer size of `64 MB`.
- name: Setup PHP with JIT in tracing mode
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
coverage: none
ini-values: opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=64M
```
Expand Down Expand Up @@ -769,7 +770,7 @@ The `COMPOSER_TOKEN` environment variable has been deprecated in favor of `GITHU
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -782,7 +783,7 @@ If you use Private Packagist for your private composer dependencies, you can set
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
env:
PACKAGIST_TOKEN: ${{ secrets.PACKAGIST_TOKEN }}
```
Expand All @@ -796,7 +797,7 @@ Please refer to the authentication section in [`composer documentation`](https:/
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
env:
COMPOSER_AUTH_JSON: |
{
Expand All @@ -819,7 +820,7 @@ Put the code in the run property of a step and specify the shell as `php {0}`.
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'

- name: Run PHP code
shell: php {0}
Expand Down Expand Up @@ -859,7 +860,7 @@ PHPStan supports error reporting in GitHub Actions, so it does not require probl
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
tools: phpstan

- name: Run PHPStan
Expand All @@ -874,7 +875,7 @@ Psalm supports error reporting in GitHub Actions with an output format `github`.
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
tools: psalm

- name: Run Psalm
Expand All @@ -892,7 +893,7 @@ For examples refer to [cs2pr documentation](https://github.com/staabm/annotate-p
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
tools: cs2pr, phpcs

- name: Run phpcs
Expand Down

0 comments on commit f7d3c00

Please sign in to comment.