我让一切正常,我在Mac上升级了我的mac端口以获取最新的软件包。它安装了Mongo 2.4.1,我也得到了升级@ 1.53.0_1 + no_single + no_static + python27。现在,当我尝试使用Symfony 2应用程序中的相同代码进行接口时,我得到:
Fatal error: Class 'Doctrine\MongoDB\Util\InvalidArgumentException' not found in /Users/saudfaisal/Sites/dailytamatar.com/vendor/doctrine/mongodb/lib/Doctrine/MongoDB/Util/ReadPreference.php on line 63
我的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.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.*@dev"
}, "minimum-stability": "stable",
"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"
}
}
我知道过去有一个提升问题,一个人不得不回滚来提升@ 1.49.0_0但是这次不起作用。
有人能帮助我吗?
答案 0 :(得分:1)
这在几个月前发布的doctrine/mongodb
软件包的1.0.2版本中已得到修复。如果您想确认,实际提交为b317c8e。
我建议在doctrine/mongodb-odm
文件中明确要求doctrine/mongodb
和composer.json
,而不是依赖于bundle的内部依赖。此外,您的composer.lock
文件可能指向过时的doctrine/mongodb
版本,但仍满足ODM的版本要求。在这种情况下,您需要升级依赖项(通过composer upgrade
),这也应该升级您的锁文件及其中的版本/提交点。