-
Notifications
You must be signed in to change notification settings - Fork 8.1k
ext/intl: Guard Spoofchecker restriction-level APIs at ICU 53 (fix build on ICU 50.x) #22248
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
base: PHP-8.4
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,6 +4,12 @@ spoofchecker with restriction level | |||||
| intl | ||||||
| --SKIPIF-- | ||||||
| <?php if(!class_exists("Spoofchecker")) print 'skip'; ?> | ||||||
| <?php | ||||||
| $r = new ReflectionClass("SpoofChecker"); | ||||||
| if (false === $r->getConstant("SINGLE_SCRIPT_RESTRICTIVE")) { | ||||||
| die("skip Incompatible ICU version"); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
to align with other skip message in the intl extension. Might need to consider to change the version message to 51 if the upper suggestion is agreed. |
||||||
| } | ||||||
| ?> | ||||||
| --FILE-- | ||||||
| <?php | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,6 +4,12 @@ Spoofchecker exposes restriction-level APIs on all supported ICU versions | |||||
| intl | ||||||
| --SKIPIF-- | ||||||
| <?php if (!class_exists("Spoofchecker")) print 'skip'; ?> | ||||||
| <?php | ||||||
| $r = new ReflectionClass("Spoofchecker"); | ||||||
| if (false === $r->getConstant("SINGLE_SCRIPT_RESTRICTIVE")) { | ||||||
| die("skip Incompatible ICU version"); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Ditto. |
||||||
| } | ||||||
| ?> | ||||||
| --FILE-- | ||||||
| <?php | ||||||
| $r = new ReflectionClass("Spoofchecker"); | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -5,6 +5,8 @@ intl | |||||
| --SKIPIF-- | ||||||
| <?php | ||||||
| if (!class_exists("Spoofchecker")) print 'skip'; | ||||||
|
|
||||||
| if (!method_exists(new Spoofchecker(), 'setRestrictionLevel')) print 'skip ICU version < 53'; | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Ditto. However this can always be accepted whether we agree to move the majority of your guard to 51 because the setRestrictionLevel is guarded under 53 anyways. |
||||||
| ?> | ||||||
| --FILE-- | ||||||
| <?php | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, we may still want to support ICU 51 since it is technically >50.1, which is our minimum supported version in 8.4. So I'd suggest to only guard USPOOF_SINGLE_SCRIPT_RESTRICTIVE under ICU 53 and guard the rest under ICU 51. This benefit people who are using 51 < ICU version < 53 that they should have access to these const that exists since ICU 51
That is, I suggest to change this guard to >= 51 and specifically list USPOOF_SINGLE_SCRIPT_RESTRICTIVE out and put it in a ICU >= 53 guard.