fullstackbelgium / fullstackbelgium.be

The source code of the Full Stack Belgium website
https://fullstackbelgium.be
MIT License
18 stars 4 forks source link

Laravel 10.x Shift #100

Closed driesvints closed 1 year ago

driesvints commented 1 year ago

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

Before merging, you need to:

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.

driesvints commented 1 year ago

:information_source: Laravel 9 moved the resources/lang folder to the top level of the project. While Shift moved and replaced references to this folder, you may have additional references to this folder which need to be updated.

driesvints commented 1 year ago

:x: Shift could not upgrade the following files since they differed from the default Laravel version. You will need to compare these files against the default Laravel 10 versions and merge any changes:

driesvints commented 1 year ago

:warning: 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 c9ee6f37 and make the config file changes manually.

driesvints commented 1 year ago

:information_source: Shift updated your dependencies for Laravel 10. 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 10. 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.

driesvints commented 1 year ago

:information_source: Laravel 9 adopted anonymous migrations. Shift automated this change to align with modern Laravel conventions and avoid naming migrations.

driesvints commented 1 year ago

:information_source: Laravel 10 added PHP type hints to all user-land code included in a new Laravel application. In an effort to modernize your code, Shift added type hints to any method which is used by Laravel, as well as any method which had types defined in its PHP DocBlock.

driesvints commented 1 year ago

:information_source: Now with type hints in your code, defining types within PHP DocBlocks is redundant. Laravel has removed all of the @param and @return tags from its DocBlocks where types are defined with PHP. Similarly, Shift removed these tags from any DocBlock where the code now has equivalent type hints.

driesvints commented 1 year ago

:information_source: Shift understand developers have different preferences when it comes to type hints. All of Shift's automation is done in nice, atomic commits. This makes it easier to undo any of the changes Shift makes.

If you wish to undo any of these changes, you may first revert the DocBlock changes by running git revert 72f9fc7. Then undo the added type hints by running git revert 179dadc.

driesvints commented 1 year ago

:information_source: All of the underlying Symfony components used by Laravel have been upgraded to Symfony 6.2. Shift detected references to Symfony classes within your application. You should review the Symfony change log for any additional changes.

driesvints commented 1 year ago

:warning: 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.

driesvints commented 1 year ago

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

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

driesvints commented 1 year ago

:alembic: This Shift is still being refined. Please report any issues or suggestions to shift@laravelshift.com. Your feedback is what helps improve the experience for everyone.