Skip to content
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

[WIP] Fix Intl for PHP >= 7.3 and ICU >= 56 #171

Closed
wants to merge 2 commits into from

Conversation

vudaltsov
Copy link

@vudaltsov vudaltsov commented Feb 14, 2019

Closes #170
Closes #163

Since PHP 7.3 the behavior of the Intl extension depends on the ICU version (see this snippet as example).

Thus to be able to test the full range of outcomes and to close #170, we need PHP 7.3 binary with ICU >= 56. Since for Travis CI the ICU version cannot be configured (see travis-ci/travis-ci#3616) and currently is lower than 56, I decided to compile php manually. The result is cached via standard Travis caching to optimize subsequent builds.

@vudaltsov
Copy link
Author

@nicolas-grekas , waiting for your approval of the first step. Ready to work on the rest.

@nicolas-grekas
Copy link
Member

LGTM thanks!

@vudaltsov
Copy link
Author

@nicolas-grekas , as you can see in https://travis-ci.org/symfony/polyfill/jobs/495391071, five @group legacy tests are still failing. This is strange, looks like idn_to_utf8 changed it's behavior with ICU_VERSION=63.1. Failed to find any explanations. What's the best way to resolve this?

@nicolas-grekas nicolas-grekas changed the base branch from master to main October 20, 2020 10:35
private static $ASCII = "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F";

public static function isNormalized($s, $form = self::NFC)
if (version_compare(PHP_VERSION, '7.3', '>=') && defined('INTL_ICU_VERSION') && version_compare(INTL_ICU_VERSION, '56', '>=')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't do version_compare on PHP_VERSION, use compare PHP_VERSION_ID instead

@nicolas-grekas
Copy link
Member

I'm closing because this staled. Please submit again when you're ready!

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.

Add Normalizer::FORM_KC_CF Tests fail on PHP 7.3
3 participants