Skip to content

PHPUnit 10 Shift#579

Merged
alexjustesen merged 3 commits intoshift-90284from
shift-90290
May 7, 2023
Merged

PHPUnit 10 Shift#579
alexjustesen merged 3 commits intoshift-90284from
shift-90290

Conversation

@alexjustesen
Copy link
Copy Markdown
Owner

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

Before merging, you need to:

  • Checkout the shift-90290 branch
  • Review all pull request comments for additional changes
  • Run composer update (if the scripts fail, add --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.

@alexjustesen
Copy link
Copy Markdown
Owner Author

⚠️ 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.

@alexjustesen
Copy link
Copy Markdown
Owner Author

ℹ️ PHPUnit has documented using return types for test cases and data providers since PHPUnit 8. In an effort to modernize your test suite, Shift added a return type of void to your test cases and a return type of array to your data providers.

Shift understands developers have different preferences when it comes to type hints. If you do not wish to add return types, you may undo this change by running git revert 8b2ed690.

@alexjustesen
Copy link
Copy Markdown
Owner Author

ℹ️ 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 347248de.

@alexjustesen
Copy link
Copy Markdown
Owner Author

⚠️ 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.

@alexjustesen
Copy link
Copy Markdown
Owner Author

⚗️ 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.

@alexjustesen alexjustesen changed the base branch from main to shift-90284 May 7, 2023 16:08
@alexjustesen alexjustesen merged commit df2d05b into shift-90284 May 7, 2023
@alexjustesen alexjustesen deleted the shift-90290 branch May 7, 2023 16:09
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