2013-07-16 53 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建議唯一不同的是指定捆綁更新但對我來說這個工作。