sulu / symfony-intl-fix
Provides the symfony/intl fix for new php version also for symfony 2.8
Installs: 241 694
Dependents: 0
Suggesters: 0
Security: 0
Stars: 20
Watchers: 8
Forks: 2
Open Issues: 0
Requires
- php: ^5.5 || ^7.0
This package is auto-updated.
Last update: 2024-11-27 00:41:08 UTC
README
composer require sulu/symfony-intl-fix
To avoid problems you should also exclude the default Locale class from the classmap in your composer.json
:
{ "autoload": { "exclude-from-classmap": [ "vendor/symfony/intl/Locale.php", "vendor/symfony/symfony/src/Symfony/Component/Intl/Locale.php" ] } }
Affected PHP Versions:
^7.3.4
^7.2.17
^7.1.28
If you use one of the above PHP Version and an older Symfony Intl version than
^3.4.24
or ^4.2.7
symfony/intl will end up in an infinite loop.
This package will overwrite the Symfony Locale to avoid this infinite loop. Projects using Symfony 3 or 4 should just update there symfony package. This fix is mainly provided for Symfony 2 projects.
What was changed to fix the issue?
The change in Locale.php
is really simple:
- return locale_compose($localeSubTags); + $fallback = locale_compose($localeSubTags); + + return false !== $fallback ? $fallback : null;
See original commit.