0

我正在尝试通过 composer.json 将一个模块安装到 Zend Framework 2 中,但我遇到了语法错误

这是实际的代码本身:

{
"name" : "zendframework/skeleton-application",
"description" : "Skeleton Application for ZF2",
"require" : {
"php" : ">=5.4",
"zendframework/zendframework" : ">2.2.0rc1",
},
"keywords" : [ "framework", "zf2" ],
"license" : "BSD-3-Clause",
"homepage" : "http://framework.zend.com/"
}

{
"name": "speckcommerce/speck-paypal",
"description": "A generic module for adding PayPal support to a ZF2 application.",
"type": "library",
"keywords": [ "zf2" ],
"homepage": "http://github.com/speckcommerce/SpeckPaypal",
"authors": [
{

"name": "Stephen Rhoades",
"email": "steve@stephenrhoades.com",
"homepage": "http://www.stephenrhoades.com"
}
],
"require": {=5.4",
"zendframework/zendframework": "2.*"
},
"autoload": {
"psr-0": {
"SpeckPaypal": "src/"
},
"classmap": [
"./" ]
}
}

错误消息是“ [Seld\JsonLint\ParsingException]
"composer.json" does not contain valid JSON
Parse error on line 6:
"keywords" : {
----------------- --------^
预期:'STRING' - 您似乎有一个额外的尾随逗号

我知道我做错了什么,任何帮助将不胜感激。谢谢!

4

1 回答 1

0

你有一些错误的逗号:

{
   "name" : "zendframework/skeleton-application",
   "description" : "Skeleton Application for ZF2",
   "require" : { 
     "php" : ">=5.4", 
     "zendframework/zendframework" : ">2.2.0rc1", ///<-- delete this comma
   },
   "keywords" : [ "framework", "zf2" ], 
   "license" : "BSD-3-Clause",
   "homepage" : "http://framework.zend.com/" 
}
于 2013-11-06T17:23:35.057 回答