0

I'm setting up a new server and want to migrate the project from Laravel version 4.0 to Laravel version 5. I followed the steps mentioned in this URL Upgrading from Laravel 4 to Laravel 5, but after all the steps, I got the following error. What could be the reason?

[Symfony\Component\Debug\Exception\FatalThrowableError] Fatal error: Class name must be a valid object or a string

Exception trace:
 () at /home/vagrant/work/laravel/vendor/zizaco/entrust/src/commands/MigrationCommand.php:86
 Zizaco\Entrust\MigrationCommand->createMigration() at /home/vagrant/work/laravel/vendor/zizaco/entrust/src/commands/MigrationCommand.php:58
 Zizaco\Entrust\MigrationCommand->fire() at n/a:n/a
 call_user_func_array() at /home/vagrant/work/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:507
 Illuminate\Container\Container->call() at /home/vagrant/work/laravel/vendor/laravel/framework/src/Illuminate/Console/Command.php:169
 Illuminate\Console\Command->execute() at /home/vagrant/work/laravel/vendor/symfony/console/Command/Command.php:256
 Symfony\Component\Console\Command\Command->run() at /home/vagrant/work/laravel/vendor/laravel/framework/src/Illuminate/Console/Command.php:155
 Illuminate\Console\Command->run() at /home/vagrant/work/laravel/vendor/symfony/console/Application.php:791
 Symfony\Component\Console\Application->doRunCommand() at /home/vagrant/work/laravel/vendor/symfony/console/Application.php:186
 Symfony\Component\Console\Application->doRun() at /home/vagrant/work/laravel/vendor/symfony/console/Application.php:117
 Symfony\Component\Console\Application->run() at /home/vagrant/work/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:107
 Illuminate\Foundation\Console\Kernel->handle() at /home/vagrant/work/laravel/artisan:35
Karl Hill
  • 12,937
  • 5
  • 58
  • 95
Yogi Ghorecha
  • 1,584
  • 1
  • 19
  • 26
  • @RiggsFolly I followed the standard migration steps provided by site which is https://mattstauffer.com/blog/upgrading-from-laravel-4-to-laravel-5/ – Yogi Ghorecha Apr 05 '19 at 10:18
  • why not install fresh one instead of cloning – Gaurav Gupta Apr 05 '19 at 10:18
  • @GauravGupta We have lots of Data and Code is done from 2 years of efforts. Creating new one would be very time taking – Yogi Ghorecha Apr 05 '19 at 10:20
  • the url you have mention above tell you to make clone of laravel 5 and then move all of your file in which i am telling you to install of fresh one if you are geting error in clone – Gaurav Gupta Apr 05 '19 at 10:22
  • @GauravGupta I see, sorry I misinterpreted your question. Yes, have followed the same scenario already – Yogi Ghorecha Apr 05 '19 at 10:25
  • 1
    You didn't try [upgrade solutions](https://laravel.com/docs/5.0/upgrade) from official site? – Tpojka Apr 05 '19 at 10:27
  • there might be problem with direct upgrade 4.0-5.2 because as mention on site need to go step over step – Gaurav Gupta Apr 05 '19 at 10:30
  • @Tpojka Yes, first we try from the official site, but got a bunch of Fatal errors and class errors, after spending so much time, finally we decided to follow above steps where most of the error are solved only above error is coming now. – Yogi Ghorecha Apr 05 '19 at 10:30
  • @GauravGupta you are right Gaurav. – Yogi Ghorecha Apr 05 '19 at 10:30
  • 2
    You need to read and go from bottom of the page up, from [this section](https://laravel.com/docs/5.0/upgrade) and going up level by level. Have you done that? – Tpojka Apr 05 '19 at 10:32
  • @Tpojka we thoroughly followed the same document, as there was some code which was customized by our side, so we remove the custom code and replace with the default CORE laravel code. – Yogi Ghorecha Apr 05 '19 at 13:18
  • Did you tried Laravel Shift ? https://laravelshift.com/ – Piotrek Zatorski Jul 09 '20 at 12:01

1 Answers1

2

Do yourself a favour and use Laravel Shift. Upgrade Laravel 4.2 to Laravel 5.0 The Laravel 5.0 Shift automates the upgrade from Laravel 4.2 to Laravel 5.0. Using the Laravel 5.0 Shift to automatically upgrade your Laravel application has an estimated time savings of over 6 hours.

Karl Hill
  • 12,937
  • 5
  • 58
  • 95