2012-06-18 38 views
0

installation instructions,我加的Symfony2 - 斌/厂商安装 - 无法导入资源config.yml

#depts 
[SonataAdminBundle] 
    git=git://github.com/sonata-project/SonataAdminBundle.git 
    target=/bundles/Sonata/AdminBundle 
    version=origin/2.0 

而且

#app/config/config.yml 
sonata_block: 
    default_contexts: [cms] 
    blocks: 
     sonata.admin.block.admin_list: 
      contexts: [admin] 

     sonata.block.service.text: 
     sonata.block.service.action: 
     sonata.block.service.rss: 

推出更新

$ php bin/vendors install 

所有供应商捆绑得到更新/安装,但在它被写入

[Symfony\Component\Config\Exception\FileLoaderLoadException]     
Cannot import resource "/var/www/Symfony/app/config/config.yml" from "/var/ 
www/Symfony/app/config/config_dev.yml".          

[InvalidArgumentException]             
There is no extension able to load the configuration for "sonata_block" (in 
/var/www/Symfony/app/config/config.yml). Looked for namespace "sonata_bloc 
k", found "framework", "security", "twig", "monolog", "swiftmailer", "doctr 
ine", "assetic", "sensio_framework_extra", "jms_security_extra", "glide_rep 
ort", "fos_user", "glide_user", "acme_demo", "web_profiler", "sensio_distri 
bution"                  

[Symfony\Component\Config\Exception\FileLoaderLoadException]     
Cannot import resource "/var/www/Symfony/app/config/config.yml" from "/var/ 
www/Symfony/app/config/config_dev.yml".          

[InvalidArgumentException]             
There is no extension able to load the configuration for "sonata_block" (in 
/var/www/Symfony/app/config/config.yml). Looked for namespace "sonata_bloc 
k", found "framework", "security", "twig", "monolog", "swiftmailer", "doctr 
ine", "assetic", "sensio_framework_extra", "jms_security_extra", "glide_rep 
ort", "fos_user", "glide_user", "acme_demo", "web_profiler", "sensio_distri 
bution"                  

可能是什么原因?

+1

你注册捆绑到你的内核?在'AppKernel.php'中? :) –

+0

我将注册它时,它会很好地安装(我试图做):) –

+0

你的问题是其实你的包没有注册!您正在尝试加载与未注册的Bundle相关的配置,因此Loader不知道如何处理它。 –

回答

2

SonataAdminBundle有很多依赖项,因为它是按照您引用的说明编写的。这些都是:

SonataCacheBundle 
    SonataBlockBundle 
    SonatajQueryBundle 
    KnpMenuBundle (Version 1.1.*) 
    Exporter 

你可能错过了SonataBlockBundle(至少是错误表明你没有延伸到从config.yml加载sonata_block

+0

我不知道我们必须手动管理依赖关系。我虽然它是在git包管理。我会尝试这种方式。 –

相关问题