繁体   English   中英

传递给 Sonata\\PageBundle\\Entity\\BlockInteractor::__construct() 的参数 1 必须是 Symfony\\Bridge\\Doctrine\\RegistryInterface 的实例

[英]Argument 1 passed to Sonata\PageBundle\Entity\BlockInteractor::__construct() must be an instance of Symfony\Bridge\Doctrine\RegistryInterface

作曲家更新后,我收到新错误

Argument 1 passed to Sonata\PageBundle\Entity\BlockInteractor::__construct() must be an instance of Symfony\Bridge\Doctrine\RegistryInterface, instance of Doctrine\Bundle\DoctrineBundle\Registry given,

symfony 配置

    "sonata-project/admin-bundle": "^3.48",
    "sonata-project/doctrine-orm-admin-bundle": "^3.9",
    "sonata-project/page-bundle": "^3.11",
    "sonata-project/translation-bundle": "^2.4",
    "sonata-project/user-bundle": "^4.3",
    "symfony/console": "4.3.*",
    "symfony/dotenv": "4.3.*",
    "symfony/flex": "^1.1",
    "symfony/framework-bundle": "4.3.*",

不确定,但尝试扩展 AsbtractController 而不是 Controller 并使用依赖注入,我在用于分页的包中遇到了类似的问题

 //the use for my example
use Knp\Component\Pager\PaginatorInterface; 


public function recap(Request $request, PaginatorInterface $paginator)

,也许是这样

该问题显示何时自动更新学说捆绑(到 "version": "2.0.2" )

 "doctrine/doctrine-bundle": "1.12.2",

这项工作。

这里有更多信息https://github.com/symfony/symfony/issues/29810

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM