未找到Symfony 2.3 Composer请求的包

时间:2013-07-01 20:06:07

标签: php symfony composer-php

每次尝试运行composer update时都会收到以下错误:

  

您的要求无法解析为可安装的软件包。

     

问题1       - 找不到请求的包doctrine / data-fixtures dev-master。

     

问题2        - 找不到请求的包doctrine / doctrine-fixtures-bundle dev-master。

     

潜在原因:

     

这是我的composer.json:

{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
    "psr-0": { "": "src/" }
},
"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.3.*",
    "doctrine/orm": ">=2.2.3,<2.4-dev",
    "doctrine/doctrine-bundle": "1.2.*",
    "twig/extensions": "1.0.*",
    "symfony/assetic-bundle": "2.3.*",
    "symfony/swiftmailer-bundle": "2.3.*",
    "symfony/monolog-bundle": "2.3.*",
    "sensio/distribution-bundle": "2.3.*",
    "sensio/framework-extra-bundle": "2.3.*",
    "sensio/generator-bundle": "2.3.*",
    "incenteev/composer-parameter-handler": "~2.0",
    "friendsofsymfony/user-bundle": "~2.0@dev",
    "doctrine/data-fixtures": "dev-master",
    "doctrine/doctrine-fixtures-bundle": "dev-master"
},
"scripts": {
    "post-install-cmd": [
        "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
        "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": [
        "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
        "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": "htdocs",
    "symfony-assets-install": "symlink",
    "incenteev-parameters": {
        "file": "app/config/parameters.yml"
    },
    "branch-alias": {
        "dev-master": "2.3-dev"
    }
}
}

我只是想安装数据夹具。请帮忙!

1 个答案:

答案 0 :(得分:1)

奇怪,我复制&amp;粘贴你的composer.json并做了一个“作曲家安装”,它完成没有任何问题。

我的建议是确保作曲家是最新的(运行“composer self-update”),然后尝试清除作曲家存储库缓存。以前存在缓存存储库的问题,报告分支不存在但据称已修复..

清除作曲家缓存(改编自下面的评论):

  <*>在* nix框上并在本地安装了composer,然后它应位于主目录中的“.composer / cache”中。

在具有本地作曲家的* Nix系统上:删除~/.composer/cache目录。