Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/symfony/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Symfony 2.3安装捆绑包_Symfony_Composer Php - Fatal编程技术网

Symfony 2.3安装捆绑包

Symfony 2.3安装捆绑包,symfony,composer-php,Symfony,Composer Php,我正在使用最新的Symfony-2.3 我正在尝试安装SonataAdminBundles。。在教程中说-将此添加到deps文件 [SonataAdminBundle] git=http://github.com/sonata-project/SonataAdminBundle.git target=/bundles/Sonata/AdminBundle [SonataDoctrineORMAdminBundle] git=http://github.com/sonat

我正在使用最新的Symfony-2.3

我正在尝试安装SonataAdminBundles。。在教程中说-将此添加到deps文件

[SonataAdminBundle]
    git=http://github.com/sonata-project/SonataAdminBundle.git
    target=/bundles/Sonata/AdminBundle

[SonataDoctrineORMAdminBundle]
    git=http://github.com/sonata-project/SonataDoctrineORMAdminBundle.git
    target=/bundles/Sonata/DoctrineORMAdminBundle

[SonatajQueryBundle]
    git=http://github.com/sonata-project/SonatajQueryBundle.git
    target=/bundles/Sonata/jQueryBundle

[KnpMenuBundle]
    git=https://github.com/KnpLabs/KnpMenuBundle.git
    target=/bundles/Knp/Bundle/MenuBundle

[KnpMenu]
    git=https://github.com/KnpLabs/KnpMenu.git
    target=/knp/menu
我读到这个版本中没有deps文件,现在有composer.json,但是当我打开composer.json时,我看到了另一种语法

如何通过composer安装此捆绑包


谢谢

是的,您应该尽可能使用composer安装依赖项。这是推荐的方法

symfony的
2.3
版本不再包含
bin/vendors
脚本,因为composer提供了解决依赖关系的可靠方法

您只需在
composer.json
中向项目的
require
配置中添加以下内容,然后运行
composer update-o
,即可通过composer获取依赖项:

"require": { 
    "...",
    "sonata-project/doctrine-orm-admin-bundle": "2.2.7",
}
sonata project/admin bundle
sonata project/admin bundle
有依赖关系,后者又与
sonata project/jquery bundle
knplabs/knp menu bundle
(其本身与
knplabs/knp menu
有依赖关系)


Composer将自动获取所有需要的依赖项。

因此我只需要安装“sonata project/orm管理包”:“2.2.7”-其他包将自动安装?如果您能给我一些联系人(Skype将非常好)以获得进一步建议,我将非常感谢。是的,其他包将自动安装。你可以在
freenode
IRC网络的
#symfony
频道上找到我作为用户
nifr
。好吧,我在IRC上不是很活跃,你没有skype吗?