Updated to latest doctrine versions, solving deprecations

This commit is contained in:
Alejandro Celaya
2019-11-20 20:03:06 +01:00
parent 115ca0da0f
commit af0ed6135e
10 changed files with 30 additions and 38 deletions

View File

@@ -43,10 +43,8 @@ class VisitsTracker implements VisitsTrackerInterface
$visit = new Visit($shortUrl, $visitor);
/** @var ORM\EntityManager $em */
$em = $this->em;
$em->persist($visit);
$em->flush($visit);
$this->em->persist($visit);
$this->em->flush();
$this->eventDispatcher->dispatch(new ShortUrlVisited($visit->getId()));
}