symfony/symfony · error · LogicException
The emoji catalog "%s" is not available.
Error message
The emoji catalog "%s" is not available.
What it means
EmojiExtension::emojify() calls EmojiTransliterator::create($catalog) which relies on ICU transliteration data. If the catalog name is unknown or ICU cannot provide it, an IntlException is thrown and rewrapped as a LogicException naming the unavailable catalog.
Source
Thrown at src/Symfony/Bridge/Twig/Extension/EmojiExtension.php:50
public function getFilters(): array
{
return [
new TwigFilter('emojify', $this->emojify(...)),
];
}
/**
* Converts emoji short code (:wave:) to real emoji (👋).
*/
public function emojify(string $string, ?string $catalog = null): string
{
$catalog ??= $this->defaultCatalog;
try {
$tr = self::$transliterators[$catalog] ??= EmojiTransliterator::create($catalog, EmojiTransliterator::REVERSE);
} catch (\IntlException $e) {
throw new \LogicException(\sprintf('The emoji catalog "%s" is not available.', $catalog), previous: $e);
}
return (string) $tr->transliterate($string);
}
}
View on GitHub (pinned to 698e28026c)
Solutions
- Use a known/valid catalog name (the default is 'text'); check the symfony/emoji documentation for the list of bundled catalogs.
- Ensure the runtime has a sufficiently complete ICU installation: install/upgrade the `intl` and ICU packages for your PHP build.
- Catch the LogicException and fall back to the un-emojified string if emoji rendering is non-critical.
- Update symfony/emoji to a version whose catalog data matches your ICU runtime.
Example fix
// before
$out = $ext->emojify($text, 'mycatalog'); // unknown catalog -> throws
// after — use a valid catalog or fall back
try {
$out = $ext->emojify($text, 'text');
} catch (\LogicException $e) {
$out = $text; // graceful fallback
} Defensive patterns
Strategy: try-catch
Validate before calling
// Validate a catalog before passing it to emojify
$valid = in_array($catalog, ['text'], true); // extend with known catalogs
if (!$valid) {
// fall back to default or skip emojification
} Try / catch
try {
$out = $ext->emojify($text, $catalog);
} catch (\LogicException $e) {
$out = $text; // graceful fallback to the original string
} Prevention
- Use only documented emoji catalog names; the default is 'text'.
- Ensure the runtime has a complete ICU installation (intl extension + libicu data).
- Catch LogicException and fall back to the raw string when emoji rendering is non-critical.
- Keep symfony/emoji and the system ICU version aligned.
When it happens
Trigger: Calling the `emojify` filter (or EmojiExtension::emojify()) with a `$catalog` argument that does not correspond to a known emoji catalog; relying on the default catalog when the ICU data files for that catalog are missing on the system.
Common situations: Passing a typo'd or custom catalog name; deploying to a minimal container/OS image whose libicu lacks the emoji transliteration data; mismatch between the symfony/emoji data version and the installed ICU version.
Related errors
- You cannot use the "emojify" filter as the "Emoji" component
- The "app.token" variable is not available.
- The "app.user" variable is not available.
- The "app.request" variable is not available.
- The "app.session" variable is not available.
AI-assisted analysis of symfony/symfony@698e28026c (2026-08-06).
Data as JSON: /api/errors/bb247d6c13e662b6.
Report an issue: GitHub.