laravel-shift / blueprint

A code generation tool for Laravel developers.
MIT License
2.89k stars 273 forks source link

PHPUnit 10 Shift #607

Closed jasonmccreary closed 1 year ago

jasonmccreary commented 1 year ago

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

Before merging, you need to:

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

jasonmccreary commented 1 year ago

:warning: 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.

jasonmccreary commented 1 year ago

:x: PHPUnit 10 has removed the --verbose option. Shift detected potential uses of this option in the following files. You should review these files and remove the --verbose option when calling phpunit.

jasonmccreary commented 1 year ago

:information_source: 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 ed0c5ec0.

jasonmccreary commented 1 year ago

:information_source: 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 55e0323b.

jasonmccreary commented 1 year ago

:alembic: 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.

jasonmccreary commented 1 year ago

:x: PHP syntax errors were detected after running your Shift. Often these are simply differences between the PHP version on the Shift server (8.1) and your project. Occasionally they are misplaced lines or duplicate import statements.

You may quickly check the PHP syntax locally by running php -l on the following files: