You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then, GitHub started to use Ubuntu 22.04 and the default PHP version is 8.0. When you run your tests (using PHPUnit v5) they try to use a function that has been removed from PHP (the each()). And by this, the tests are broken.
How to fix it
There are several ways, let me suggest the one that I believe is the best.
Create a branch of the current code (eg. 1.x)
This branch will use PHP up to 7.x to run tests (I recommend to setup a new GHA for this branch)
The master branch will use the current GHA version
You need to refactor de test to be compliant with PHPUnit 9.x. It's really easy and I can submit a PR 😄
The branch and tag v1.x will be used for Laravel versions up to 8.
The master branch and maybe tag v2.x can be used for Laravel versions 9 and 10, which use PHP 8.x
What do you think?
The text was updated successfully, but these errors were encountered:
Hi @guilhermegonzaga
I've been taking a look to the broken test and I would like to suggest you how to fix it.
The GitHub action running your tests is configured to use the Ubuntu latest image and the default PHP version there.
Before Ubuntu 22.04, the default PHP version was 7.x and your tests were passing.
Then, GitHub started to use Ubuntu 22.04 and the default PHP version is 8.0. When you run your tests (using PHPUnit v5) they try to use a function that has been removed from PHP (the
each()
). And by this, the tests are broken.How to fix it
There are several ways, let me suggest the one that I believe is the best.
master
branch will use the current GHA versionThe branch and tag v1.x will be used for Laravel versions up to 8.
The master branch and maybe tag v2.x can be used for Laravel versions 9 and 10, which use PHP 8.x
What do you think?
The text was updated successfully, but these errors were encountered: