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

Open
wants to merge 9 commits into
base: shift-27801
Choose a base branch
from
Open

Laravel 5.5 Shift #6

wants to merge 9 commits into from

Conversation

starcraft04
Copy link
Owner

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

Before merging, you need to:

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

The Laravel framework adopts the PSR-2 coding style with some additions.
Laravel apps *should* adopt this coding style as well.

However, Shift allows you to customize the adopted coding style by
adding your own [PHP CS Fixer][1] `.php_cs` config to your project.

You may use [Shift's .php_cs][2] file as a base.

[1]: https://github.com/FriendsOfPHP/PHP-CS-Fixer
[2]: https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200
In an effort to make upgrading the constantly changing config files
easier, Shift defaulted them so you can review the commit diff for
changes. Moving forward, you should use ENV variables or create a
separate config file to allow the core config files to remain
automatically upgradeable.
@starcraft04
Copy link
Owner Author

❌ 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/EncryptCookies.php

@starcraft04
Copy link
Owner 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.

@starcraft04
Copy link
Owner 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.

@starcraft04
Copy link
Owner 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')

@starcraft04
Copy link
Owner Author

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

  • public/.htaccess

@starcraft04
Copy link
Owner Author

⚠️ Since you are upgrading from an older version of Laravel, Shift defaulted your customized configuration files to make future Shifts smoother. This was done in a separate commit so you may easily review and backfill your customizations once you are running the latest version.

  • config/database.php

@starcraft04
Copy link
Owner Author

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

@starcraft04
Copy link
Owner 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.

@starcraft04
Copy link
Owner 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.

@starcraft04
Copy link
Owner 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.

@starcraft04
Copy link
Owner 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.

@starcraft04
Copy link
Owner 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 php 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.

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