0

我计划将我自己的 laravel 从 5.1 升级到 6.0,但是正如 laravel 所建议的那样,它应该是一次一步。在其中一个包中,有一个名为lucadegaspery的 oauth2 包,正如作者建议的 5.2 以上,这个包不兼容。php artisan route:list现在,随着我的进步,问题仍然存在,例如,当我想做时,需要考虑这个包。它会产生这个错误

C:\xampp\htdocs\paperinvoicer\core>php artisan route:list
PHP Fatal error:  Uncaught ReflectionException: Class LucaDegasperi\OAuth2Server\Authorizer does not exist in C:\xampp\htdocs\paperinvoicer\core\vendor\laravel\framework\src\Illuminate\Container\Container.php:809
Stack trace:
#0 C:\xampp\htdocs\paperinvoicer\core\vendor\laravel\framework\src\Illuminate\Container\Container.php(809): ReflectionParameter->getClass()
#1 C:\xampp\htdocs\paperinvoicer\core\vendor\laravel\framework\src\Illuminate\Container\Container.php(789): Illuminate\Container\Container->getDependencies(Array, Array)
#2 C:\xampp\htdocs\paperinvoicer\core\vendor\laravel\framework\src\Illuminate\Container\Container.php(644): Illuminate\Container\Container->build('App\\Exceptions\\...', Array)
#3 C:\xampp\htdocs\paperinvoicer\core\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(709): Illuminate\Container\Container->make('App\\Exceptions\\...', Array)
#4 C:\xampp\htdocs\paperinvoicer\core\vendor\laravel\framework\src\Illuminate\Container\Container.php(231): Illuminate\Foundation\Application->make('A in C:\xampp\htdocs\paperinvoicer\core\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 809
PHP Fatal error:  Uncaught ReflectionException: Class LucaDegasperi\OAuth2Server\Authorizer does not exist in C:\xampp\htdocs\paperinvoicer\core\vendor\laravel\framework\src\Illuminate\Container\Container.php:809
Stack trace:
#0 C:\xampp\htdocs\paperinvoicer\core\vendor\laravel\framework\src\Illuminate\Container\Container.php(809): ReflectionParameter->getClass()
#1 C:\xampp\htdocs\paperinvoicer\core\vendor\laravel\framework\src\Illuminate\Container\Container.php(789): Illuminate\Container\Container->getDependencies(Array, Array)
#2 C:\xampp\htdocs\paperinvoicer\core\vendor\laravel\framework\src\Illuminate\Container\Container.php(644): Illuminate\Container\Container->build('App\\Exceptions\\...', Array)
#3 C:\xampp\htdocs\paperinvoicer\core\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(709): Illuminate\Container\Container->make('App\\Exceptions\\...', Array)
#4 C:\xampp\htdocs\paperinvoicer\core\vendor\laravel\framework\src\Illuminate\Container\Container.php(231): Illuminate\Foundation\Application->make('A in C:\xampp\htdocs\paperinvoicer\core\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 809

另外,我已经删除了这个包,因为它不支持超过 5.2 的版本

我已经做了研究,有 1 天以上的时间来解决这个问题,但没有运气,包括尝试删除所有Use (this package)没有运气,早些时候我已经删除了Use (this package)每个中间件中的也没有运气

这是我的 composer.json 现在:

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.6.4",
        "laravel/framework": "5.3.*",
        "barryvdh/laravel-ide-helper": "~2.0",
        "illuminate/html": "5.0.*@dev",
        "laracasts/flash": "~1.3",
        "intervention/image": "dev-master",
        "webpatser/laravel-uuid": "1.*",
        "dingo/api": "1.0.x@dev",
        "orangehill/iseed": "2.2",
        "guzzlehttp/guzzle": "6.2",
        "veritrans/veritrans-php": "dev-master",
        "doctrine/dbal": "2.5",
        "symfony/psr-http-message-bridge": "0.2",
        "rguedes/pdfmerger": "^1.0",
        "doctrine/inflector": "1.1.x",
        "simplesoftwareio/simple-qrcode": "1.5.1",
        "maatwebsite/excel": "~2.1.0",
        "league/flysystem-aws-s3-v3": "^1.0",
        "laravel/passport": "~1.0"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "symfony/dom-crawler": "3.1.*",
        "symfony/css-selector": "3.1.*",
        "phpunit/phpunit": "~4.0",
        "phpspec/phpspec": "~2.1"
    },
    "autoload": {
        "classmap": [
            "database",
            "app/Http/Controllers/Api/V1"
        ],
        "psr-4": {
            "App\\": "app/",
            "Vendor\\" : "vendor"
        },
        "files":[
            "app/Http/helpers.php"
        ]
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php"
        ]
    },
    "scripts": {
        "post-install-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "post-create-project-cmd": [
            "php -r \"copy('.env.example', '.env');\"",
            "php artisan key:generate"
        ]
    },
    "config": {
        "preferred-install": "dist"
    }
}

如果我可以删除那些在容器中找不到的类,那就太好了,这样我就可以继续下一个版本了。

4

0 回答 0