2013-04-09 37 views
1

我有一切工作,我升級我的Mac上的Mac端口,以獲得最新的軟件包。它安裝了Mongo 2.4.1,我也得到了boost @ 1.53.0_1 + no_single + no_static + python27。現在,當我嘗試在我的Symfony 2應用程序中使用相同的代碼接口,我得到:Mongo 2.4.1升級導致致命錯誤:Class'Doctrine MongoDB Util InvalidArgumentException'找不到

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,但這不起作用。

有人可以幫我嗎?

回答

1

這已在幾個月前發佈的doctrine/mongodb軟件包1.0.2版中得到修復。如果您想確認,實際承諾是b317c8e

我建議您在composer.json文件中明確要求doctrine/mongodb-odm和可能的doctrine/mongodb,而不是依賴於該包的內部依賴關係。此外,您的composer.lock文件可能指向doctrine/mongodb的過期版本,該版本仍然滿足ODM的版本要求。在這種情況下,您需要升級您的依賴關係(通過composer upgrade),這也應該升級您的鎖定文件和其中的版本/提交點。

+0

謝謝。這正是需要做的。 – kratos 2013-04-10 13:06:09

相關問題