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 6.0 Shift #41

Merged
merged 6 commits into from
Sep 6, 2019
Merged

Laravel 6.0 Shift #41

merged 6 commits into from
Sep 6, 2019

Conversation

mikaeljorhult
Copy link
Owner

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

Before merging, you should:

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

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 5.1 requires PHP 5.5.9+ which provides the new static `class`
property to get the fully qualified name of a class and is preferred
over using class name strings.
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.
@mikaeljorhult
Copy link
Owner Author

❌ Shift could not upgrade your HTTP Kernel because it differed from the default version. You will need to compare this file against the default Laravel 6.0 version and merge any changes.

@mikaeljorhult
Copy link
Owner Author

⚠️ Shift defaulted the following configuration files. This was done in the Default config files commit so you may easily review and backfill any of your customizations.

  • config/database.php
  • config/services.php

@mikaeljorhult
Copy link
Owner Author

ℹ️ Laravel 6.0 changed the default Redis client from predis to phpredis. You may keep using predis by setting REDIS_CLIENT=predis for your environment. However, if possible, consider switching to phpredis to gain the performance of the PHP extension and increased community support.

@mikaeljorhult
Copy link
Owner Author

ℹ️ The Eloquent model's toArray() method will now cast any attributes that implement Illuminate\Contracts\Support\Arrayable to an array. While unlikely to impact your application, this change could effect code which relies upon the previous data type or output.

@mikaeljorhult
Copy link
Owner Author

ℹ️ Laravel 6.0 made performance optimizations for integer key types. If you are using a string as your model's primary key, you may set the $keyType property on your model.

/**
 * The "type" of the primary key ID.
 *
 * @var string
 */
protected $keyType = 'string';

@mikaeljorhult
Copy link
Owner Author

ℹ️ Previous versions of Laravel would use parameters passed to the route() helper as URI values even if the parameter had no matching placeholder within the route path. In Laravel 6.0, these values are attached to the query string instead.

If you notice a route behaving in this way, it's likely the route parameter key and route placeholder name mismatch.

@mikaeljorhult
Copy link
Owner Author

ℹ️ The mandrill and sparkpost mail drivers, as well as the rackspace storage driver were removed in Laravel 6.0. If you were using these drivers, you may adopt a community maintained package which provides the driver.

@mikaeljorhult
Copy link
Owner Author

ℹ️ Previous versions of Laravel would retry jobs indefinitely. Beginning with Laravel 6.0, the php artisan queue:work now tries a job one time by default. If you want to force jobs to be tried indefinitely, you may pass the --tries=0 option.

@mikaeljorhult
Copy link
Owner Author

ℹ️ While it was common to customize in previous versions, Laravel now recommends keeping the default App namespace. This will also improve your upgrade process. You can easily change it to the default by running php artisan app:name App. After doing so, you are welcome to request a rerun of this Shift.

@mikaeljorhult
Copy link
Owner Author

🎉 Congratulations, you're now running the latest version of Laravel.

The following Shifts can ensure your app is fully upgraded and following the practices recommended by Laravel and the community:

  • Laravel Linter analyzes your codebase for potential opportunities to do things "The Laravel Way".
  • Laravel Fixer automates many of the suggestions found by the Linter and other Shifts.
  • Upgrade Checker ensures your application is fully upgraded by detecting any outdated code.

In addition, stay upgraded forever as well as run these Shifts by subscribing to one of the new Shifty Plans.

@mikaeljorhult mikaeljorhult merged commit b1f613e into master Sep 6, 2019
@mikaeljorhult mikaeljorhult deleted the shift-17971 branch September 9, 2019 19:01
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.

2 participants