Skip to content

Commit

Permalink
Disable entity manager clearing in Doctrine ORM result set factory (t…
Browse files Browse the repository at this point in the history
…emporarily, until better, non-breaking solution is found)
  • Loading branch information
Kreyu authored Jul 17, 2024
1 parent 3ecaa0b commit 5f2d1fe
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ public function testCreateWithLimitGreaterThanBatchSize()
$paginator->method('getIterator')->willReturn(new \ArrayIterator(array_fill(0, 25, 'item')));

$entityManager = $this->createMock(EntityManagerInterface::class);
$entityManager->expects($this->exactly(4))->method('clear');

// TODO: Make clearing configurable and optional.
// The code below alone breaks the UnitOfWork when rendering
// data tables with previously loaded entities on the same page.
// $entityManager->expects($this->exactly(4))->method('clear');

$query = $this->createMock(Query::class);
$query->method('getFirstResult')->willReturn(0);
Expand Down

0 comments on commit 5f2d1fe

Please sign in to comment.