-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Require php-intl instead of crashing on IntlTimeZone #895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PHP 7.2 on Ubuntu does not have php7.2-intl installed by default. With composer install there are no check for intl extension and first page shows misleading error: Attempted to load class "IntlTimeZone" from the global namespace. Did you forget a "use" statement? It is better to show warning during composer install (or composer create-project): Your requirements could not be resolved to an installable set of packages. Problem 1 - The requested PHP extension ext-intl * is missing from your system. Install or enable PHP's intl extension. So it would be easier to google, that problem could be solved with: sudo apt-get install php7.2-intl
Because SymfonyDemo app requires it. See symfony/demo#895
Because SymfonyDemo app requires it. Added icu and g++ libraries, because those were needed for intl package to be installed via docker-php-ext-install See symfony/demo#895
@javiereguiluz as discussed in the issue, that might not be the preferred way there. |
This PR was squashed before being merged into the master branch (closes #890). Discussion ---------- Sufix translations files with +intl-icu ~~Also added intl extension to composer require because when I was testing on my machine, this extension was missing.~~ Reverting intl extension require in favor of #895 Maybe we could require [`polyfill-intl-normalizer`](https://github.com/symfony/polyfill-intl-normalizer) instead of the extension. Commits ------- 888897b Sufix translations files with +intl-icu
@stof I'm afraid I don't understand your comment. Do you like the change proposed in this pull request? |
@javiereguiluz in the issue, I suggested that this issue should be fixed in Twig-extensions instead, to keep it compatible with the polyfill, instead of requiring the extension in the demo. |
Does this issue still exist for the latest version of the project on Ubuntu? |
Seems to be solved 🙂 Thanks. Closing.
|
Thank you for reporting it! ❤️ |
PHP 7.2 on Ubuntu does not have
php7.2-intl
installed by default.With
composer install
there are no check forintl
extensionand first page shows misleading error:
It is better to show warning during
composer install
(or composer create-project):
So it would be easier to google, that the original problem could be solved with: