2013-07-16 56 views
1

我有一个作曲家的问题。 当我在cmd中使用此命令作曲家找不到包joeyofsymfony/user-bundle

php composer.phar require friendsofsymfony/user-bundle 

我得到这个消息

Please provide a version constraint for the friendsofsymfony/user-bundle requirement: 2.0.*@dev 
composer.json has been updated 
Loading composer repositories with package information 
Updating dependencies (including require-dev) 
Your requirements could not be resolved to an installable set of packages. 

Problem 1 
    - The requested package friendsofsymfony/user-bundle could not be found in any version, there may be a typo in the package name. 

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. 

Installation failed, reverting composer.json to its original content. 

和composer.json文件:

{ 
"name": "symfony/framework-standard-edition", 
"description": "The \"Symfony Standard Edition\" distribution", 
"autoload": { 
    "psr-0": { "": "src/" } 
}, 
"require": { 
    "php": ">=5.3.3", 
    "symfony/symfony": "2.2.*", 
    "doctrine/orm": "~2.2,>=2.2.3", 
    "doctrine/doctrine-bundle": "1.2.*", 
    "twig/extensions": "1.0.*", 
    "symfony/assetic-bundle": "2.1.*", 
    "symfony/swiftmailer-bundle": "2.2.*", 
    "symfony/monolog-bundle": "2.2.*", 
    "sensio/distribution-bundle": "2.2.*", 
    "sensio/framework-extra-bundle": "2.2.*", 
    "sensio/generator-bundle": "2.2.*", 
    "jms/security-extra-bundle": "1.4.*", 
    "jms/di-extra-bundle": "1.3.*", 
    "gregwar/captcha-bundle": "dev-master", 
    "eko/feedbundle": "dev-master" 
}, 
"scripts": { 
    "post-install-cmd": [ 
     "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 
     "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 
     "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 
     "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" 
    ], 
    "post-update-cmd": [ 
     "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 
     "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 
     "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 
     "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" 
    ] 
}, 
"config": { 
    "bin-dir": "bin" 
}, 
"minimum-stability": "dev", 
"extra": { 
    "symfony-app-dir": "app", 
    "symfony-web-dir": "web", 
    "branch-alias": { 
     "dev-master": "2.2-dev" 
    } 
} 
} 

作曲版本6a1262e675b5c1c2c7b1cc58a14028f67885b880

有人可以告诉我什么我做错了,请吗?

回答

2

你肯定有 {"minimum-stability": "stable"},在你composer.json,将其设置为

{"minimum-stability": "dev"} 

这是因为你选择的FOSUserBundle (2.0.*@dev)开发版和作曲家无法找到该版本由于最小的稳定性。

+0

我已经这样做了。最低限度的稳定性是开发。将把我的composer.json放在上面的文章中。 –

+0

直接在composer.json中放入“friendsofsymfony/user-bundle”:“2.0.*@dev”,然后运行composer.phar更新 – rpg600

+0

获取同样的错误 - 在任何版本中都找不到所需的软件包friendsofsymfony/user-bundle,包名中可能有拼写错误。 –

0

刚才有同样的问题,并有轻微的变化到什么Rpg600建议解决了这个问题:

PUT“friendsofsymfony /用户捆绑”:“2.0.*@dev”直接在composer.json,然后运行

$ composer.phar update friendsofsymfony/user-bundle 

我做什么Rpg600建议唯一不同的是指定捆绑更新但对我来说这个工作。