【问题标题】:SonataAdminBundle with Symfony ~2.4 - how to install?带有 Symfony ~2.4 的 SonataAdminBundle - 如何安装?
【发布时间】:2014-02-10 02:59:43
【问题描述】:

我刚刚建立了一个新的 Symfony 2.4 项目并尝试安装 SonataAdminBundle (instruction),但我又遇到了错误。

历史

# 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

好吧,我在step 1.2 上失败了,错误

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]

有趣的线路:

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

有人知道该怎么做吗?提前非常感谢!

【问题讨论】:

  • 出了什么问题?请告诉我们一些错误...
  • 文档的作曲家有什么问题?至少尝试使用那个,然后向我们展示你得到的错误,而不是仅仅向我们展示一个干净的 composer.json 和 AppKernel.php
  • @WouterJ 请查看我的编辑,谢谢!
  • @GeertWille 请检查我的编辑,谢谢!

标签: php symfony composer-php sonata-admin


【解决方案1】:

您必须同时注册 SonataAdminBundle 和 SonataDoctrineOrmAdminBundle。您好像忘记激活 SonataAdminBundle。

【讨论】:

  • 感谢您的建议。在尝试安装 SonataDoctrineORMAdminBundle 之前,我必须执行步骤 1.3 和 1.4。
猜你喜欢
  • 2020-04-02
  • 2012-07-02
  • 2020-10-02
  • 1970-01-01
  • 2022-08-10
  • 2016-12-28
  • 2021-08-11
  • 1970-01-01
  • 2015-06-11
相关资源
最近更新 更多