Skip to content

Commit

Permalink
Run tests on PHP 8.4 (#136)
Browse files Browse the repository at this point in the history
* Run tests on PHP 8.4

* Use the latest composer in tests

Packagist ends support for Composer 1.x soon anyway
https://blog.packagist.com/shutting-down-packagist-org-support-for-composer-1-x/

* Don't use matrix to specify `runs-on: ubuntu-latest`

* Test with --prefer-lowest also in PHP 8.1

Newer PHP versions require newer dependencies, tests would fail.
  • Loading branch information
spaze authored Jan 18, 2025
1 parent 6d3e42d commit 1507f39
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:
env:
extensions: "json, pdo_mysql, pdo_sqlite, intl"
cache-version: "1"
composer-version: "v1"
composer-install: "composer update --no-interaction --no-progress --no-suggest --prefer-dist --prefer-stable"

jobs:
Expand Down Expand Up @@ -45,7 +44,7 @@ jobs:
with:
php-version: "8.0"
extensions: "${{ env.extensions }}"
tools: "composer:${{ env.composer-version }}"
tools: "composer"

- name: "Setup problem matchers for PHP"
run: 'echo "::add-matcher::${{ runner.tool_cache }}/php.json"'
Expand Down Expand Up @@ -107,7 +106,7 @@ jobs:
with:
php-version: "8.1"
extensions: "${{ env.extensions }}"
tools: "composer:${{ env.composer-version }}"
tools: "composer"

- name: "Setup problem matchers for PHP"
run: 'echo "::add-matcher::${{ runner.tool_cache }}/php.json"'
Expand All @@ -131,7 +130,7 @@ jobs:

tests:
name: "Tests"
runs-on: "${{ matrix.operating-system }}"
runs-on: "ubuntu-latest"
services:
mariadb:
image: "mariadb:10.4"
Expand All @@ -149,12 +148,12 @@ jobs:

strategy:
matrix:
php-version: [ "8.0", "8.1", "8.2", "8.3" ]
operating-system: [ "ubuntu-latest" ]
php-version: [ "8.0", "8.1", "8.2", "8.3", "8.4" ]
composer-args: [ "" ]
include:
- php-version: "8.0"
operating-system: "ubuntu-latest"
composer-args: "--prefer-lowest"
- php-version: "8.1"
composer-args: "--prefer-lowest"
fail-fast: false

Expand Down Expand Up @@ -182,7 +181,7 @@ jobs:
with:
php-version: "${{ matrix.php-version }}"
extensions: "${{ env.extensions }}"
tools: "composer:${{ env.composer-version }}"
tools: "composer"

- name: "Setup problem matchers for PHP"
run: 'echo "::add-matcher::${{ runner.tool_cache }}/php.json"'
Expand Down Expand Up @@ -250,7 +249,7 @@ jobs:
php-version: "8.0"
coverage: "xdebug"
extensions: "${{ env.extensions }}"
tools: "composer:${{ env.composer-version }}"
tools: "composer"

- name: "Setup problem matchers for PHP"
run: 'echo "::add-matcher::${{ runner.tool_cache }}/php.json"'
Expand Down

0 comments on commit 1507f39

Please sign in to comment.