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.8 Shift #2

Merged
merged 5 commits into from Mar 1, 2019

Conversation

Projects
None yet
2 participants
@faustbrian
Copy link
Owner

faustbrian commented Mar 1, 2019

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

Before merging, you should:

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

laravel-shift added some commits Mar 1, 2019

Shift deprecated helpers
Laravel recommends using the `Str` and `Arr` class methods directly instead of the respective helper functions. These helper functions are [deprecated in Laravel 5.8][1] and will be removed in a future version.

[1]: laravel/framework#26898
Shift Cache methods to use seconds
To conform with PSR-16 Laravel 5.8 changed the cache expiration time from minutes to seconds. If you were passing an integer, Shift converted this to its integer equivalent in seconds. If you were passing a "minutes" variable, Shift converted this to the relative date time equivalent for readability.
@faustbrian

This comment has been minimized.

Copy link
Owner Author

faustbrian commented Mar 1, 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.8 configuration files and merge any changes:

  • config/app.php
  • config/database.php
  • config/mail.php
  • config/services.php
  • config/session.php
@faustbrian

This comment has been minimized.

Copy link
Owner Author

faustbrian commented Mar 1, 2019

⚠️ Laravel 5.8 introduced a set of AWS environment variables to help consolidate configuring AWS services. You should rename the following environment variables to their new AWS names.

  • SQS_KEY to AWS_ACCESS_KEY_ID
  • SQS_SECRET to AWS_SECRET_ACCESS_KEY
  • SQS_REGION to AWS_REGION
  • SES_KEY to AWS_ACCESS_KEY_ID
  • SES_SECRET to AWS_SECRET_ACCESS_KEY
  • SES_REGION to AWS_REGION
@faustbrian

This comment has been minimized.

Copy link
Owner Author

faustbrian commented Mar 1, 2019

⚠️ Shift could not upgrade the RedirectIfAuthenticated middleware. Laravel 5.8 now passes an array of guards as the third argument. You will need to compare the default Laravel 5.8 versions and merge any changes.

@faustbrian

This comment has been minimized.

Copy link
Owner Author

faustbrian commented Mar 1, 2019

Laravel 5.8 has a development dependency for filp/whoops of ^2.0. You have a modified dependency for filp/whoops in your composer.json. You should review your dependency and ensure it meets the new version requirement.

@faustbrian

This comment has been minimized.

Copy link
Owner Author

faustbrian commented Mar 1, 2019

Laravel 5.8 has a development dependency for fzaninotto/faker of ^1.4. You have a modified dependency for fzaninotto/faker in your composer.json. You should review your dependency and ensure it meets the new version requirement.

@faustbrian

This comment has been minimized.

Copy link
Owner Author

faustbrian commented Mar 1, 2019

Laravel 5.8 has a development dependency for mockery/mockery of ^1.0. You have a modified dependency for mockery/mockery in your composer.json. You should review your dependency and ensure it meets the new version requirement.

@faustbrian

This comment has been minimized.

Copy link
Owner Author

faustbrian commented Mar 1, 2019

Laravel 5.8 has a development dependency for phpunit/phpunit of ^7.5. You have a modified dependency for phpunit/phpunit in your composer.json. You should review your dependency and ensure it meets the new version requirement.

@faustbrian

This comment has been minimized.

Copy link
Owner Author

faustbrian commented Mar 1, 2019

Shift detected your application has a development dependency for the laravel/dusk package. The recommended version for Laravel 5.8 is ^5.0. You should review your dependency and ensure it meets the new version requirement, as well as review their README for additional changes.

@faustbrian

This comment has been minimized.

Copy link
Owner Author

faustbrian commented Mar 1, 2019

⚠️ Laravel 5.8 changed several of the core contracts with new implementations and methods. You should review the Upgrade Guide for more detail on these respective changes:

Shift found references to these contracts within:

  • app/Http/Controllers/Auth/RegisterController.php
  • app/Http/ViewComposers/Shared/EncryptedCsrfTokenComposer.php
@faustbrian

This comment has been minimized.

Copy link
Owner Author

faustbrian commented Mar 1, 2019

⚠️ Laravel 5.8 changed the TTL for the Cache methods from minutes to seconds. Shift automated this change, however, given the dynamic nature of PHP your application may still contain some TTL arguments in minutes.

While your application will still run, this would lead to early expiration for your cached values. You should review your caching calls to ensure the TTL was upgraded to seconds.

@faustbrian

This comment has been minimized.

Copy link
Owner Author

faustbrian commented Mar 1, 2019

🎉 Congratulations, you're now running the latest version of Laravel. You can now use some of the micro Shifts to ensure your app is fully upgraded and following the Laravel recommended and community practices.

  • Laravel Linter analyzes your codebase for potential opportunities to do things "The Laravel Way".
  • Laravel Fixer automates many of the suggestions found by the Analyzer and Linter.
  • Upgrade Checker ensures your application is fully upgraded by detecting any outdated code.
Apply fixes from StyleCI (#3)
[ci skip] [skip ci]

@faustbrian faustbrian merged commit ab5d031 into master Mar 1, 2019

2 checks passed

continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/styleci/push The analysis has passed
Details

@faustbrian faustbrian deleted the shift-12411 branch Mar 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.