php
extension
ai_generated
true
Fatal error: Uncaught Error: Class 'IntlDateFormatter' not found in /var/www/app/src/Locale/DateHelper.php:12
ID: php/intl-locale-error
93%Fix Rate
94%Confidence
55Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 83 | active | — | — | — |
Root Cause
Intl extension errors occur when PHP's internationalization extension is missing. The Intl extension provides ICU-based locale-aware formatting for numbers, dates, currencies, and message translation. Many frameworks (Symfony, Laravel) require it.
genericWorkarounds
-
95% success Install the php-intl extension and ICU libraries
On Debian/Ubuntu: apt-get install php8.3-intl. On Alpine (Docker): apk add icu-dev && docker-php-ext-install intl. Restart PHP-FPM. Verify with php -m | grep intl.
-
75% success Use symfony/polyfill-intl packages as a temporary workaround
Install composer require symfony/polyfill-intl-icu symfony/polyfill-intl-normalizer symfony/polyfill-intl-grapheme. These provide limited fallback for basic operations while the full extension is being installed.
Dead Ends
Common approaches that don't work:
-
Manually formatting dates and numbers with custom locale logic instead of installing intl
78% fail
Reimplementing ICU locale rules manually is error-prone and incomplete. Edge cases like right-to-left scripts, complex number systems, and locale-specific sorting will produce incorrect results.
-
Using a PHP polyfill for intl without the underlying ICU library
55% fail
The symfony/polyfill-intl-icu package provides only basic fallback behavior. Complex formatting, collation, and transliteration will not work correctly without the real ICU library.
Error Chain
Leads to:
Preceded by:
Frequently confused with: