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.5 Shift #144

Merged
merged 6 commits into from Aug 3, 2019
Merged

Laravel 5.5 Shift #144

merged 6 commits into from Aug 3, 2019

Conversation

mattstauffer
Copy link
Member

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

Before merging, you should:

  • Checkout the shift-16545 branch
  • Review all pull request comments for additional changes
  • Update your dependencies for Laravel 5.5
  • 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.

@mattstauffer
Copy link
Member Author

mattstauffer commented Aug 3, 2019

❌ Shift could not upgrade the following Middleware since they differed from the default Laravel version. You will need to compare these files against the Laravel 5.5 versions and merge any changes:

  • app/Http/Middleware/VerifyCsrfToken.php

@mattstauffer
Copy link
Member Author

⚠️ Laravel 5.5 streamlined the Exception Handler. Shift was unable to upgrade app/Exceptions/Handler.php. You should compare yours against the Laravel 5.5 version and merge these changes manually.

@mattstauffer
Copy link
Member Author

ℹ️ In Laravel 5.5, the Request has() method returns true for empty strings and null. If you would like to preserve the old behavior of the has() method, you may use the new filled() method instead.

@mattstauffer
Copy link
Member Author

ℹ️ In Laravel 5.5, the Request only() method returns attributes that are actually present in the request payload. If you would like to preserve the old behavior of the only() method, you may use the all() method instead.

@mattstauffer
Copy link
Member Author

ℹ️ In Laravel 5.5, the request() helper will no longer retrieve nested keys. You may instead use the input() method to retrieve nested keys, for example: request()->input('nested.key')

@mattstauffer
Copy link
Member Author

mattstauffer commented Aug 3, 2019

❌ Shift could not upgrade the following files since they differed from the default Laravel version. You will need to compare these application files against the default Laravel 5.5 versions and merge any changes:

  • artisan
  • tests/CreatesApplication.php

@mattstauffer
Copy link
Member Author

mattstauffer commented Aug 3, 2019

❌ Shift could not upgrade the following configuration files since they differed from the default Laravel version. You will need to compare these configuration files against the Laravel 5.5 configuration files and merge any changes:

  • config/services.php

@mattstauffer
Copy link
Member Author

ℹ️ Laravel 5.5 now sets the session cookie name using the APP_NAME. If you rely on the previous laravel_session value, you may set this using the new SESSION_COOKIE environment variable. Review the cookie key in config/session.php for more details.

@mattstauffer
Copy link
Member Author

ℹ️ Laravel 5.5 changed the default format for HTTP exception responses. This may affect your application if you rely upon default JSON responses. Review the Exception Format section of the Upgrade Guide for more detail.

@mattstauffer
Copy link
Member Author

ℹ️ Laravel 5.5 removed bootstrap/autoload.php and uses the Composer vendor/autoload.php instead. If you were referencing bootstrap/autoload.php directly, you should upgrade your application accordingly.

@mattstauffer
Copy link
Member Author

ℹ️ If you are using the database cache driver, you should run php artisan cache:clear when running your upgraded Laravel 5.5 application for the first time.

@mattstauffer
Copy link
Member Author

ℹ️ Laravel 5.5 uses package auto-discovery to make it easier to install and enable packages.

This may require you to update Composer. You may do so by running composer self-update. Review the Composer documentation for more details.

In addition, you may also unregister the providers and aliases for any packages using auto-discovery from your config/app.php.

@mattstauffer
Copy link
Member Author

❌ Laravel 5.5.42 included an important security update regarding your application encryption key. If you believe your key may be known by a third-party you should rotate the key to a new value using artisan key:generate.

In addition, Laravel 5.5.42 disables all serialization of cookie values to protect against vulnerabilities inherit to PHP object serialization. This is a breaking change. If your application uses cookies, they will be invalidated. If you must maintain your cookie values, you can re-enable cookie serialization at your own risk. Review the Security Release section of the Upgrade Guide for more details.

@mattstauffer
Copy link
Member Author

🎉 Congratulations, you've made it to the latest LTS version. However, Shift encourages you to keep going to the latest Laravel version. No reason to remain on this older version and acquire technical debt when you're so close...

@mattstauffer mattstauffer merged commit d9ef984 into master Aug 3, 2019
@mattstauffer mattstauffer deleted the shift-16545 branch August 3, 2019 18:35
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