0

当我要为Zend 框架 2安装ZendSearch时,使用这一行命令

php composer.phar require zendframework/zendsearch:0.1

我收到此错误消息:

在此处输入图像描述

作曲家.json

 {
    "name": "zendframework/zendsearch",
    "description": "a general purpose text search engine written entirely in PHP 5",
    "type": "library",
    "license": "BSD-3-Clause",
    "keywords": [
        "zf2",
        "lucene"
    ],
    "homepage": "http://packages.zendframework.com/",
    "autoload": {
        "psr-0": {
            "ZendSearch": "library/"
        }
    },
    "repositories": [
        {
            "type": "composer",
            "url": "http://packages.zendframework.com/"
        }
    ],
    "require": {
        "php": ">=5.3.3",
        "zendframework/zend-stdlib": "2.*"
    }
}
4

1 回答 1

1

正如您可以在 packagegist 网站上查看的那样

https://packagist.org/search/?q=zendsearch

没有可以使用的“zendsearch”包

所以你必须手动将它添加到存储库 composer.json 部分。

你本地的 composer.json:

...

"prefer-stable": true, 
"minimum-stability": "dev",

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/zendframework/ZendSearch"
    }
],

"require": {
    "zendframework/zendsearch": ">=0.1"
},

...
于 2013-07-23T08:25:25.267 回答