如何在Symfony 2.0.x上安装WhiteOctoberPagerfantaBundle

如何在Symfony 2.0.x上安装WhiteOctoberPagerfantaBundle,symfony,pagination,doctrine-orm,Symfony,Pagination,Doctrine Orm,到目前为止,我用于Symfony2的捆绑包已经安装,修改了deps文件,然后运行命令bin/vendors install,但是对于这个捆绑包(),安装过程是使用git submodule add命令完成的,我不完全理解这个命令 git submodule add http://github.com/whiteoctober/Pagerfanta.git vendor/pagerfanta git submodule add http://github.com/whiteoctober/Whit

到目前为止,我用于Symfony2的捆绑包已经安装,修改了
deps
文件,然后运行命令
bin/vendors install
,但是对于这个捆绑包(),安装过程是使用
git submodule add
命令完成的,我不完全理解这个命令

git submodule add http://github.com/whiteoctober/Pagerfanta.git vendor/pagerfanta
git submodule add http://github.com/whiteoctober/WhiteOctoberPagerfantaBundle.git vendor/bundles/WhiteOctober/PagerfantaBundle
我假设此命令检索两个库的主版本,但文档中说,如果我使用的是Symfony 2.0.x(这是我的情况),我应该得到symfony2.0分支:

注意:如果您使用的是2.0.x版本的Symfony2,请使用此捆绑包的Symfony2.0分支。此捆绑包的主分支跟踪Symfony2主分支


如何修改git命令以获得symfony2.0分支而不是主分支?为什么有些bundle使用deps文件安装,而另一些bundle使用git子模块?区别是什么?

您仍然可以使用bin/vendors和deps系统来安装这些捆绑包/供应商

部门中

[Pagerfanta]
    git=http://github.com/whiteoctober/Pagerfanta.git
    target=/pagerfanta

[WhiteOctoberPagerfantaBundle]
    git=http://github.com/whiteoctober/WhiteOctoberPagerfantaBundle.git
    target=/bundles/WhiteOctober/PagerfantaBundle
    version=origin/symfony2.0
然后重新运行
bin/vendors install