Disable Soft Deleteable filter for hard delete record doesn't work
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to disable "Soft Deleteable" filter during functional testing and I do it as follow: First option: tried to disable at tearDown() in my test: protected function tearDown() { parent::tearDown(); $entityUser = $this->em->getRepository("UserSecurityBundle:User")->find($this->user->getUser()->getId()); $filter = $this->em->getFilters()->disable('softdeleteable'); $this->em->remove($entityUser); $this->em->flush(); $this->em->close(); } Didn't work. Second option: make a doctrine_test.yml and import in config_test.yml: imports: - {