-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
twig/intl-extra depends on intl PHP extension. However, it is possible to install even on systems without that extension (composer install succeeds). In that case, its usage would end up with a quite mysterious error:
PHP Fatal error: Uncaught Error: Class "IntlDateFormatter" not found
As https://www.php.net/manual/en/class.intldateformatter.php says, the IntlDateFormatter class is defined by the extension.
composer.json supports declaring dependencies on PHP extensions as well (by depending on ext-intl). I propose we add that dependency, which would make composer.json complain directly when installing.
Maybe the goal is to provide a fallback implementation somewhere (https://github.com/symfony/polyfill-intl-icu/tree/1.x?tab=readme-ov-file seems to be providing it, although that package is deprecated), but it doesn't seem intended to fail on usage. Whether the expected behaviour is "fail on install" or "use a fallback", I'm not sure.