我的composer.json文件中存在语法错误,但我似乎无法找到错误。我已经在文件顶部有一个Laravel对象,但我也想添加Goaop,就像下面的代码一样。 我该怎么做?谢谢
//newly added code
{
"name": "goaop/goaop-laravel-bridge",
"description": "Integration bridge for Go! AOP framework",
"type": "library",
"keywords": ["bridge", "laravel", "aop", "php", "aspect"],
"require": {
"goaop/framework": "^1.0|^2.0",
"laravel/framework": "^5.0"
},
"license": "MIT",
"authors": [
{
"name": "Lisachenko Alexander",
"email": "lisachenko.it@gmail.com"
}
],
"autoload": {
"psr-4": {
"Go\\Laravel\\GoAopBridge\\": "./src"
}
}
}
答案 0 :(得分:2)
看起来您刚刚复制了package's composer.json
并将其粘贴到您的底部。这不是你安装软件包的方式。
从命令行运行:
composer require goaop/goaop-laravel-bridge
这将更新您的composer.json和.lock文件并安装该软件包。