简体   繁体   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

After composer update i get new errors作曲家更新后,我收到新错误

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 config 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.*",

not sure but try extends AsbtractController instead of Controller and use dependancy injection, i had similar problem with bundle for pagination不确定,但尝试扩展 AsbtractController 而不是 Controller 并使用依赖注入,我在用于分页的包中遇到了类似的问题

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


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

, maybe it's that ,也许是这样

That issue shows when auto update doctrine-bundle (to "version": "2.0.2" )该问题显示何时自动更新学说捆绑(到 "version": "2.0.2" )

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

This work.这项工作。

Here are more pieces of information https://github.com/symfony/symfony/issues/29810这里有更多信息https://github.com/symfony/symfony/issues/29810

暂无
暂无

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

相关问题 “传递给 ApiPlatform\\Core\\Bridge\\Doctrine\\Orm\\Metadata\\Property\\DoctrineOrmPropertyMetadataFactory::__construct() 的参数 1 必须是一个实例……” - “Argument 1 passed to ApiPlatform\Core\Bridge\Doctrine\Orm\Metadata\Property\DoctrineOrmPropertyMetadataFactory::__construct() must be an instance…” 类型错误:传递给Symfony \\ Bridge \\ Twig \\ Extension \\ SecurityExtension :: __ construct()的参数1必须是的实例 - Type error: Argument 1 passed to Symfony\Bridge\Twig\Extension\SecurityExtension::__construct() must be an instance of 传递给 DoctrineDataCollector::__construct() 的参数 1 必须是 Doctrine\Common\Persistence\ManagerRegistry 的一个实例 - Argument 1 passed to DoctrineDataCollector::__construct() must be an instance of Doctrine\Common\Persistence\ManagerRegistry Doctrine - 传递给 __construct 的参数必须是一个数组 - Doctrine - Argument passed to __construct must be an array 传递给 Symfony\Bridge\Doctrine\Form\ChoiceList\IdReader::getIdValue() 的参数 1 必须是 object 或 null,给定的整数 - Argument 1 passed to Symfony\Bridge\Doctrine\Form\ChoiceList\IdReader::getIdValue() must be an object or null, int given 可捕获的致命错误:传递给Controller :: __ construct()的参数1必须是Doctrine \\ ORM \\ EntityManager的实例,未给出任何实例,称为 - Catchable Fatal Error: Argument 1 passed to Controller::__construct() must be an instance of Doctrine\ORM\EntityManager, none given, called 传递给:: __ construct()的参数1必须是DateTimeInterface的实例 - Argument 1 passed to ::__construct() must be an instance of DateTimeInterface 可捕获的致命错误:传递给AppBundle \\ Form \\ TagType :: __ construct()的参数1必须是Doctrine \\ ORM \\ EntityRepository的实例,未给出任何实例, - Catchable Fatal Error: Argument 1 passed to AppBundle\Form\TagType::__construct() must be an instance of Doctrine\ORM\EntityRepository, none given, 错误:传递给 App\Repository\FooRepository::__construct() 的参数 1 必须是 Doctrine\Common\Persistence\ManagerRegistry 的实例 - Error: Argument 1 passed to App\Repository\FooRepository::__construct() must be an instance of Doctrine\Common\Persistence\ManagerRegistry 传递给__construct()的参数1必须是GuzzleHttp \\ Client的实例 - Argument 1 passed to __construct() must be an instance of GuzzleHttp\Client
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM