Comments (10)
Closing as the CI is green on 7.3, which means this has been fixed - correct?
from polyfill.
@nicolas-grekas , I can confirm the problem for Mac. Tests fail for php 7.3.2 and pass fine for 7.1.25.
For instance, Normalizer
constants values changed.
7.1.25
php > echo phpversion('intl');
1.1.0
php > var_dump((new \ReflectionClass(Normalizer::class))->getConstants());
array(9) {
["NONE"]=>
int(1)
["FORM_D"]=>
int(2)
["NFD"]=>
int(2)
["FORM_KD"]=>
int(3)
["NFKD"]=>
int(3)
["FORM_C"]=>
int(4)
["NFC"]=>
int(4)
["FORM_KC"]=>
int(5)
["NFKC"]=>
int(5)
}
7.3.2
php > echo phpversion('intl');
7.3.2
php > var_dump((new \ReflectionClass(Normalizer::class))->getConstants());
array(11) {
["NONE"]=>
int(2)
["FORM_D"]=>
int(4)
["NFD"]=>
int(4)
["FORM_KD"]=>
int(8)
["NFKD"]=>
int(8)
["FORM_C"]=>
int(16)
["NFC"]=>
int(16)
["FORM_KC"]=>
int(32)
["NFKC"]=>
int(32)
["FORM_KC_CF"]=>
int(48)
["NFKC_CF"]=>
int(48)
}
Now trying to investigate...
from polyfill.
I got it.
For php < 7.3: https://github.com/php/php-src/blob/782bbe722d90d8743f84da712d709a319699bfd6/ext/intl/normalizer/normalizer.h#L24
For php 7.3: https://github.com/php/php-src/blob/3fa88e0ce0ffd9f63672afe114158a07a0204e21/ext/intl/normalizer/normalizer.h#L22
from polyfill.
I can still reproduce the failures on Debian unstable (PHP 7.3.2-3). I don't know why they don't fail on travis-ci.
from polyfill.
@legoktm , here's my explanation.
php < 7.3 + any ICU
andphp >= 7.3 + ICU < 56
work the same way.php >= 7.3 + ICU >= 56
works differently, see https://github.com/php/php-src/blob/3fa88e0ce0ffd9f63672afe114158a07a0204e21/ext/intl/normalizer/normalizer.h#L35 (this is whyNormalizer
constants have different values).
Now if you have php 7.3 and ICU 63 like I do, then tests fail.
Travis does not update icu regularly, see symfony/symfony#14259 and travis-ci/travis-ci#3616. That's why it does not fail on 7.3 yet.
from polyfill.
@nicolas-grekas , let's reopen this issue?
I am ready to try to fix it.
from polyfill.
Sure, thanks!
from polyfill.
@nicolas-grekas , actually PHP: nightly
fails (https://travis-ci.org/symfony/polyfill/jobs/490568453) because of the ICU version, because php: nightly
builds on travis checkout the latest ICU version (travis-ci/travis-ci#3616 (comment)).
So we now we know the problem and the testing tool! I will continue working on this.
from polyfill.
Ooh, nice find @nicolas-grekas. Thanks for working on this :-)
from polyfill.
@nicolas-grekas , @legoktm , I finally made tests fail. See #171
from polyfill.
Related Issues (20)
- symfony/polyfill-mbstring can no longer be installed (as of today) HOT 7
- mb_strlen returns 0 instead of 1 for the char chr(254) HOT 7
- polyfill-mbstring: mb_check_encoding crashes for array input
- normalizer_is_normalized has nullable string parameter HOT 2
- [Tests] Polyfills not loaded HOT 5
- Polyfill DATE_ISO8601_EXPANDED HOT 3
- Missing polyfills for PHP 8.3 HOT 1
- #[\SensitiveParameter] is available since PHP 8.2, but loaded on 8.1 HOT 1
- Backport fix for ini_parse_quantity from PHP HOT 2
- Polyfill PHP 8.3 is incomplete HOT 3
- Missing str_increment and str_decrement polyfill
- [PHP 8.4] `mb_trim`, `mb_ltrim`, and `mb_rtrim` polyfills HOT 1
- Intl Collator types are (slightly) incoherent HOT 2
- ini_parse_quantity not defined when using the polyfill HOT 2
- Inconsistency of composer autoload and packages after removing polyfill package HOT 1
- [PHP 8.4] `mb_ucfirst()` and `mb_lcfirst()` polyfills HOT 1
- Inconsistent function calls in test cases HOT 1
- Function signature checking should be improved HOT 1
- `Stringable` polyfill has no return type, breaks tests and static analysis HOT 4
- [PHP 8.4] composer require polyfill-php84 is failing HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polyfill.