Closed phil-davis closed 4 years ago
With composer.json saying that we support PHP 5.3+, not having these versions on CI is actually an issue.
With composer.json saying that we support PHP 5.3+, not having these versions on CI is actually an issue.
@stof What do you want to do about that? Stop official support for those ancient PHP versions, or add back CI for PHP 5.3 5.4 5.5?
Well, given that the next behat/behat release will require PHP 7.2+, I think it might be fine to change things in this repo too (and then this PR is fine).
@stof or anyone ping for review
Or maybe we move straight to dropping all the old PHP support and just support PHP 7.2+ to match what is happening anyway in Behat/Behat. If you want to do that, then let me know and I will make a PR and close this. That will actually be easy because there will be no need to think hard about which methods exist or not in which old phpunit major versions.
Needs a decision about issue #176 - Drop older PHP versions. If that goes ahead now, then we can do a different PR with more changes and no need to worry about what PHPUnit stuff works in ancient versions.
Rebased just now to get CI with master commits that were merged yesterday. This PR is waiting on a decision about PHP version support.
@stof it's up to you to decide if this is merged now, or wait for the PHP 7.2 decision and then directly do #178 or whatever.
When I check out master
and run the tests, I get the error:
Fatal error: Uncaught Error: Class 'PHPUnit\Framework\TestCase' not found
It seems related to this PR? Any ideas what's going on?
PHP7.4.13 and it's PHPUnit 5.2.7 that's installed
In PHPUnit 5 the class is called PHPUnit_Framework_TestCase
The unit test code no longer supports that ancient PHPUnit version. (or maybe it is PHPUnit4 that does not know about the "new" class)
https://github.com/sebastianbergmann/phpunit/releases/tag/5.7.26
5.7 is the latest PHPUnit5 - maybe the new class was added somewhere between 5.2 and 5.7
it was added in 4.8.35 and 5.7
Perhaps we need a —prefers-lowest
build
In #178 we drop support for old PHP versions, and so phpunit5 will not be relevant any more anyway.
Yeah but I’d like a stable release before that
@ciaranmcnulty PR #184 should be enough. That will ensure that people trying to run the unit tests with an old PHP will at least get phpunit 5.7 installed, not lower.
So that the unit test code is more up-to-date in preparation for phpunit6.
Note: On PHP 5.6 the Travis CI runs with PHPUnit 5.7.27 - so actually there is no CI any more that run with PHPUnit 4.5 (which is mentioned in
composer.json
. But I guess we leave that incomposer.json
because somebody might try to locally run the unit tests with some more ancient version of PHP.Note 2: removed PHPUnit 4 and PHP 5.3 5.4 5.5 support.