Migrate to constructor promoted properties

This commit is contained in:
Yassine Guedidi
2025-04-05 13:54:27 +02:00
parent 4168727f36
commit 1d5674a230
85 changed files with 441 additions and 854 deletions

View File

@ -15,11 +15,6 @@ use Wallabag\Helper\TagsAssigner;
abstract class AbstractImport implements ImportInterface
{
protected $em;
protected $logger;
protected $contentProxy;
protected $tagsAssigner;
protected $eventDispatcher;
protected $producer;
protected $user;
protected $markAsRead;
@ -28,13 +23,13 @@ abstract class AbstractImport implements ImportInterface
protected $importedEntries = 0;
protected $queuedEntries = 0;
public function __construct(EntityManagerInterface $em, ContentProxy $contentProxy, TagsAssigner $tagsAssigner, EventDispatcherInterface $eventDispatcher, LoggerInterface $logger)
{
$this->em = $em;
$this->logger = $logger;
$this->contentProxy = $contentProxy;
$this->tagsAssigner = $tagsAssigner;
$this->eventDispatcher = $eventDispatcher;
public function __construct(
protected EntityManagerInterface $em,
protected ContentProxy $contentProxy,
protected TagsAssigner $tagsAssigner,
protected EventDispatcherInterface $eventDispatcher,
protected LoggerInterface $logger,
) {
}
public function setLogger(LoggerInterface $logger): void
@ -178,9 +173,7 @@ abstract class AbstractImport implements ImportInterface
$entryToBeFlushed = [];
// clear only affected entities
$this->em->clear(Entry::class);
$this->em->clear(Tag::class);
$this->em->clear();
}
++$i;
}