-
Notifications
You must be signed in to change notification settings - Fork 379
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
allow php 8 #1313
allow php 8 #1313
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for handling this!
To keep the matrix pilosophy I introducted in #1202, I requested some changes.
The major ideas in the matrix is to:
- test each supported php version with latest dependencies.
- test latest supported php version with code coverage enabled.
- test lowest dependencies with oldest and latest supported php versions.
- test each supported Symfony version with it's minimum required PHP.
@@ -21,7 +21,7 @@ matrix: | |||
- php: '7.2' |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
.travis.yml
Outdated
@@ -21,7 +21,7 @@ matrix: | |||
- php: '7.2' | |||
|
|||
# Enable code coverage with the latest supported PHP version | |||
- php: '7.3' | |||
- php: '7.4' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be 8.0. This would match the comment.
.travis.yml
Outdated
@@ -40,20 +40,23 @@ matrix: | |||
- SYMFONY_VERSION=3.4.* | |||
- php: '7.1' | |||
env: | |||
- SYMFONY_VERSION=4.3.* | |||
- SYMFONY_VERSION=4.4.* | |||
|
|||
- php: '7.2.9' | |||
env: | |||
- SYMFONY_VERSION=5.0.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be kept as Symfony 5.0 isn't supported anymore?
.travis.yml
Outdated
|
||
- php: '7.2.9' | ||
env: | ||
- SYMFONY_VERSION=5.0.* | ||
|
||
- php: '7.2.9' | ||
- php: '7.4' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not change as minimum supported version of Symfony 5.1 is 7.2.
.travis.yml
Outdated
env: | ||
- SYMFONY_VERSION=5.1.* | ||
|
||
- php: '8.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be 7.2.9 as Symfony 5.2 requires at least this version.
.travis.yml
Outdated
env: | ||
- COMPOSER_FLAGS="--prefer-lowest" | ||
|
||
# Test each supported Symfony version with lowest supported PHP version | ||
- php: '7.1' | ||
- php: '5.5.9' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one must be kept on 7.1 as it's the minimal PHP version required by this bundle!
The matrix looks good now, but the build is failing. 7.X failures are unrelated with this PR and I started to fix those in #1315. |
#1315 fixed the existing builds, can you please rebase this PR on master? |
No luck for php8, imagemagick does not compile 😞 |
Related: Imagick/imagick#358 |
You can add an A few tests will be skipped as imagick won't be available, but that's acceptable as users won't be able to have such setup (php 8 + imagick). |
Still not working since a dependency can't install. Related issue: php-enqueue/enqueue-dev#1108 |
as enqueue is optional, could we have the php 8 build remove it from composer before installing and have the tests that rely on enqueue skip when enqueue is not available? |
OK, I think we're almost there... |
yeah, phpunit 7 does not work on php 8. afaik phpunit 8 now works on both php 7 and 8, lets try that? phpunit 9 brings a couple of BC breaks that means we would need to adjust assertions and such. we eventually want to do that, but should not mix in too many things into one PR can you try explicitly setting it to the current 8.x version? |
Unfortunately, even phpunit 8.5 is failing (due to missing return type on |
this has been fixed in symfony 3.4.23 |
.travis.yml
Outdated
yes | pecl install imagick; | ||
fi | ||
- if [[ "$ENQUEUE_ENABLED" == "false" ]]; then | ||
composer remove --dev enqueue/enqueue-bundle; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add the --no-update
option as the update
is performed at install
step.
Any idea of the reasons of last failures? 😞 Why images are not found? |
Could you rebase please? I will look at those failure localy. |
- XDEBUG_MODE=coverage | ||
- PHPUNIT_FLAGS="-v --coverage-text --coverage-clover var/build/clover.xml" | ||
|
||
# Minimum supported dependencies with the latest and oldest supported PHP versions | ||
- php: '7.1' | ||
env: | ||
- COMPOSER_FLAGS="--prefer-lowest" | ||
- php: '7.3' | ||
- php: '8.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the last failing job. I think we should stick with php 7.4 here as having php 8.0 with --prefer-lowest would work only if any dependencies doesn't declare supporting php with the >=
operator without being compatible with php 8.0.
Note: Symfony does the same (see https://github.com/symfony/symfony/blob/5.x/.travis.yml#L23-L30)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, i agree. we could also drop the "latest php version prefer-lowest" completely. the main thing we care about is "lowest php version with prefer-lowest".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The highest supported PHP version with lowest dependencies tests the case where, in a project, an unrelated dependency lock one of our dependency to a lower version than expected.
I took the idea from Symfony IIRC but maybe this is already covered with other jobs. I’m neutral about keep/remove this job from the matrix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is always a chance of some combinations of versions having a problem. but builds are fast and parallel, so lets change this to 7.4 for now.
closing in favor of #1325 |
Allow PHP 8