private $content;
/**
- * @var date
+ * @var \DateTime
*
* @ORM\Column(name="created_at", type="datetime")
*
private $createdAt;
/**
- * @var date
+ * @var \DateTime
*
* @ORM\Column(name="updated_at", type="datetime")
*
* Set created_at.
* Only used when importing data from an other service.
*
- * @param DateTime $createdAt
+ * @param \DateTime $createdAt
*
* @return Entry
*/
}
/**
- * @return DateTime
+ * @return \DateTime
*/
public function getCreatedAt()
{
}
/**
- * @return DateTime
+ * @return \DateTime
*/
public function getUpdatedAt()
{
use PhpAmqpLib\Message\AMQPMessage;
use Wallabag\ImportBundle\Import\AbstractImport;
use Wallabag\UserBundle\Repository\UserRepository;
+use Wallabag\CoreBundle\Entity\Entry;
+use Wallabag\CoreBundle\Entity\Tag;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
try {
$this->em->flush();
- $this->em->clear($entry);
+
+ // clear only affected entities
+ $this->em->clear(Entry::class);
+ $this->em->clear(Tag::class);
} catch (\Exception $e) {
$this->logger->warning('Unable to save entry', ['entry' => $storedEntry, 'exception' => $e]);
use Doctrine\ORM\EntityManager;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Entity\Entry;
+use Wallabag\CoreBundle\Entity\Tag;
use Wallabag\UserBundle\Entity\User;
use OldSound\RabbitMqBundle\RabbitMq\Producer;
// flush every 20 entries
if (($i % 20) === 0) {
$this->em->flush();
- $this->em->clear($entry);
+
+ // clear only affected entities
+ $this->em->clear(Entry::class);
+ $this->em->clear(Tag::class);
}
++$i;
}