Skip to content

Laravel 7.x Shift#209

Open
pvgennip wants to merge 49 commits into
developmentfrom
shift-137373
Open

Laravel 7.x Shift#209
pvgennip wants to merge 49 commits into
developmentfrom
shift-137373

Conversation

@pvgennip
Copy link
Copy Markdown
Collaborator

This pull request includes the changes for upgrading to Laravel 7.x. Feel free to commit any additional changes to the shift-137373 branch.

Before merging, you need to:

  • Checkout the shift-137373 branch
  • Review all pull request comments for additional changes
  • Run composer update (if the scripts fail, try with --no-scripts)
  • Clear any config, route, or view cache
  • Thoroughly test your application (no tests?, no CI?)

If you need help with your upgrade, check out the Human Shifts.

pvgennip and others added 23 commits April 10, 2026 13:35
Shift automatically applies the Laravel coding style - which uses the PSR-12 coding style as a base with some minor additions.

You may customize the code style applied by configuring [Pint](https://laravel.com/docs/pint), [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer), or [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) for your project root.

For more information on customizing the code style applied by Shift, [watch this short video](https://laravelshift.com/videos/shift-code-style).
PHP 5.5.9 adds the new static `class` property which provides the fully qualified class name. This is preferred over using strings for class names since the `class` property references are checked by PHP.
In an effort to make upgrading the constantly changing config files easier, Shift defaulted them and merged your true customizations - where ENV variables may not be used.
@pvgennip
Copy link
Copy Markdown
Collaborator Author

⚠️ Laravel 7 adds CORS middleware and defaults the middlewarePriority internally so you only need to overwrite this property for customizations.

Shift attempted to automate these changes, but you should compare your app/Http/Kernel.php with the default Laravel 7 version to finalize any changes.

@pvgennip
Copy link
Copy Markdown
Collaborator Author

ℹ️ Laravel 7 upgraded to Symfony 5 which passes instances of the Throwable interface instead of Exception instances to core components like the Exceptions\Handler.

Shift automated this change. However, if you receive a Throwable type mismatch error there may be additional references you need to convert.

@pvgennip
Copy link
Copy Markdown
Collaborator Author

ℹ️ Laravel 7 moved the Authentication components into a separate laravel/ui package, which includes the make commands as well as the traits related to authentication.

Shift added this dependency for convenience. However, if you do not plan to use the Authentication components, you may remove this dependency as well as the Auth controllers from your application.

@pvgennip
Copy link
Copy Markdown
Collaborator Author

ℹ️ Shift detected the use of Markdown mail templates. In Laravel 7, Markdown mail templates expect unindented HTML, because indentation has special meaning within Markdown.

Shift automated this change for Laravel's default mail templates. However, you may consider re-publishing these instead to take advantage of recent design updates. You may do so by running the command:

php artisan vendor:publish --tag=laravel-mail --force

@pvgennip
Copy link
Copy Markdown
Collaborator Author

⚠️ The MAIL_DRIVER environment variable was renamed in Laravel 7 to MAIL_MAILER in order to support multiple mail configurations.

Shift attempted to automate this change, but you should review any additional environment configuration and update to the new variable name.

@pvgennip
Copy link
Copy Markdown
Collaborator Author

⚠️ Shift upgraded your configuration files by defaulting them and merging your true customizations. These include values which are not changeable through core ENV variables.

You should review this commit for additional customizations or opportunities to use new ENV variables. If you have a lot of customizations, you may undo this commit with git revert 1e912313 and make the config file changes manually.

@pvgennip
Copy link
Copy Markdown
Collaborator Author

ℹ️ Shift detected your application uses custom ENV variables for configuration options which have ENV variables in Laravel. Shift recommends renaming the following variables to use the one provided by Laravel:

  • WEBHOOK_URL to LOG_SLACK_WEBHOOK_URL

@pvgennip
Copy link
Copy Markdown
Collaborator Author

⚠️ Shift found potential uses of the different validation rule. In Laravel 7, this rule will fail if one of the specified parameters is missing from the request. As this was likely the expected behavior, it should not affect your validation. Nonetheless you should be aware of this change.

@pvgennip
Copy link
Copy Markdown
Collaborator Author

⚠️ Laravel 7 uses a new date format when serializing models. The previous format was 2019-12-02 20:01:00. Now, dates are serialized using an ISO-8601 compatible date format of 2019-12-02T20:01:00.283041Z in UTC.

This does not affect how dates are stored. Only how they are serialized when using the toArray or toJson Eloquent methods.

If you need to preserve the previous format, you may override the serializeDate method on your model. Review the Date Serialization section of the Upgrade Guide for more details.

@pvgennip
Copy link
Copy Markdown
Collaborator Author

ℹ️ All of the underlying Symfony components used by Laravel have been upgraded to Symfony 5. If you are directly interacting with any Symfony component, you should review the Symfony change log for additional changes.

@pvgennip
Copy link
Copy Markdown
Collaborator Author

⚠️ Laravel 7.x has reached end of life. It no longer receives bug fixes or security updates. Shift recommends continuing to upgrade to the latest version (Laravel 12.x).

For tips on running multiple Shifts effectively, watch upgrading old Laravel applications.

JuliaBD and others added 26 commits May 26, 2026 15:55
* master:
  herd.yml
  MeasurementController - Enable clean_weight again
  Device - Fix sensor definition if changed
  Update MeasurementController.php
  Update MeasurementController.php
  MeasurementController - Add debug log
  Revert "Update MeasurementController.php"
  Update MeasurementController.php
  MeasurementController - measurements only recalculate calibrations if on
  MeasurementController - Measurement disable clean_weight
  MeasurementController - measurements do not force recalculate sensor definitions
  MeasurementController - Enable net_weight_kg only
  MeasurementController - Revert feature clean weight

# Conflicts:
#	app/Device.php
#	app/Http/Controllers/Api/MeasurementController.php
Shift automatically applies the Laravel coding style - which uses the PSR-12 coding style as a base with some minor additions.

You may customize the code style applied by configuring [Pint](https://laravel.com/docs/pint), [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer), or [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) for your project root.

For more information on customizing the code style applied by Shift, [watch this short video](https://laravelshift.com/videos/shift-code-style).
Laravel 8 adopts the tuple syntax for controller actions. Since the old options array is incompatible with this syntax, Shift converted them to use modern, fluent methods.
In an effort to make upgrading the constantly changing config files easier, Shift defaulted them and merged your true customizations - where ENV variables may not be used.
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.

3 participants