Skip to content

Fix PHPUnit versions in composer.json#460

Merged
merkys7 merged 1 commit intotrunkfrom
fix/351-phpunit-versions
Aug 4, 2022
Merged

Fix PHPUnit versions in composer.json#460
merkys7 merged 1 commit intotrunkfrom
fix/351-phpunit-versions

Conversation

@merkys7
Copy link
Copy Markdown
Member

@merkys7 merkys7 commented Jul 31, 2022

Summary

Fixes #351

Looks like you're using PHPUnit 8.5.21. WordPress requires at least PHPUnit 5.7.21 and is currently only compatible with PHPUnit up to 7.x.

Relevant technical choices

Mentioned PHPUnit error appears when using 8.1 PHP version and PHPUnit 8.5.21 version.
PHPUnit versions are chosen based on the following table: https://make.wordpress.org/core/handbook/references/phpunit-compatibility-and-wordpress-versions/
Different PHP versions require different PHPUnit versions.
The following approach is taken from WordPress/WordPres - sodium_compat
https://github.com/WordPress/WordPress/blob/f2138f29a83594c60122e6c5416c7a8a4717c519/wp-includes/sodium_compat/composer.json#L57

Checklist

  • PR has either [Focus] or Infrastructure label.
  • PR has a [Type] label.
  • PR has a milestone or the no milestone label.

@merkys7 merkys7 added [Type] Enhancement A suggestion for improvement of an existing feature Infrastructure Issues for the overall performance plugin infrastructure no milestone PRs that do not have a defined milestone for release labels Jul 31, 2022
@merkys7 merkys7 requested a review from felixarntz July 31, 2022 16:35
@merkys7 merkys7 force-pushed the fix/351-phpunit-versions branch from 7de1e02 to 7bf8a0e Compare August 1, 2022 20:13
@merkys7 merkys7 requested a review from mukeshpanchal27 August 1, 2022 20:15
@mukeshpanchal27
Copy link
Copy Markdown
Member

Thanks for the update. I have some issues with my composer setup. I will check it once it works. @bvdr Can you please review the PR and share your thoughts?

Copy link
Copy Markdown
Member

@adamsilverstein adamsilverstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, fixed issue in my local testing

Copy link
Copy Markdown
Contributor

@bvdr bvdr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thank you!

@merkys7 merkys7 merged commit 945ab64 into trunk Aug 4, 2022
@merkys7 merkys7 deleted the fix/351-phpunit-versions branch August 4, 2022 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Infrastructure Issues for the overall performance plugin infrastructure no milestone PRs that do not have a defined milestone for release [Type] Enhancement A suggestion for improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PHPUnit version in composer is too new

4 participants