Skip to content

Conversation

aurelijusb
Copy link

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 the original problem could be solved with:

sudo apt-get install php7.2-intl

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
aurelijusb added a commit to nfqakademija/docker that referenced this pull request Nov 12, 2018
Because SymfonyDemo app requires it.

See symfony/demo#895
aurelijusb added a commit to nfqakademija/docker that referenced this pull request Nov 12, 2018
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
@stof
Copy link
Member

stof commented Nov 13, 2018

@javiereguiluz as discussed in the issue, that might not be the preferred way there.

javiereguiluz added a commit that referenced this pull request Nov 15, 2018
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
@javiereguiluz
Copy link
Member

@stof I'm afraid I don't understand your comment. Do you like the change proposed in this pull request?

@stof
Copy link
Member

stof commented Nov 16, 2018

@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.

@nicolas-grekas nicolas-grekas changed the base branch from master to main November 19, 2020 12:37
@bocharsky-bw
Copy link
Contributor

Does this issue still exist for the latest version of the project on Ubuntu?

@aurelijusb
Copy link
Author

Seems to be solved 🙂 Thanks. Closing.

Tested with:
Ubuntu 20.04.2 LTS
PHP 7.4.3
Symfony 5.3.1
Symfony CLI version v4.25.4

@aurelijusb aurelijusb closed this Jul 13, 2021
@aurelijusb aurelijusb deleted the php7.2-intl-missing branch July 13, 2021 10:20
@bocharsky-bw
Copy link
Contributor

Thank you for reporting it! ❤️

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants