Skip to content

Conversation

@alexjustesen
Copy link
Owner

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

Before merging, you need to:

  • Checkout the shift-144216 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 get stuck, never hesitate to email support. If you need more help with your upgrade, check out the Human Shifts.

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

ℹ️ Starting with Laravel 10, the lang folder is no longer included in a default Laravel application. Laravel now recursively merges any customizations with framework defaults.

Shift streamlined your language files by removing options that matched the Laravel defaults and preserving your customizations. If you wish to keep the full set of language, Shift recommends running artisan lang:publish --force to get the latest configuration files from Laravel, then reapplying the customizations Shift streamlined.

@alexjustesen
Copy link
Owner 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 16893e8f and make the config file changes manually.

@alexjustesen
Copy link
Owner Author

ℹ️ Shift detected customized options within your configuration files which may be set with an ENV variable. To help keep your configuration files streamlined, you may set the following variables. Be sure adjust any values per environment.

LOG_CHANNEL=stderr

Note: some of these may simply be values which changed between Laravel versions. You may ignore any ENV variables you do not need to customize.

1 similar comment
@alexjustesen
Copy link
Owner Author

ℹ️ Shift detected customized options within your configuration files which may be set with an ENV variable. To help keep your configuration files streamlined, you may set the following variables. Be sure adjust any values per environment.

LOG_CHANNEL=stderr

Note: some of these may simply be values which changed between Laravel versions. You may ignore any ENV variables you do not need to customize.

@alexjustesen
Copy link
Owner Author

alexjustesen commented Mar 18, 2025

⚠️ The following environment variables have been renamed. Shift automated this change for your committed files, but you should review any additional locations where your environment is configured and update to the new variable name.

  • MAIL_ENCRYPTION to MAIL_SCHEME

@alexjustesen
Copy link
Owner Author

⚠️ Laravel 12 removed the APP_TIMEZONE environment variable. The timezone now defaults to UTC. Shift removed this variable from your .env file since it was set to UTC.

@alexjustesen
Copy link
Owner Author

⚠️ Later versions of Laravel 11 changed the default value of the DB_COLLATION from utf8mb4_0900_ai_ci to utf8mb4_unicode_ci for MySQL and utf8mb4_uca1400_ai_ci to utf8mb4_unicode_ci for MariaDB.

Shift did not detect a DB_COLLATION environment variable used within your committed files. You should verify your database configuration and, if necessary, set the DB_COLLATION value.

@alexjustesen
Copy link
Owner Author

ℹ️ Laravel added a composer run dev script which starts php artisan serve, php artisan queue:listen --tries=1, php artisan pail, and npm run dev all in one command.

Shift has added this script, as well as the necessary packages. Once you run composer update and npm install, you will be able to use the new composer run dev script.

@alexjustesen
Copy link
Owner Author

ℹ️ In a minor release of Laravel 11, the local storage disk was updated to use the storage/app/private folder. This keeps files organized within a subfolder, similar to the public disk.

Shift added the storage/app/private folder. However, to avoid potentially breaking your app, Shift did not change your configuration. If you want, you may migrate your files and update your local disk path in your config/filesystems.php file. If you are not using the local storage disk, you may go ahead and update the path.

@alexjustesen
Copy link
Owner Author

ℹ️ Starting with Laravel 11, guzzlehttp/guzzle is included as a framework dependency. Since Shift did not detect any references to the GuzzleHttp namespace within your application it removed your direct dependency.

@alexjustesen
Copy link
Owner Author

ℹ️ Shift updated your dependencies for Laravel 12. While many of the popular packages are reviewed, you may have to update additional packages in order for your application to be compatible with Laravel 12. Watch dealing with dependencies for tips on handling any Composer issues.

The following dependencies were updated by a major version and may have their own changes. You may check their changelog for any additional upgrade steps.

The following dependencies were not updated by Shift and may be incompatible. If Composer lists one of these packages as a problem, you should check for a newer version.

@alexjustesen
Copy link
Owner Author

ℹ️ All of the underlying Symfony components used by Laravel have been upgraded to Symfony 7.2. Shift detected references to Symfony classes within your application. These are most likely type hints and can safely be ignored. If you are using Symfony classes directly or experience issues relating to Symfony, you should review the Symfony change log for any additional changes.

@alexjustesen
Copy link
Owner Author

ℹ️ If you are using the Laravel installer CLI tool to create new Laravel applications with laravel new, you should updated to the latest version to receive updates for Laravel 12 and the new starter kits.

You may update your installer by running:

composer global require laravel/installer

@alexjustesen
Copy link
Owner Author

⚠️ Laravel 12 no longer includes the SVG image type when performing image validation. If your application allows SVG images, you should review your image validation rules and update them to use the new allow_svg option.

'cover' => ['required', 'image:allow_svg'],
'avatar' => ['required', File::image(allowSvg: true)],

@alexjustesen
Copy link
Owner Author

ℹ️ The container now respects the default value of constructor parameters when resolving a class instance. If you were previously relying on the container to set a value, you will need to pass in this value when resolving the class instead.

@alexjustesen
Copy link
Owner Author

⚠️ Shift detected you are using a Laravel package like Horizon or Nova which may need to have its published assets regenerated after upgrading. Be sure to use artisan to republish these assets as well as php artisan view:clear to avoid any errors.

@alexjustesen
Copy link
Owner Author

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

Next, you may optionally run the following Shifts to ensure your application is fully upgraded, adopts the latest Laravel conventions, and easier to maintain in the future:

  • Laravel Fixer automatically updates your code to the latest Laravel conventions.
  • Tests Generator intelligently generates model factories, HTTP Tests, and configuration for your application.
  • CI Generator intelligently generates CI jobs to lint PHP, check code style, and run tests, including Dusk.

You may also use the Shift Workbench to automate common tasks for maintaining your Laravel application.

@alexjustesen alexjustesen self-assigned this Mar 18, 2025
@alexjustesen alexjustesen added the chore Nothing fancy, just needs to get done label Mar 18, 2025
@alexjustesen
Copy link
Owner Author

Unlocked Livewire, seems Filament has addressed the issue: filamentphp/filament#15559

@alexjustesen alexjustesen mentioned this pull request Mar 18, 2025
2 tasks
@alexjustesen alexjustesen merged commit 1bb1ad7 into main Mar 18, 2025
1 check passed
@alexjustesen alexjustesen deleted the shift-144216 branch March 18, 2025 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Nothing fancy, just needs to get done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants