Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run CI on PHP 8.3 and 8.4 #176

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -25,6 +25,10 @@ jobs:
tools: composer:v2
coverage: none

- name: Emulate PHP 8.3
run: composer config platform.php 8.3.999
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this? do we have dependencies that limit to php 8.3 and don't install with 8.4?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

phpspec disallows PHP 8.4

if: matrix.php == '8.4'

- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-progress

Expand All @@ -36,11 +40,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.1', '7.4', '8.0', '8.1', '8.2']
php: ['7.1', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -49,6 +53,10 @@ jobs:
tools: composer:v2
coverage: none

- name: Emulate PHP 8.3
run: composer config platform.php 8.3.999
if: matrix.php == '8.4'

- name: Install dependencies
run: |
composer require "sebastian/comparator:^3.0.2" --no-interaction --no-update
Expand All @@ -63,12 +71,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: '7.4'
tools: composer:v2
coverage: xdebug

Expand Down
1 change: 1 addition & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'trailing_comma_in_multiline' => false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would prefer to fix this rather than diverge from the symfony ruleset.

but as you mentioned in php-http/client-common#247 it would make sense to pin the cs fixer to a specific version to avoid random unrelated cs failures in merge requests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to do this because the syntax is not compatible with PHP 7.

])
->setFinder($finder)
;
Expand Down
Loading