Skip to content

Commit

Permalink
Use Emoji in String component
Browse files Browse the repository at this point in the history
  • Loading branch information
smnandre committed Dec 19, 2023
1 parent 746cec7 commit 04d802c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Component/String/Slugger/AsciiSlugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Component\String\Slugger;

use Symfony\Component\Intl\Transliterator\EmojiTransliterator;
use Symfony\Component\Emoji\EmojiTransliterator;
use Symfony\Component\String\AbstractUnicodeString;
use Symfony\Component\String\UnicodeString;
use Symfony\Contracts\Translation\LocaleAwareInterface;
Expand Down Expand Up @@ -92,7 +92,7 @@ public function getLocale(): string
public function withEmoji(bool|string $emoji = true): static
{
if (false !== $emoji && !class_exists(EmojiTransliterator::class)) {
throw new \LogicException(sprintf('You cannot use the "%s()" method as the "symfony/intl" package is not installed. Try running "composer require symfony/intl".', __METHOD__));
throw new \LogicException(sprintf('You cannot use the "%s()" method as the "symfony/emoji" package is not installed. Try running "composer require symfony/emoji".', __METHOD__));
}

$new = clone $this;
Expand Down

0 comments on commit 04d802c

Please sign in to comment.