Behat / Gherkin

Gherkin parser, written in PHP for Behat project
MIT License
1.05k stars 89 forks source link

Require at least phpunit 5.7 #184

Closed phil-davis closed 3 years ago

phil-davis commented 3 years ago

Because the unit test code uses PHPUnit\Framework\TestCase which only became available from phpunit 5.7 onwards.

~And allow CI to use the newer phpunit 8 or 9 if it wants.~

~And do not test with PHP 8.0 yet. See test done in PR #185 - we are not quite ready for PHP 8.0 yet.~ That has already been done now.

phil-davis commented 3 years ago

Hmmm - the repo currently has a GitHub action that runs the unit tests with PHP 8.0. But composer.json does not mention a high-enough phpunit for that.

How did that get into master ?

I will push a fix.

phil-davis commented 3 years ago

Hmmm again. We cannot use phpunit8 or phpunit9 because those require the test code to have setUp(): void declaration of the setup() return type.

But it looks like return type void is only available since PHP 7.1.

@ciaranmcnulty do we need to have the PHP 8.0 support at the same time as PHP 5.6 ?

ciaranmcnulty commented 3 years ago

I don’t think we do. Let’s take it out

phil-davis commented 3 years ago

@ciaranmcnulty ready for review. This gets green CI for the existing supported PHP 5.6 through 7.4

ciaranmcnulty commented 3 years ago

Can you please rebase from master, I had to rejig the CI config

phil-davis commented 3 years ago

Can you please rebase from master, I had to rejig the CI config

@ciaranmcnulty done