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 #2

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Laravel 8.x Shift #2

wants to merge 12 commits into from

Conversation

laravel-shift
Copy link
Owner

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

Before merging, you need to:

  • Checkout the shift-8.x 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.

@laravel-shift
Copy link
Owner Author

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

@laravel-shift
Copy link
Owner Author

ℹ️ 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-shift
Copy link
Owner Author

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

@laravel-shift
Copy link
Owner Author

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

@laravel-shift
Copy link
Owner Author

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

@laravel-shift
Copy link
Owner Author

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

@laravel-shift
Copy link
Owner Author

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

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.

3 participants