kwartzlab / kos-base

KwartzlabOS
4 stars 1 forks source link

Laravel 8.x Shift #7

Closed readysteadywhoa closed 2 years ago

readysteadywhoa commented 2 years ago

This pull request includes the changes for upgrading to Laravel 8.x. Feel free to commit any additional changes to the shift-69441 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.

readysteadywhoa commented 2 years 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 8 versions and merge any changes:

readysteadywhoa commented 2 years ago

:information_source: Laravel 8 removed the public/web.config file. The presence of this file creates a potential security risk for projects not using Microsoft IIS as their web server.

Shift removed your file since it did not appear to be modified from the default version. If you are using Microsoft IIS as your web server, you may undo this commit by running git revert 89e4f231.

readysteadywhoa commented 2 years ago

:x: To match the other auth middleware, Laravel 8 now allows multiple guards for the RedirectIfAuthenticated middleware.

Shift attempted to automate these changes, but detected customizations. You will need to compare your app/Http/Middleware/RedirectIfAuthenticated.php with the default Laravel 8 version to finalize the upgrade.

readysteadywhoa commented 2 years ago

:information_source: Laravel 8 introduced class based factories. Shift automated this change. However, if you were using a community package for factories or other custom code, you should review your factories for additional changes.

If you encounter an issue, you may revert this commit and temporarily install the laravel/legacy-factories package. You may then automate the conversion to class based factories using the Shift Workbench.

readysteadywhoa commented 2 years ago

:information_source: Laravel 8 added a uuid column to the failed_jobs table to support the new job batching features. Shift detected you have a migration for this table and created a migration for this new column. Be sure to run php artisan migrate to complete your upgrade.

readysteadywhoa commented 2 years ago

:information_source: Laravel 8 added new ENV variables for AWS_USE_PATH_STYLE_ENDPOINT, LOG_LEVEL, and LOG_DEPRECATIONS_CHANNEL. While these are defaulted within their respective configuration file, you may take this opportunity to set them accordingly for your environments.

readysteadywhoa commented 2 years 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 85fd1810 and make the config file changes manually.

readysteadywhoa commented 2 years ago

:warning: Laravel 8 removed the token driver from the API authentication. This driver was not very robust and was removed from the documentation. Laravel now recommends using Sanctum.

However, you may continue use the token driver and migrate to Sanctum at your convenience.

readysteadywhoa commented 2 years ago

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

Watch dealing with dependencies for tips on handling any additional package incompatibilities.

readysteadywhoa commented 2 years ago

:x: Shift detected Vue components within your resources folder. Laravel Mix 6 extracted Vue support into its own feature flag.

You should update your webpack.mix.js and append the new mix.vue() call when building any Vue components. For example:

mix.js('resources/js/app.js', 'public/js').vue();
readysteadywhoa commented 2 years ago

:warning: Shift upgraded your NPM dependencies and scripts for Laravel Mix 6. You will need to run npm install locally to ensure your dependencies are up-to-date and compatible.

If you encounter any issues, be sure you have the latest LTS or stable version of Node installed. If the problem persists, review the Update to Mix 6 docs for any additional steps.

readysteadywhoa commented 2 years ago

:warning: Laravel 8 now requires PHPUnit 9 which made some configuration changes to its config file. You may automate these changes by running vendor/bin/phpunit --migrate-configuration or comparing your phpunit.xml to the Laravel 8 version and merging any changes.

readysteadywhoa commented 2 years ago

:information_source: Laravel 8 reintroduced the app/Models folder by default. This is an optional change. Laravel and the artisan commands will automatically detect if you are using the app/Models folder or not.

If you wish to modernize your application to use the app/Models folder, you may run the Namespace Models Shift for free.

readysteadywhoa commented 2 years ago

:information_source: Laravel 8 supports running your PHPUnit tests in parallel. Depending on your system, this may decrease run times as much as 70%.

To run your tests in parallel, you may use the php artisan test --parallel command, or use the underlying vendor/bin/paratest runner.

readysteadywhoa commented 2 years ago

:warning: Laravel 8.x has reached end of life. It no longer receives bug fixes. Shift recommends continuing to upgrade to the latest version (Laravel 9.x).