【发布时间】:2019-11-14 12:58:07
【问题描述】:
我们目前正在重写我们的代码库,进行此项更改:
// From
public function __construct(EntityManager $em){} // then use $this->em->getRepository(Example::class)
// To:
public function __construct(ExampleRepository $exampleRepo){}
为了方便起见,我们将EntityReposity 更新为ServiceEntityRepository。这对单元测试有很大帮助,并且在大多数的情况下运行良好。
但在极少数情况下,我们会得到502 Bad Gateway,如果我们运行php bin/console
我们得到一个“分段错误”,这(至少在我们的理解中)意味着 C 刚刚中断。
在我们的研究中,我们创建了这样的理论:ServiceEntityRepository 加载 EntityManager,EM 加载 Repos,然后再加载 EM,等等。
我们的软件包目前根据各地的每个人的建议都是最新的,我希望这里有人能提出解决方案,现在或将来。那么,有人知道吗?
【问题讨论】:
标签: php symfony segmentation-fault doctrine entitymanager