将SpeckPaypal模块安装到ZF2中

时间:2013-11-06 18:53:11

标签: zend-framework2

我遇到通过composer将此模块安装到ZF2中的问题。我编辑了zend framework 2附带的composer.json文件,但是当我运行命令php composer.phar install时它不会安装。

这是我的composer.json文件的样子:

"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": {

"php": ">=5.4",

"zendframework/zendframework": "2.*"

},

"autoload": {

"psr-0": {

   "SpeckPaypal": "src/"
},

"classmap": [
  "./"
]

"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" }

可以在https://github.com/speckcommerce/SpeckPaypal

找到来源

谢谢!

2 个答案:

答案 0 :(得分:0)

你应该

composer require speckcommerce/speck-paypal:dev-master
来自项目根目录的

。 SpeckPaypal模块中的composer.json无法帮助您:D

答案 1 :(得分:0)

如果你还在为此努力奋斗,那就不知道了。但看来speck的作曲家json并不完全正确。

ZF2模块的可接受结构使module.php超出了标准psr-0自动加载器的范围;大多数模块在其类图部分中定义./Module.php,以https://github.com/zendframework/ZendDeveloperTools/blob/master/composer.json为例。