Laravel app stopped working after run older version app in new version laravel framework

  laravel, php

Getting This Error When run older version app in new version laravel framework


C:UsersUserDesktopjkcarriesTMS>php artisan serve

PHP Fatal error:  Uncaught ErrorException: Method ReflectionParameter::getClass(
) is deprecated in C:UsersUserDesktopjkcarriesTMSvendorlaravelframework
srcIlluminateContainerContainer.php:788
Stack trace:

#0 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminateC
ontainerContainer.php(788): IlluminateFoundationBootstrapHandleExceptions->h
andleError(8192, 'Method Reflecti...', 'C:UsersUserD...', 788)

#1 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminateC
ontainerContainer.php(757): IlluminateContainerContainer->resolveDependencies
(Array)

#2 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminateC
ontainerContainer.php(608): IlluminateContainerContainer->build('AppExcepti
ons...')

#3 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminateC
ontainerContainer.php(564): IlluminateContainerContainer->resolve('AppExcep
tions...', Array)

#4 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminateF
oundationApplication.php(709): IlluminateContainerContainer->makeWith('AppE
xceptions...', Array)
#5 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminateC
ontainerContainer.php(248): IlluminateFoundationApplication->makeWith('AppE
xceptions...', Array)

#6 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminateC
ontainerContainer.php(726): IlluminateContainerContainer->IlluminateContaine
r{closure}(Object(IlluminateFoundationApplication), Array)

#7 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminateC
ontainerContainer.php(608): IlluminateContainerContainer->build(Object(Closur
e))
#8 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminateC
ontainerContainer.php(575): IlluminateContainerContainer->resolve('Illuminate
Cont...')
#9 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminateF
oundationApplication.php(728): IlluminateContainerContainer->make('Illuminate
Cont...')
#10 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminate
FoundationBootstrapHandleExceptions.php(159): IlluminateFoundationApplicatio
n->make('IlluminateCont...')

#11 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminate
FoundationBootstrapHandleExceptions.php(101): IlluminateFoundationBootstrap
HandleExceptions->getExceptionHandler()
#12 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminate
FoundationBootstrapHandleExceptions.php(87): IlluminateFoundationBootstrapH
andleExceptions->renderForConsole(Object(ErrorException))
#13 [internal function]: IlluminateFoundationBootstrapHandleExceptions->handl
eException(Object(ErrorException))
#14 {main}
  thrown in C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIll
uminateContainerContainer.php on line 788
PHP Fatal error:  Uncaught ErrorException: Method ReflectionParameter::getClass(
) is deprecated in C:UsersUserDesktopjkcarriesTMSvendorlaravelframework
srcIlluminateContainerContainer.php:788
Stack trace:
#0 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminateC
ontainerContainer.php(788): IlluminateFoundationBootstrapHandleExceptions->h
andleError(8192, 'Method Reflecti...', 'C:UsersUserD...', 788)
#1 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminateC
ontainerContainer.php(757): IlluminateContainerContainer->resolveDependencies
(Array)
#2 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminateC
ontainerContainer.php(608): IlluminateContainerContainer->build('AppExcepti
ons...')

#3 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminateC
ontainerContainer.php(564): IlluminateContainerContainer->resolve('AppExcep
tions...', Array)

#4 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminateF
oundationApplication.php(709): IlluminateContainerContainer->makeWith('AppE
xceptions...', Array)

#5 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminateC
ontainerContainer.php(248): IlluminateFoundationApplication->makeWith('AppE
xceptions...', Array)

#6 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminateC
ontainerContainer.php(726): IlluminateContainerContainer->IlluminateContaine
r{closure}(Object(IlluminateFoundationApplication), Array)

#7 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminateC
ontainerContainer.php(608): IlluminateContainerContainer->build(Object(Closur
e))
#8 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminateC
ontainerContainer.php(575): IlluminateContainerContainer->resolve('Illuminate
Cont...')
#9 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminateF
oundationApplication.php(728): IlluminateContainerContainer->make('Illuminate
Cont...')
#10 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminate
FoundationBootstrapHandleExceptions.php(159): IlluminateFoundationApplicatio
n->make('IlluminateCont...')
#11 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminate
FoundationBootstrapHandleExceptions.php(101): IlluminateFoundationBootstrap
HandleExceptions->getExceptionHandler()
#12 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminate
FoundationBootstrapHandleExceptions.php(87): IlluminateFoundationBootstrapH
andleExceptions->renderForConsole(Object(ErrorException))
#13 C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIlluminate
FoundationBootstrapHandleExceptions.php(123): IlluminateFoundationBootstrap
HandleExceptions->handleException(Object(ErrorException))
#14 [internal function]: IlluminateFoundationBootstrapHandleExceptions->handl
eShutdown()
#15 {main}
  thrown in C:UsersUserDesktopjkcarriesTMSvendorlaravelframeworksrcIll
uminateContainerContainer.php on line 788

Here my composer.json file



{
    
"name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.6.4",
        "laravel/framework": "5.4.*",
        "laravelcollective/html": "^5.3.0",
        "guzzlehttp/guzzle": "^6.3",
        "doctrine/dbal": "^2.9"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~5.7",
        "symfony/css-selector": "3.1.*",
        "symfony/dom-crawler": "3.1.*"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App": "app/"
        }
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php"
        ]
     },
    "scripts": {
        "post-root-package-install": [
            "php -r "file_exists('.env') || copy('.env.example', '.env');""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ],
        "post-install-cmd": [
            "IlluminateFoundationComposerScripts::postInstall",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "IlluminateFoundationComposerScripts::postUpdate",
            "php artisan optimize"
        ]
     },
    "config": {
        "preferred-install": "dist"
    }
  }


my php version is 8.0.1 and laravel framework version is 8.38.0
,I tried to reinstall composer and also change php version to 8.0.1 , but still nothing changed ,I dont know whats going on .. how to fix this? Thank you.

Source: Laravel

Leave a Reply