即使我的composer.json看起来不错,我仍然遇到此错误。
这是我的作曲家文件
{
"name": "emmajiugo/chuck-norris-jokes",
"description": "Create random Chuck Norris Jokes",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "emmajiugo",
"email": "emmajiugo@gmail.com"
}
],
"require": {},
"autoload": {
"psr-4": {
"Emmajiugo\\ChuckNorrisJokes\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Emmajiugo\\ChuckNorrisJokes\\Test": "tests"
}
},
"require-dev": {
"phpunit/phpunit": "^8.0"
}
}
我尝试运行作曲家自我更新,但仍然遇到错误。
有人请指教。
答案 0 :(得分:2)
测试后,您缺少反斜杠。您的composer.json文件应如下所示:
{
"name": "emmajiugo/chuck-norris-jokes",
"description": "Create random Chuck Norris Jokes",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "emmajiugo",
"email": "emmajiugo@gmail.com"
}
],
"require": {},
"autoload": {
"psr-4": {
"Emmajiugo\\ChuckNorrisJokes\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Emmajiugo\\ChuckNorrisJokes\\Test\\": "tests/"
}
},
"require-dev": {
"phpunit/phpunit": "^8.0"
}
}