Skip to content

Commit

Permalink
feat!: add support for PHP 8.2 and change defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
hussainweb committed Mar 20, 2023
1 parent 7334e1f commit 9ef0d00
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ This action runs checks from [DrupalQA](https://github.com/hussainweb/drupalqa)

### `php-version`

The PHP version to use (corresponds to the Docker image). Allowed options are and their corresponding Docker images are as follows. Default: `7.4`.
The PHP version to use (corresponds to the Docker image). Allowed options are and their corresponding Docker images are as follows. Default: `8.1`.

| php-version | Docker image |
| ----------- | ------------ |
| 7.3 | hussainweb/drupalqa:php7.3 (_not supported_) |
| 7.4 | hussainweb/drupalqa:php7.4 |
| 7.4 | hussainweb/drupalqa:php7.4 (_not supported_) |
| 8.0 | hussainweb/drupalqa:php8.0 |
| 8.1 | hussainweb/drupalqa:php8.1 |
| 8.2 | hussainweb/drupalqa:php8.1 |
| latest | hussainweb/drupalqa:latest |

Note: The actual Docker image used also depends on the `registry` option. If that option is set to `'ghcr'` (default value), then the Docker image is prefixed with `ghcr.io/`. For example, `ghcr.io/hussainweb/drupalqa:php8.0`.
Note: The actual Docker image used also depends on the `registry` option. If that option is set to `'ghcr'` (default value), then the Docker image is prefixed with `ghcr.io/`. For example, `ghcr.io/hussainweb/drupalqa:php8.2`.

### `web-root`

Expand Down Expand Up @@ -47,7 +48,7 @@ No outputs.
```yaml
uses: hussainweb/drupalqa@v1
with:
php-version: 7.4
php-version: 8.2
checks: |
phplint: {}
phpcs:
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
php-version: # id of input
description: 'PHP version.'
required: false
default: '7.4'
default: '8.1'
web-root:
description: 'Web root (document root). This is set to web by default. Do not include trailing slash.'
required: false
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const availableChecks = {

async function main() {
const phpVersion = core.getInput("php-version");
if (!["7.3", "7.4", "8.0", "8.1", "latest"].includes(phpVersion)) {
if (!["7.3", "7.4", "8.0", "8.1", "8.2", "latest"].includes(phpVersion)) {
throw new Error("Invalid PHP version.");
}

Expand Down

0 comments on commit 9ef0d00

Please sign in to comment.