Laravel 8.x Shift - #3021
Laravel 8.x Shift#3021
Conversation
Shift automatically applies the Laravel coding style - which uses the PSR-2 coding style as a base with some minor additions. You may customize the adopted coding style by adding a [PHP CS Fixer][1] or [PHP CodeSniffer][2] config to your project root. Feel free to use [Shift's Laravel ruleset][3] to help you get started. For more information on customizing the code style applied by Shift, [watch this short video][4]. [1]: https://github.com/FriendsOfPHP/PHP-CS-Fixer [2]: https://github.com/squizlabs/PHP_CodeSniffer [3]: https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200 [4]: https://laravelshift.com/videos/shift-code-style
Laravel 8 adopts the tuple syntax for controller actions. Since the old options array is incompatible with this syntax, Shift converted them to use modern, fluent methods.
In an effort to make upgrading the constantly changing config files easier, Shift defaulted them and merged your true customizations - where ENV variables may not be used.
From the [PHPUnit 8 release notes][1], the `TestCase` methods below now declare a `void` return type: - `setUpBeforeClass()` - `setUp()` - `assertPreConditions()` - `assertPostConditions()` - `tearDown()` - `tearDownAfterClass()` - `onNotSuccessfulTest()` [1]: https://phpunit.de/announcements/phpunit-8.html
|
Shift recommends changing this to align with Laravel and improve its automation. After doing so, you are welcome to request a rerun of this Shift. |
|
❌ Shift could not upgrade the following files since they differed from the default Laravel version. You will need to compare these files against the default Laravel 8 versions and merge any changes:
|
|
ℹ️ Laravel 8 streamlined the Exception Handler into a single While this change is not required, Shift recommends comparing yours against the Laravel 8.x version as an opportunity to reduce code and be fully up-to-date. |
|
❌ To match the other auth middleware, Laravel 8 now allows multiple guards for the Shift attempted to automate these changes, but detected customizations. You will need to compare your |
|
ℹ️ Laravel 8 introduced class based factories. Shift automated this change. However, if you were using a community package for factories or other custom code, you should review your factories for additional changes. If you encounter an issue, you may revert this commit and temporarily install the laravel/legacy-factories package. You may then automate the conversion to class based factories using the Shift Workbench. |
|
ℹ️ Laravel 8 added a Shift attempted to add this migration, but did not find the original migration for the php artisan make:migration AddUuidToFailedJobsTableThen copy and paste the contents from Shift's |
|
ℹ️ Laravel 8 added new ENV variables for |
|
You should review this commit for additional customizations or opportunities to use new |
|
ℹ️ Shift updated your dependencies for Laravel 8. While many of the popular packages are reviewed, you may have to update additional packages in order for your application to be compatible with Laravel 8. Watch dealing with dependencies for tips on handling package incompatibilities. |
|
Shift attempted to convert assertions where possible, but detected additional uses of
|
|
|
|
ℹ️ Laravel 8 reintroduced the If you wish to modernize your application to use the |
|
\Illuminate\Pagination\Paginator::useBootstrap(); |
|
Shift found uses of
|
|
ℹ️ Laravel 8 supports running your PHPUnit tests in parallel. Depending on your system, this may decrease run times as much as 70%. To run your tests in parallel, you may use the |
|
🎉 Congratulations, you're now running the latest version of Laravel! Next, you may optionally run the following Shifts to ensure your application is fully upgraded, adopts the latest Laravel conventions, and easier to maintain in the future:
You may also use the Shift Workbench to automate common tasks for maintaining your Laravel and PHP applications. |
This pull request includes the changes for upgrading to Laravel 8.x. Feel free to commit any additional changes to the
shift-51221branch.Before merging, you need to:
shift-51221branchcomposer update(if the scripts fail, add--no-scripts)If you need help with your upgrade, check out the Human Shifts. You may also join the Shifty Coders Slack workspace to level-up your Laravel skills.