Skip to content

Conversation

@urbanecm
Copy link

intl-extra makes use of the IntlDateFormatter class, which is only available in the intl extension of PHP. However, this dependency is not noted in composer.json, which means installation succeeds, but usage fails with a rather mysterious error:

PHP Fatal error:  Uncaught Error: Class "IntlDateFormatter" not found

To avoid this misunderstanding, add an explicit dependency on intl to composer.json, to make composer complain that the dependency is not met during installation.

intl-extra makes use of the `IntlDateFormatter` class,
which is only available in the `intl` extension of PHP. However,
this dependency is not noted in `composer.json`, which means
installation succeeds, but usage fails with a rather mysterious
error:

```
PHP Fatal error:  Uncaught Error: Class "IntlDateFormatter" not found
```

To avoid this misunderstanding, add an explicit dependency
on `intl` to composer.json, to make composer complain
that the dependency is not met during installation.
@urbanecm
Copy link
Author

I just realised I probably should've sent this to twigphp/Twig#4702 instead. Done. Happy to make further changes if needed.

@stof
Copy link
Member

stof commented Oct 24, 2025

PRs must indeed be sent o the main repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants