2013-12-11 60 views
1

我正要將DoctrineExtensions添加到我的Symfony2項目中。通過StofDoctrineExtensionsBundle包含DoctrineExtensions是否安全?

在掃描文檔時,我讀到了有關包括StofDoctrineExtensionsBundle而不是手動包含它的可能性。從STOF報價捆綁Readme.md

這個捆綁在你的Symfony2項目提供集成DoctrineExtensions

也許你有任何關於通過Stof捆綁包的經驗嗎?這是否始終提供最新的穩定版本幷包含所有要求?

您寧願推薦手動集成還是與Stof捆綁集成?

回答

2

composer.json其:

"require": { 
    "php": ">=5.3.2", 
    "symfony/framework-bundle": "~2.1", 
    "gedmo/doctrine-extensions": "~2.3.1" 
} 

這意味着StofDoctrineExtensionsBundle的當前版本將嘗試並獲得2.3.1之間學說的擴展和,不包括2.4。

作曲家將負責找到使其運行所需的依賴關係。我在我的項目中包含了StofDoctrineExtensionsBundle,可以毫無問題地使用Timestampable。

我推薦使用StofDoctrineExtensionsBundle。

+0

感謝您的建議。我還在DoctrineExtension文檔中看到他們提到[Stof是一個包裝,因此可以安全使用](https://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/symfony2.md#alternative)。 –

+0

stof是Symfony2的成員之一:https://github.com/symfony?tab=members應該是安全的。 :-) –