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

Add PHP 8.4 to test matrix #796

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ jobs:
- name: Set up locales
run: ./hack/setup-locales.sh

- name: Download dependencies
run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress --no-suggest --prefer-lowest --classmap-authoritative
- uses: "ramsey/composer-install@v3"
with:
dependency-versions: "lowest"

- name: Run tests
run: composer test
Expand All @@ -40,6 +41,7 @@ jobs:
- '8.1'
- '8.2'
- '8.3'
- '8.4'

steps:
- name: Set up PHP
Expand All @@ -58,8 +60,10 @@ jobs:
- name: Set up locales
run: ./hack/setup-locales.sh

- name: Download dependencies
run: composer install --classmap-authoritative
- uses: "ramsey/composer-install@v3"
with:
# We need to ignore PHP because Psalm blocks installing it
Copy link
Member

Choose a reason for hiding this comment

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

I cannot merge with this being part of the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So what do you suggest?

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 can remove psalm + the plugin before running tests on PHP 8.4. There is no point for the dependency in that job anyway.

Copy link
Member

Choose a reason for hiding this comment

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

I suggest we wait until they resolve the issue. I subscribe for that PR. Once support is there, we can move forward here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But this is not a blocker for PHP 8.4. Psalm is only executed on a separate job that runs with PHP 8.1:

php-version: '8.1'

Copy link
Member

Choose a reason for hiding this comment

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

First, it's not a bad idea to change that into the latest stable version (8.3). Secondly, since Psalm uses the strategy as this package, we cannot install dependencies, which means we have to wait for them to solve the issue. I don't see a problem here. We are not even in the RC phase of PHP8.4. We wait.

composer-options: "--ignore-platform-req=php"

- name: Run tests
run: composer test
Expand All @@ -78,8 +82,7 @@ jobs:
php-version: '8.1'
extensions: bcmath, gmp, intl, dom, mbstring

- name: Download dependencies
run: composer install --classmap-authoritative
- uses: "ramsey/composer-install@v3"

- name: Psalm
run: vendor/bin/psalm
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
],
"homepage": "http://moneyphp.org",
"require": {
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"php": "^8.1",
Copy link
Member

Choose a reason for hiding this comment

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

Please keep the strategy we used before, explicit support of versions. Just add || ~8.4.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But then I have to do this every year. It's so annoying, like I stated in the OP. This is one of the few packages that does this. Why.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I don't think it's annoying. Especially with people looking for early support of newer PHP versions, like yourself, I find it useful that I know for sure that this package is delivering full-support for it. Moreover, it creates a moment where we can reconsider previous decisions. Maybe it's overly conservative, I am fine with that.

"ext-bcmath": "*",
"ext-filter": "*",
"ext-json": "*"
Expand Down