Description
According to build/php.m4, PHP's ICU minimum is currently 57.1. And as per the ICU doc, ICU already provides the restriction-level API before ICU 57:
However, every above constants or functions could only be used under ICU >= 58 in php. There is a hard version guard against them, which means if someone build php under ICU 57.x (though it is really, really rare) the guy might have trouble dealing with those APIs in php interface since they are only valid under ICU >= 58.
the source of those is
#if U_ICU_VERSION_MAJOR_NUM >= 58
public const int ASCII = UNKNOWN;
public const int HIGHLY_RESTRICTIVE = UNKNOWN;
public const int MODERATELY_RESTRICTIVE = UNKNOWN;
public const int MINIMALLY_RESTRICTIVE = UNKNOWN;
public const int UNRESTRICTIVE = UNKNOWN;
public const int SINGLE_SCRIPT_RESTRICTIVE = UNKNOWN;
public const int MIXED_NUMBERS = UNKNOWN;
#endif
#if U_ICU_VERSION_MAJOR_NUM >= 58
public function setRestrictionLevel(int $level): void {}
#endif
There seems to be much more APIs that is supported in ICU 57.x which is clearly supported in php, and could only be used under ICU >= 58, across the intl code base. At this point I don't even sure if we actually care about ICU < 58
I don't sure if we should treat this as a new feature request or a bug report. cc @devnexen if you have enough time on this topic. Or I'd be happy to work on this in this weekend :)
PHP Version
Operating System
N/A
Description
According to build/php.m4, PHP's ICU minimum is currently
57.1. And as per the ICU doc, ICU already provides the restriction-level API before ICU 57:uspoof_setRestrictionLevel()supported in ICU 51https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/uspoof_8h.html#a09c3e03f3260688f5932ad8fdd256ac7
URestrictionLevelsupported in ICU 51https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/uspoof_8h.html#a507e646ac472ea3866b59b0511720218
USPOOF_MIXED_NUMBERSsupported in ICU 51:https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a0fbfe4596de0672faf4f0d4f01a823f6
...
However, every above constants or functions could only be used under ICU >= 58 in php. There is a hard version guard against them, which means if someone build php under ICU 57.x (though it is really, really rare) the guy might have trouble dealing with those APIs in php interface since they are only valid under ICU >= 58.
the source of those is
There seems to be much more APIs that is supported in ICU 57.x which is clearly supported in php, and could only be used under ICU >= 58, across the intl code base. At this point I don't even sure if we actually care about ICU < 58
I don't sure if we should treat this as a new feature request or a bug report. cc @devnexen if you have enough time on this topic. Or I'd be happy to work on this in this weekend :)
PHP Version
Operating System
N/A