Upgrade laravel 5.8 to 6: Fatal error: Uncaught RuntimeException: A facade root has not been set

I am trying to upgrade laravel 5.8 to 6. I have also deleted the vendor Directory But still getting the following error:

Fatal error: Uncaught RuntimeException: A facade root has not been set. in C:xampp8.2.0htdocsweb_kaalo - 5.8vendorlaravelframeworksrcIlluminateSupportFacadesFacade.php:258
#0 C:xampp8.2.0htdocsweb_kaalo - 5.8appExceptionsHandler.php(44): IlluminateSupportFacadesFacade::__callStatic('set', Array)
#1 C:xampp8.2.0htdocsweb_kaalo - 5.8vendorlaravelframeworksrcIlluminateFoundationConsoleKernel.php(376): AppExceptionsHandler->report(Object(SymfonyComponentDebugExceptionFatalThrowableError))
#2 C:xampp8.2.0htdocsweb_kaalo - 5.8vendorlaravelframeworksrcIlluminateFoundationConsoleKernel.php(141): IlluminateFoundationConsoleKernel->reportException(Object(SymfonyComponentDebugExceptionFatalThrowableError))
#3 C:xampp8.2.0htdocsweb_kaalo - 5.8artisan(37): IlluminateFoundationConsoleKernel->handle(Object(SymfonyComponentConsoleInputArgvInput), Object(SymfonyComponentConsoleOutputConsoleOutput))
#4 {main}
  thrown in C:xampp8.2.0htdocsweb_kaalo - 5.8vendorlaravelframeworksrcIlluminateSupportFacadesFacade.php on line 258
PHP Fatal error:  Uncaught RuntimeException: A facade root has not been set. in C:xampp8.2.0htdocsweb_kaalo - 5.8vendorlaravelframeworksrcIlluminateSupportFacadesFacade.php:258
Stack trace:
#0 C:xampp8.2.0htdocsweb_kaalo - 5.8appExceptionsHandler.php(44): IlluminateSupportFacadesFacade::__callStatic('set', Array)
#1 C:xampp8.2.0htdocsweb_kaalo - 5.8vendorlaravelframeworksrcIlluminateFoundationConsoleKernel.php(376): AppExceptionsHandler->report(Object(SymfonyComponentDebugExceptionFatalThrowableError))
#2 C:xampp8.2.0htdocsweb_kaalo - 5.8vendorlaravelframeworksrcIlluminateFoundationConsoleKernel.php(141): IlluminateFoundationConsoleKernel->reportException(Object(SymfonyComponentDebugExceptionFatalThrowableError))
#3 C:xampp8.2.0htdocsweb_kaalo - 5.8artisan(37): IlluminateFoundationConsoleKernel->handle(Object(SymfonyComponentConsoleInputArgvInput), Object(SymfonyComponentConsoleOutputConsoleOutput))
#4 {main}
  thrown in C:xampp8.2.0htdocsweb_kaalo - 5.8vendorlaravelframeworksrcIlluminateSupportFacadesFacade.php on line 258```

Answer

In your composer.json file you should have this:

"laravel/framework": "^6.0",
"php": "^7.2",
"phpunit/phpunit": "^8.0"

and then in console execute composer update, so if you are using the helpers String and Array on this case you need install the package laravel/helpers with this command:

composer require laravel/helpers

and after that change the helpers with calling to methods of classes IlluminateSupportStr and IlluminateSupportArr, if you have other issues please share here your composer.json for see more details.