summaryrefslogtreecommitdiff
path: root/ext/intl/php_intl.c
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2018-09-06 14:04:44 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2018-09-15 13:59:54 +0200
commit8a4c2f16217fb8f8d098355f3943f31e82bcfd71 (patch)
tree08ff4c288a0e012465de58bb3988ac65a645ab4b /ext/intl/php_intl.c
parentb820a7b2ff26c32f1cf9d2e594fd01e0b303387f (diff)
downloadphp-git-8a4c2f16217fb8f8d098355f3943f31e82bcfd71.tar.gz
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
Diffstat (limited to 'ext/intl/php_intl.c')
-rw-r--r--ext/intl/php_intl.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c
index dc028918b0..b7a0afcab0 100644
--- a/ext/intl/php_intl.c
+++ b/ext/intl/php_intl.c
@@ -87,12 +87,10 @@
#include "idn/idn.h"
#include "uchar/uchar.h"
-#if U_ICU_VERSION_MAJOR_NUM * 1000 + U_ICU_VERSION_MINOR_NUM >= 4002
# include "spoofchecker/spoofchecker_class.h"
# include "spoofchecker/spoofchecker.h"
# include "spoofchecker/spoofchecker_create.h"
# include "spoofchecker/spoofchecker_main.h"
-#endif
#include "msgformat/msgformat.h"
#include "common/common_error.h"
@@ -763,18 +761,12 @@ static const zend_function_entry intl_functions[] = {
PHP_FE( intltz_create_default, arginfo_tz_void )
PHP_FE( intltz_get_id, arginfo_tz_only_tz )
PHP_FE( intltz_get_gmt, arginfo_tz_void )
-#if U_ICU_VERSION_MAJOR_NUM >= 49
PHP_FE( intltz_get_unknown, arginfo_tz_void )
-#endif
PHP_FE( intltz_create_enumeration, arginfo_tz_create_enumeration )
PHP_FE( intltz_count_equivalent_ids, arginfo_tz_idarg_static )
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
PHP_FE( intltz_create_time_zone_id_enumeration, arginfo_tz_create_time_zone_id_enumeration )
-#endif
PHP_FE( intltz_get_canonical_id, arginfo_tz_get_canonical_id )
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
PHP_FE( intltz_get_region, arginfo_tz_idarg_static )
-#endif
PHP_FE( intltz_get_tz_data_version, arginfo_tz_void )
PHP_FE( intltz_get_equivalent_id, arginfo_tz_get_equivalent_id )
PHP_FE( intltz_use_daylight_time, arginfo_tz_only_tz )
@@ -788,9 +780,7 @@ static const zend_function_entry intl_functions[] = {
PHP_FE( intltz_get_error_message, arginfo_tz_only_tz )
PHP_FE( intlcal_create_instance, ainfo_cal_create_instance )
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 42
PHP_FE( intlcal_get_keyword_values_for_locale, ainfo_cal_get_keyword_values_for_locale )
-#endif
PHP_FE( intlcal_get_now, ainfo_cal_void )
PHP_FE( intlcal_get_available_locales, ainfo_cal_void )
PHP_FE( intlcal_get, ainfo_cal_field )
@@ -806,9 +796,7 @@ static const zend_function_entry intl_functions[] = {
PHP_FE( intlcal_field_difference, ainfo_cal_field_difference )
PHP_FE( intlcal_get_actual_maximum, ainfo_cal_field )
PHP_FE( intlcal_get_actual_minimum, ainfo_cal_field )
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
PHP_FE( intlcal_get_day_of_week_type, ainfo_cal_dow )
-#endif
PHP_FE( intlcal_get_first_day_of_week, ainfo_cal_only_cal )
PHP_FE( intlcal_get_greatest_minimum, ainfo_cal_field )
PHP_FE( intlcal_get_least_maximum, ainfo_cal_field )
@@ -818,28 +806,22 @@ static const zend_function_entry intl_functions[] = {
PHP_FE( intlcal_get_minimum, ainfo_cal_field )
PHP_FE( intlcal_get_time_zone, ainfo_cal_only_cal )
PHP_FE( intlcal_get_type, ainfo_cal_only_cal )
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
PHP_FE( intlcal_get_weekend_transition, ainfo_cal_dow )
-#endif
PHP_FE( intlcal_in_daylight_time, ainfo_cal_only_cal )
PHP_FE( intlcal_is_equivalent_to, ainfo_cal_other_cal )
PHP_FE( intlcal_is_lenient, ainfo_cal_only_cal )
PHP_FE( intlcal_is_set, ainfo_cal_field )
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
PHP_FE( intlcal_is_weekend, ainfo_cal_date_optional )
-#endif
PHP_FE( intlcal_set_first_day_of_week, ainfo_cal_dow )
PHP_FE( intlcal_set_lenient, ainfo_cal_set_lenient )
PHP_FE( intlcal_set_minimal_days_in_first_week, ainfo_cal_set_minimal_days_in_first_week )
PHP_FE( intlcal_equals, ainfo_cal_other_cal )
PHP_FE( intlcal_from_date_time, ainfo_cal_from_date_time )
PHP_FE( intlcal_to_date_time, ainfo_cal_only_cal )
-#if U_ICU_VERSION_MAJOR_NUM >= 49
PHP_FE( intlcal_get_repeated_wall_time_option, ainfo_cal_only_cal )
PHP_FE( intlcal_get_skipped_wall_time_option, ainfo_cal_only_cal )
PHP_FE( intlcal_set_repeated_wall_time_option, ainfo_cal_wall_time_option )
PHP_FE( intlcal_set_skipped_wall_time_option, ainfo_cal_wall_time_option )
-#endif
PHP_FE( intlcal_get_error_code, ainfo_cal_only_cal )
PHP_FE( intlcal_get_error_message, ainfo_cal_only_cal )
@@ -972,13 +954,11 @@ PHP_MINIT_FUNCTION( intl )
/* Expose IDN constants to PHP scripts. */
idn_register_constants(INIT_FUNC_ARGS_PASSTHRU);
-#if U_ICU_VERSION_MAJOR_NUM * 1000 + U_ICU_VERSION_MINOR_NUM >= 4002
/* Register 'Spoofchecker' PHP class */
spoofchecker_register_Spoofchecker_class( );
/* Expose Spoofchecker constants to PHP scripts */
spoofchecker_register_constants( INIT_FUNC_ARGS_PASSTHRU );
-#endif
/* Register 'IntlException' PHP class */
intl_register_IntlException_class( );