jlrdw
7 months ago
5608
4
Guides

Update upgrade laravel then framework (guide)

Posted 7 months ago by jlrdw

Some folks don't realize there are two main repositories for Laravel.

  • Laravel = app
  • Framework = vendor stuff

Also there is updating and upgrading.

  • Update = replacing some things, not all
  • Upgrade = Replace all excluding your custom code (MVC)

In other words your models, view, and controller code.

To do a complete upgrade from 5.8* to 6.* requires you to upgrade laravel first.

Special note

6.* changed, 6.0 still used filp/whoops, but the later 6.* uses ignition.

So a guess is you are going for the latest 6.* not 6.0

See these images:

First image

Shows how some files are the same, others have changes.

Last two images

Are just examples of changed files. The idea is to upgrade your current version with these changes.

For example look at resources\js\bootstrap.js in above image, see the difference. This is what's meant to upgrade laravel first. Same for any changed files, upgrade your laravel to the new versions.

I use winmerge compare tool, but you use whatever or however you need, just completely upgrade laravel first. Normally the upgrade guide handles everything, but a compare tool doesn't hurt.

Next check server requirements, php ver, etc.

After all laravel is upgraded, now run composer update which will upgrade the framework.

Note any added packages you will have to handle updates on those. If you have added packages, you will know how to handle this.

Note:

In the above I compared ver 5.8.35 with 6.5.2

Also Important

The 6.* has new scaffolding for authentication, so see:

https://laravel.com/docs/6.x/authentication All about the new Laravel's laravel/ui package.

Please sign in or create an account to participate in this conversation.