From d8c111d8ca5b5da7834b3d5b4918c079bb518f45 Mon Sep 17 00:00:00 2001 From: David de Boer Date: Wed, 9 Mar 2022 17:03:24 +0100 Subject: [PATCH] Fix deprecations (#21) * Resolve deprecations in DoctrineWriter * Update testFlushAndClear in DoctrineWriterTest Co-authored-by: Sven Krefeld --- src/DoctrineWriter.php | 2 +- tests/DoctrineWriterTest.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/DoctrineWriter.php b/src/DoctrineWriter.php index 08256db..aa6cbb5 100644 --- a/src/DoctrineWriter.php +++ b/src/DoctrineWriter.php @@ -193,7 +193,7 @@ public function writeItem(array $item): void public function flush() { $this->objectManager->flush(); - $this->objectManager->clear($this->objectName); + $this->objectManager->clear(); } /** diff --git a/tests/DoctrineWriterTest.php b/tests/DoctrineWriterTest.php index fcfa841..13e86d9 100644 --- a/tests/DoctrineWriterTest.php +++ b/tests/DoctrineWriterTest.php @@ -291,8 +291,7 @@ public function testFlushAndClear() $em = $this->getEntityManager(); $em->expects($this->once()) - ->method('clear') - ->with($this->equalTo(self::TEST_ENTITY)); + ->method('clear'); $writer = new DoctrineWriter($em, 'Port:TestEntity'); $writer->finish();