Skip to content

Commit

Permalink
fix deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
yurikuzn committed Nov 11, 2024
1 parent 33fd440 commit 463edb8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function run(Data $data): void
continue;
}

$queueItem = $this->entityManager->getEntity('RealEstateSendMatchesQueueItem');
$queueItem = $this->entityManager->getNewEntity('RealEstateSendMatchesQueueItem');

$queueItem->set([
'requestId' => $entity->getId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ private function sendMatchesEmail($data): void
}

foreach ($property->getLinkMultipleIdList('images') as $attachmentId) {
$attachment = $this->entityManager->getEntity('Attachment', $attachmentId);
$attachment = $this->entityManager->getEntityById('Attachment', $attachmentId);

if ($attachment) {
$attachmentList[] = $attachment;
Expand Down
6 changes: 3 additions & 3 deletions src/scripts/AfterInstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function run($container)

$entityManager = $container->get('entityManager');
if (!$entityManager->getRepository('ScheduledJob')->where(['job' => 'PropertyMatchingUpdate'])->findOne()) {
$job = $entityManager->getEntity('ScheduledJob');
$job = $entityManager->getNewEntity('ScheduledJob');
$job->set([
'name' => 'Property Matching Update',
'job' => 'PropertyMatchingUpdate',
Expand All @@ -145,9 +145,9 @@ public function run($container)
$entityManager->saveEntity($job);
}
if (!$entityManager->getRepository('ScheduledJob')->where(['job' => 'SendPropertyMatches'])->findOne()) {
$job = $entityManager->getEntity('ScheduledJob');
$job = $entityManager->getNewEntity('ScheduledJob');
$job->set([
'name' => 'Send Matched Properties to Requestors',
'name' => 'Send Matched Properties to Requesters',
'job' => 'SendPropertyMatches',
'status' => 'Active',
'scheduling' => '*/2 * * * *'
Expand Down

0 comments on commit 463edb8

Please sign in to comment.