所以我试图安装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更新时,它删除了所有软件包并安装了它们的开发版本。
除Mongo捆绑包外,如何获得非DEV版本的捆绑包?
答案 0 :(得分:5)
您可以使用dev
标记
{
...,
"require": {
...,
"doctrine/mongodb-odm-bundle": "3.0.*@dev"
}
}
并删除minimum-stability
属性,该属性将默认恢复稳定。
可以找到有关此内容的文档here。