Skip to content

Commit

Permalink
Fix deprecations (#21)
Browse files Browse the repository at this point in the history
* Resolve deprecations in DoctrineWriter

* Update testFlushAndClear in DoctrineWriterTest

Co-authored-by: Sven Krefeld <[email protected]>
  • Loading branch information
ddeboer and svenkrefeld authored Mar 9, 2022
1 parent 6ed8903 commit d8c111d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/DoctrineWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public function writeItem(array $item): void
public function flush()
{
$this->objectManager->flush();
$this->objectManager->clear($this->objectName);
$this->objectManager->clear();
}

/**
Expand Down
3 changes: 1 addition & 2 deletions tests/DoctrineWriterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d8c111d

Please sign in to comment.