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

PHPUnit 10 Shift #4

Merged
merged 5 commits into from
Feb 25, 2025
Merged

PHPUnit 10 Shift #4

merged 5 commits into from
Feb 25, 2025

Conversation

JaZo
Copy link
Member

@JaZo JaZo commented Feb 25, 2025

This pull request contains changes for upgrading to PHPUnit 10 automated by the PHPUnit 10 Shift.

Before merging, you need to:

  • Checkout the shift-141425 branch
  • Review all pull request comments for additional changes
  • Run composer update (if the scripts fail, try with --no-scripts)
  • Run your tests suite: vendor/bin/phpunit

If there were changes you felt could have been automated, please reply to the follow-up email with your feedback or on Twitter.

@JaZo
Copy link
Member Author

JaZo commented Feb 25, 2025

⚠️ PHPUnit 10 requires PHP version 8.1 or higher. Be sure to verify you met this requirement by running php -v in your test environment.

@JaZo
Copy link
Member Author

JaZo commented Feb 25, 2025

⚠️ PHPUnit 10 has made several changes to the configuration file. After running composer update, you may run vendor/bin/phpunit --migrate-configuration to have PHPUnit upgrade your configuration file.

@JaZo
Copy link
Member Author

JaZo commented Feb 25, 2025

ℹ️ PHPUnit has documented declaring test classes as final since PHPUnit 8. In an effort to modernize your test suite, Shift has declared your test classes as final.

Shift understands developers have different preferences when it comes to using final. If you do not wish to declare your test classes as final, you may undo this change by running: git revert e449efce

@JaZo
Copy link
Member Author

JaZo commented Feb 25, 2025

⚠️ PHPUnit 10 now requires any base test class to have a TestCase suffix. In addition, this class should be defined as abstract. If you have a custom base test class, you should ensure it meets these new requirements.

@JaZo
Copy link
Member Author

JaZo commented Feb 25, 2025

⚗️ This Shift is still being refined. Please report any issues or suggestions to shift@laravelshift.com. Your feedback is what helps improve the experience for everyone.

@JaZo JaZo merged commit d2ac8bb into master Feb 25, 2025
30 of 31 checks passed
@JaZo JaZo deleted the shift-141425 branch February 25, 2025 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants