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 5.7 Shift #24

Merged
merged 7 commits into from Nov 15, 2018
Merged

Laravel 5.7 Shift #24

merged 7 commits into from Nov 15, 2018

Conversation

jwcobb
Copy link
Owner

@jwcobb jwcobb commented Nov 15, 2018

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

Before merging, you should:

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

If you want help with your upgrade, check out the Shift Human Services or join the Shifty Coders Slack room to get answers to all your Laravel questions.

The Laravel framework adopts the PSR-2 coding style in version 5.1.
Laravel apps *should* adopt this coding style as well. Read the
[PSR-2 coding style guide][1] for more details and check out [PHPCS][2]
to use as a code formatting tool.

[1]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
[2]: https://github.com/squizlabs/PHP_CodeSniffer
@jwcobb
Copy link
Owner Author

jwcobb commented Nov 15, 2018

⚠ Laravel 5.7 changed the environment variable QUEUE_DRIVER to QUEUE_CONNECTION. You should review your server configuration or .env files to see if they need to be changed.

@jwcobb
Copy link
Owner Author

jwcobb commented Nov 15, 2018

Route::redirect now returns a 302 HTTP status code redirect in Laravel 5.7. Previously it returned a 301. Shift changed these to the new Route::permanentRedirect to preserve your intended behavior. You may want to review these changes if you are using the Route facade outside of the routes folder or want to return a 301.

@jwcobb
Copy link
Owner Author

jwcobb commented Nov 15, 2018

ℹ Laravel 5.7 removed the Blade "or" operator in favor of PHP's built-in ?? "null coalesce" operator. Shift automated this change, however, your application may still contain instances of or if you are using Blade syntax outside of the resources folder.

@jwcobb
Copy link
Owner Author

jwcobb commented Nov 15, 2018

ℹ Laravel 5.7 removed the resources/assets folder in favor of placing its sub-folders directly under resources. Shift moved these for you automatically. However, you may need to update the paths configured in your frontend build tool (e.g. webpack.mix.js) to reflect this new structure.

While Shift encourages a fully upgraded application, this new structure is not required. If this change significantly impairs your frontend build process, you can revert this commit.

@jwcobb
Copy link
Owner Author

jwcobb commented Nov 15, 2018

ℹ Laravel 5.7 now supports email verification when users register for your application. If you have implemented this feature yourself and would like to take advantage of this native functionality, the steps are below. For more details, review the documentation on Email Verification.

  • Add a email_verified_at timestamp column to your User table.
  • Add the VerificationController from Laravel 5.7 to your application.
  • Import the Illuminate\Contracts\Auth\MustVerifyEmail interface in your User model and implement it with the Illuminate\Auth\MustVerifyEmail trait.
  • Listen for the Registered event in your app/Providers/EventServiceProvider per the Laravel 5.7 version.
  • Register the verified middleware in your app/Http/Kernel.php per the Laravel 5.7 version.

- Add Laravel Telescope
- Work around negative `popularity_score`s for events
@jwcobb jwcobb merged commit 63724c6 into master Nov 15, 2018
@jwcobb jwcobb deleted the shift-10472 branch November 22, 2018 20:41
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.

None yet

2 participants