!致命错误:未捕获的错误:类'Psr \ Log \ LogLevel'

时间:2019-03-19 10:33:48

标签: symfony package install

在我的symfony项目中,我不能让作曲家要求psr / log。我收到此错误消息:

!!  Fatal error: Uncaught Error: Class 'Psr\Log\LogLevel' not found in C:\wamp64\ww
w\my-project\vendor\symfony\debug\Debug.php:53
!!  Stack trace:
!!  #0 C:\wamp64\www\my-project\bin\console(32): Symfony\Component\Debug\Debug::ena
ble()
!!  #1 {main}
!!    thrown in C:\wamp64\www\my-project\vendor\symfony\debug\Debug.php on line 5
3
!!

2 个答案:

答案 0 :(得分:0)

好的,我用“ composer install”删除了供应商目录中的所有内容

答案 1 :(得分:0)

好,

php {
"type": "project",
"license": "proprietary",
"require": {
    "php": "^7.1.3",
    "ext-ctype": "*",
    "ext-iconv": "*",
    "sensio/framework-extra-bundle": "^5.1",
    "symfony/asset": "4.3.*",
    "symfony/console": "4.3.*",
    "symfony/dotenv": "4.3.*",
    "symfony/expression-language": "4.3.*",
    "symfony/flex": "^1.1",
    "symfony/form": "4.3.*",
    "symfony/framework-bundle": "4.3.*",
    "symfony/http-client": "4.3.*",
    "symfony/intl": "4.3.*",
    "symfony/monolog-bundle": "^3.1",
    "symfony/orm-pack": "*",
    "symfony/process": "4.3.*",
    "symfony/security-bundle": "4.3.*",
    "symfony/serializer-pack": "*",
    "symfony/swiftmailer-bundle": "^3.1",
    "symfony/translation": "4.3.*",
    "symfony/twig-bundle": "4.3.*",
    "symfony/validator": "4.3.*",
    "symfony/web-link": "4.3.*",
    "ext-http": "*",
    "symfony/yaml": "4.3.*"
},
"require-dev": {
    "symfony/debug-pack": "*",
    "symfony/maker-bundle": "^1.0",
    "symfony/profiler-pack": "*",
    "symfony/test-pack": "*",
    "symfony/web-server-bundle": "4.3.*"
},
"config": {
    "preferred-install": {
        "*": "dist"
    },
    "sort-packages": true
},
"autoload": {
    "psr-4": {
        "App\\": "src/"
    }
},
"autoload-dev": {
    "psr-4": {
        "App\\Tests\\": "tests/"
    }
},
"replace": {
    "paragonie/random_compat": "2.*",
    "symfony/polyfill-ctype": "*",
    "symfony/polyfill-iconv": "*",
    "symfony/polyfill-php71": "*",
    "symfony/polyfill-php70": "*",
    "symfony/polyfill-php56": "*"
},
"scripts": {
    "auto-scripts": {
        "cache:clear": "symfony-cmd",
        "assets:install %PUBLIC_DIR%": "symfony-cmd"
    },
    "post-install-cmd": [
        "@auto-scripts"
    ],
    "post-update-cmd": [
        "@auto-scripts"
    ]
},
"conflict": {
    "symfony/symfony": "*"
},
"extra": {
    "symfony": {
        "allow-contrib": false,
        "require": "4.3.*"
    }
}

}