Polyfill Intl Grapheme is a Symfony package that implements PHP grapheme functions from the Intl extension when the native API is unavailable. Text must be UTF-8.
Overview
Polyfill Intl Grapheme is part of the Symfony polyfill family. It provides a partial native PHP implementation of grapheme-related functions that normally come from the PHP Intl extension, so projects can work on environments where Intl grapheme support is missing.
The component focuses on grapheme cluster operations on UTF-8 text buffers, including searches and substring operations described in the package documentation. Installation is done through Composer in PHP applications that already use or may adopt Symfony components.
The package is distributed as a standalone Composer dependency rather than only as source in the monorepo. Symfony documents it alongside other polyfill packages for internationalization, such as normalizer and break iterator polyfills.
Projects such as TYPO3, Kimai, and ownCloud are listed on the Symfony package page as examples of software that depends on this polyfill transitively through the broader Symfony ecosystem.
Key features
- Grapheme functions without full Intl extension
- UTF-8 text buffer operations
- Composer installable Symfony package
- Partial native PHP implementation
- Part of Symfony polyfill collection
- MIT-licensed component
Use cases
- PHP apps missing Intl grapheme support
- Portable Unicode grapheme handling
- Symfony or Composer-based PHP projects
- Compatibility shims for older PHP setups