我的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"
}
}
}
看起来您刚刚复制了包的composer.json
并将其粘贴到您的底部。这不是您安装软件包的方式。
从命令行运行:
composer require goaop/goaop-laravel-bridge
这将更新您的 composer.json 和 .lock 文件并安装软件包。