Skip to content
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

Travis: require PHPUnit 9.3 for PHP 8 #175

Merged
merged 1 commit into from
Jul 21, 2020
Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Jul 21, 2020

PHPUnit 9.3 is not yet released (expected end of August), but is slated to add official PHP 8 support to PHPUnit.

As some tests are failing due to the new reserved keyword match being used in PHPUnit, I'm (temporarily) upping the PHPUnit requirement for PHP 8 explicitly to PHPUnit 9.3 (dev).

Once PHPUnit 9.3 has been released, this condition can be removed in favour of changing the requirements in the composer.json file.

Note: for now the --ignore-platform-reqs is still needed as the underlying dependencies may still not have tagged a version which officially supports PHP 8 and this would cause a requirement conflict.

Ref: sebastianbergmann/phpunit#4373


Note: I've investigated the other unit test failures on PHP 8 and have confirmed that all of them will be fixed once PR squizlabs/PHP_CodeSniffer#3027 has been merged.

I don't think any special accommodation is needed in PHPCSUtils for this for when people run an older PHPCS version on PHP 8, as from the looks of it, the functions work just fine, it's just that the exact expected token pointers and such will be different than the expectations set in the unit tests. They are correct though.

The only time when the output is significantly different is for getTokensAsString() and its variants, but that is to be expected.

@jrfnl jrfnl added this to the 1.0.0-alpha4 milestone Jul 21, 2020
PHPUnit 9.3 is not yet released (expected end of August), but is slated to add official PHP 8 support to PHPUnit.

As some tests are failing due to the new reserved keyword `match` being used in PHPUnit, I'm (temporarily) upping the PHPUnit requirement for PHP 8 explicitly to PHPUnit 9.3 (dev).

Once PHPUnit 9.3 has been released, this condition can be removed in favour of changing the requirements in the `composer.json` file.

Note: for now the `--ignore-platform-reqs` is still needed as the underlying dependencies may still not have tagged a version which officially supports PHP 8 and this would cause a requirement conflict.

Ref: sebastianbergmann/phpunit#4373
@jrfnl jrfnl merged commit fc49241 into develop Jul 21, 2020
@jrfnl jrfnl deleted the feature/fix-compat-php-8 branch July 21, 2020 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant