Symfony2 composer.phar安装

时间:2013-10-06 10:32:59

标签: php symfony composer-php

您好我想安装此捆绑包:

https://packagist.org/packages/knplabs/knp-paginator-bundle

"knplabs/knp-paginator-bundle": "2.3.*@dev"

但是我不想用composer.phar更新一些东西,因为上次它在FOS包中杀死了一些捆绑功能,当我没记错的时候。

所以我只做了::

sudo php composer.phar install

但我收到了这个错误:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for symfony/framework-standard-edition 2.1.x-dev -> satisfiable by symfony/framework-standard-edition[2.1.x-dev].
    - symfony/framework-standard-edition 2.1.x-dev requires knplabs/knp-paginator-bundle 2.3.*@dev -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

这些是我对symfony和php的要求。应该够了吗?那么问题是什么?

"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.1.*",

3 个答案:

答案 0 :(得分:0)

尝试“最小稳定性”:“dev”

请参阅:http://getcomposer.org/doc/articles/troubleshooting.md

答案 1 :(得分:0)

在作曲家中添加以下行并更新作曲家

“knplabs / knp-paginator-bundle”:“dev-master”

答案 2 :(得分:0)

我也一样。然后我尝试使用 php composer.phar update 并且它有效。

希望这会有所帮助!