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

Laravel 8.x Shift #71

Merged
merged 12 commits into from
Jun 24, 2021
Merged

Laravel 8.x Shift #71

merged 12 commits into from
Jun 24, 2021

Conversation

gallib
Copy link
Owner

@gallib gallib commented Dec 19, 2020

This pull request includes the changes for upgrading to Laravel 8.x. Feel free to commit any additional changes to the shift-38043 branch.

Before merging, you need to:

  • Checkout the shift-38043 branch
  • Review all pull request comments for additional changes
  • Update your dependencies for Laravel 8
  • Run composer update (if the scripts fail, add --no-scripts)
  • Thoroughly test your application (no tests?)

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.

@gallib
Copy link
Owner Author

gallib commented Dec 19, 2020

❌ 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:

  • public/index.php

@gallib
Copy link
Owner Author

gallib commented Dec 19, 2020

ℹ️ The RouteServiceProvider no longer prefixes the controller namespace by default in Laravel 8. While you may still set this property, you are encouraged to register your routes using static ::class references.

You may automate the conversion to static class references using the Shift Workbench.

@gallib
Copy link
Owner Author

gallib commented Dec 19, 2020

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

@gallib
Copy link
Owner Author

gallib commented Dec 19, 2020

ℹ️ Laravel 8 added a uuid column to the failed_jobs table to support the new job batching features.

If your application is currently using the failed_jobs table, you may generate a custom migration for this command by running:

php artisan make:migration AddUuidToFailedJobsTable

Then copy and paste the contents from Shift's AddUuidToFailedJobsTable class to add the uuid column and generate UUIDs for your existing failed jobs.

@gallib
Copy link
Owner Author

gallib commented Dec 19, 2020

ℹ️ Laravel 8 added a new ENV variable of LOG_LEVEL. While the log level is defaulted in the configuration, you may take this opportunity to set it accordingly in your environments.

@gallib
Copy link
Owner Author

gallib commented Dec 19, 2020

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

@gallib
Copy link
Owner Author

gallib commented Dec 19, 2020

⚠️ Laravel 8 now requires PHPUnit 9 which made some configuration changes to its config file. You may automate these changes by running vendor/bin/phpunit --migrate-configuration or comparing your phpunit.xml to the Laravel 8 version and merging any changes.

@gallib
Copy link
Owner Author

gallib commented Dec 19, 2020

ℹ️ Laravel 8 reintroduced the app/Models folder by default. This is an optional change. Laravel and the artisan commands will automatically detect if you are using the app/Models folder or not.

If you wish to modernize your application to use the app/Models folder, you may run the Namespace Models Shift for free.

@gallib
Copy link
Owner Author

gallib commented Dec 19, 2020

🎉 Congratulations, you're now running the latest version of Laravel.

The following Shifts may be used ensure your application is fully upgraded and easier to maintain in the future:

  • Upgrade Checker ensures your application is fully upgraded by detecting any outdated code.
  • Laravel Fixer automates many of the suggestions found by the Laravel Linter and other Shifts.
  • Tests Generator intelligently generates model factories, HTTP Tests, and unit tests for your application to give you a head start on testing.

You may run these Shifts and stay upgraded forever as well by subscribing to a Shifty Plans.

@gallib gallib closed this Jun 23, 2021
@gallib gallib reopened this Jun 24, 2021
@gallib gallib merged commit 197720d into develop Jun 24, 2021
@gallib gallib deleted the shift-38043 branch June 24, 2021 20:36
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