Require ICU ≥ 50.1

Given that ICU is a set of lively developed libraries, that ICU 50.1
has been released on 2012-11-05, and PHP 7.4 is scheduled to be
released seven years after it, we consider it appropriate to ditch
these legacy versions.

Particularly, that would be a reasonable groundwork to implement part
two of the “Deprecate and remove INTL_IDNA_VARIANT_2003” RFC[1], namely
to default idn_to_ascii()'s and idn_to_utf8()'s $variant parameter to
INTL_IDNA_VARIANT_UTS46, which is not defined in ICU < 4.6.

See also the related discussion on internals@[2].

[1] <https://wiki.php.net/rfc/deprecate-and-remove-intl_idna_variant_2003>
[2] <http://news.php.net/php.internals/101626>ff
This commit is contained in:
Christoph M. Becker 2018-09-06 14:04:44 +02:00
parent b820a7b2ff
commit 8a4c2f1621
110 changed files with 31 additions and 4082 deletions

View file

@ -131,7 +131,6 @@ U_CFUNC PHP_FUNCTION(intltz_get_gmt)
timezone_object_construct(TimeZone::getGMT(), return_value, 0);
}
#if U_ICU_VERSION_MAJOR_NUM >= 49
U_CFUNC PHP_FUNCTION(intltz_get_unknown)
{
intl_error_reset(NULL);
@ -144,7 +143,6 @@ U_CFUNC PHP_FUNCTION(intltz_get_unknown)
timezone_object_construct(&TimeZone::getUnknown(), return_value, 0);
}
#endif
U_CFUNC PHP_FUNCTION(intltz_create_enumeration)
{
@ -232,7 +230,6 @@ U_CFUNC PHP_FUNCTION(intltz_count_equivalent_ids)
RETURN_LONG((zend_long)result);
}
#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration)
{
zend_long zoneType,
@ -278,7 +275,6 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration)
IntlIterator_from_StringEnumeration(se, return_value);
}
#endif
U_CFUNC PHP_FUNCTION(intltz_get_canonical_id)
{
@ -319,7 +315,6 @@ U_CFUNC PHP_FUNCTION(intltz_get_canonical_id)
}
}
#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
U_CFUNC PHP_FUNCTION(intltz_get_region)
{
char *str_id;
@ -347,7 +342,6 @@ U_CFUNC PHP_FUNCTION(intltz_get_region)
RETURN_STRINGL(outbuf, region_len);
}
#endif
U_CFUNC PHP_FUNCTION(intltz_get_tz_data_version)
{
@ -515,11 +509,9 @@ U_CFUNC PHP_FUNCTION(intltz_has_same_rules)
static const TimeZone::EDisplayType display_types[] = {
TimeZone::SHORT, TimeZone::LONG,
#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
TimeZone::SHORT_GENERIC, TimeZone::LONG_GENERIC,
TimeZone::SHORT_GMT, TimeZone::LONG_GMT,
TimeZone::SHORT_COMMONLY_USED, TimeZone::GENERIC_LOCATION
#endif
};
U_CFUNC PHP_FUNCTION(intltz_get_display_name)