Skip to content

Commit

Permalink
Revert deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
Prokyonn committed Sep 13, 2023
1 parent 0f2b1da commit 02ff4bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Document/Index/ArticleIndexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,15 @@ public function remove(ArticleDocument $document/*, ?string $locale = null*/): v
}
}

/**
* @deprecated
* @see ArticleIndexer::replaceWithGhostData
*/
public function removeLocale(ArticleDocument $document, string $locale): void
{
$this->remove($document, $locale);
@\trigger_error('Calling ArticleIndexer::removeLocale() is deprecated and will be removed in future. Use ArticleIndexer::replaceWithGhostData() instead.', \E_USER_DEPRECATED);

$this->replaceWithGhostData($document, $locale);
}

public function replaceWithGhostData(ArticleDocument $document, string $locale): void
Expand Down
2 changes: 1 addition & 1 deletion Document/Subscriber/ArticleSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ public function handleRemoveLocaleLive(RemoveLocaleEvent $event)
return;
}

$this->liveIndexer->removeLocale($document, $event->getLocale());
$this->liveIndexer->remove($document, $event->getLocale());
$this->liveIndexer->flush();
}

Expand Down

0 comments on commit 02ff4bc

Please sign in to comment.