1

所以我试图安装 DoctrineMongoDBBundle 并且它所说的部分说明是将以下内容添加到我的作曲家文件中:

{
    "require": {
        "doctrine/mongodb-odm-bundle": "3.0.*"
    },
    "minimum-stability": "dev"
}

所以我添加了上面的内容,我的作曲家文件如下所示:

{
    "name": "symfony/framework-standard-edition",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/" }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.1.*",
        "doctrine/orm": ">=2.2.3,<2.4-dev",
        "doctrine/doctrine-bundle": "1.0.*",
        "twig/extensions": "1.0.*@dev",
        "symfony/assetic-bundle": "2.1.*",
        "symfony/swiftmailer-bundle": "2.1.*",
        "friendsofsymfony/user-bundle": "*",
        "friendsofsymfony/rest-bundle": "*",
        "jms/serializer-bundle": "*",
        "symfony/monolog-bundle": "2.1.*",
        "sensio/distribution-bundle": "2.1.*",
        "sensio/framework-extra-bundle": "2.1.*",
        "sensio/generator-bundle": "2.1.*",
        "jms/security-extra-bundle": "1.2.*",
        "jms/di-extra-bundle": "1.1.*",
        "kriswallsmith/assetic": "1.1.*@dev",
        "doctrine/mongodb-odm-bundle": "3.0.*"
    },  "minimum-stability": "dev",
    "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"
        ]
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web"
    }
}

现在,当我运行 sudo php composer.phar update 时,它​​删除了所有捆绑包并安装了它们的开发版本。

我如何获得除 Mongo 捆绑包之外的非 DEV 版本的捆绑包?

4

1 回答 1

5

您可以使用以下标签对其进行标记dev

{
    ...,
    "require": {
        ...,
        "doctrine/mongodb-odm-bundle": "3.0.*@dev"
    }
}

并删除该minimum-stability属性,该属性将默认恢复为稳定状态。

可以在此处找到有关此的文档。

于 2012-12-30T17:19:39.500 回答