当我想为Zend框架2安装ZendSearch时出现问题

时间:2013-07-23 01:08:01

标签: php zend-framework2 zend-search-lucene

当我想为 Zend framework 2 安装 ZendSearch 时,使用此行commande

php composer.phar require zendframework/zendsearch:0.1

我收到此错误消息:

enter image description here

composer.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.*"
    }
}

1 个答案:

答案 0 :(得分:1)

您可以查看包装网站

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

...