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 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题