【问题标题】:Why is Symfony 2 installing all DEV versions of vendor modules?为什么 Symfony 2 安装所有 DEV 版本的供应商模块?
【发布时间】:2012-12-31 06:51:14
【问题描述】:

所以我试图安装 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 版本的包?

【问题讨论】:

  • 你能显示 Composer 的输出吗?

标签: symfony symfony-2.1 composer-php


【解决方案1】:

你可以用dev标记它:

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

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

可以在here找到相关文档。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-15
    • 1970-01-01
    • 1970-01-01
    • 2022-08-24
    • 2015-04-11
    • 2019-01-08
    • 2023-03-24
    • 2011-08-24
    相关资源
    最近更新 更多