duanjian3338 2014-02-10 02:59
浏览 42
已采纳

SonataAdminBundle与Symfony~2.4 - 如何安装?

I just set up a new Symfony 2.4 project and try to install the SonataAdminBundle (instruction), but I get errors again.

History:

# install symfony (demo works!)
composer create-project symfony/framework-standard-edition ./ 2.4.*

# install admin bundle (instruction above)
composer require sonata-project/admin-bundle
-> version: dev-master

# install DoctrineORMAdminBundle (FAILS!)
composer require sonata-project/doctrine-orm-admin-bundle
-> version: dev-master

Well, I failed on step 1.2, error:

Please provide a version constraint for the sonata-project/doctrine-orm-admin-bundle requirement: dev-master
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Generating autoload files
Updating the "app/config/parameters.yml" file

  [Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
  The service "sonata.admin.builder.orm_datagrid" has a dependency on a non-existent service "sonata.admin.builder.filter.factory".

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception

  [RuntimeException]
  An error occurred when executing the ""cache:clear --no-warmup"" command.

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [packages1] ... [packagesN]

Interesting line:

The service "sonata.admin.builder.orm_datagrid" has a dependency on a non-existent service "sonata.admin.builder.filter.factory".

Does anyone know what to do? Thanks a lot in advance!

  • 写回答

1条回答 默认 最新

  • duanfei8399 2014-02-10 17:41
    关注

    You have to register both the SonataAdminBundle and SonataDoctrineOrmAdminBundle. It looks like you forgot to activate SonataAdminBundle.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 腾讯云如何建立同一个项目中物模型之间的联系
  • ¥30 VMware 云桌面水印如何添加
  • ¥15 用ns3仿真出5G核心网网元
  • ¥15 matlab答疑 关于海上风电的爬坡事件检测
  • ¥88 python部署量化回测异常问题
  • ¥30 酬劳2w元求合作写文章
  • ¥15 在现有系统基础上增加功能
  • ¥15 远程桌面文档内容复制粘贴,格式会变化
  • ¥15 这种微信登录授权 谁可以做啊
  • ¥15 请问我该如何添加自己的数据去运行蚁群算法代码