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
Support PHP 8 #102
Support PHP 8 #102
Conversation
composer.json
Outdated
"psr/log": "~1.0", | ||
"react/event-loop": "^1.0 || ^0.5 || ^0.4", | ||
"react/promise": "~2.2" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "~6.5" | ||
"phpunit/phpunit": "^6.5 || ^7.5 || ^8.5 || ^9.3" |
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.
"phpunit/phpunit": "^6.5 || ^7.5 || ^8.5 || ^9.3" | |
"phpunit/phpunit": "^8.5 || ^9.3" |
@edudobay I think only these two make sense for "php": "^7.1 || ^8.0",
: https://phpunit.de/supported-versions.html (or in other words, if this is to support PHP 8)
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.
@standa If PHP 7.1 is still to be supported, I think we need PHPUnit 7 too; Composer won't let us install PHPUnit 8 with PHP 7.1.
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.
I've dropped PHPUnit 6 and pushed a new commit to fix PHP 8 build. What do you think @standa?
Trying to fix these SSL issues here! It's hard to know what exactly went wrong, so I'm working on making local SSL testing easier as well — I had a hard time getting the SSL tests to run locally. |
@edudobay I tested this PR on our production code with php 8.0 today and it works like a charm! |
Nice to hear that, @standa! I just have to solve this SSL issue in the CI builds — I'll try to reproduce the CI environment on the next few days to see how I can fix this. |
d977abd
to
afcaed2
Compare
- Fix method signatures — required parameters after optional arguments are deprecated in PHP 8. - Upgrade PHPUnit, adding void return type to setUp methods; this makes the syntax incompatible with PHP 7.0. - Drop PHP 7.0 and PHPUnit 6 support - PHPUnit 6 support ended on 2019-02-01 and PHP 7.0 end-of-life was almost at the same time. It becomes harder to support PHP 7.0 syntax at the same time as PHP 8.0. - rabbitmq-server package is now needed for Travis CI, starting with Ubuntu Xenial. PHP 8.0 is not available for Ubuntu Trusty in Travis CI. https://docs.travis-ci.com/user/database-setup/#rabbitmq - Fix RabbitMQ config files and permissions for SSL tests in CI (behavior seems to have changed across Ubuntu versions).
@WyriHaximus Yes, now this is ready :) And in fact there's a breaking change, so it also seems to me that it would be better suited for the 0.5.0 release. |
Ok just release |
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.
👏 👏 👏 👏 Well done! And thank you for putting the time into this 👍
Fixes the issues raised in #101.
There's one issue about dropping PHP 7.0 support:
void
return type to PHPUnitsetUp
methods: this makes the syntax incompatible with PHP 7.0