com php-src: Change default of $variant param of idn_to_asc ii() and idn_to_utf8(): NEWS UPGRADING ext/intl/idn/idn.c ext/intl/tests/idn.phpt
| From: | Christoph Michael Becker | Date: | Sat, 15 Sep 2018 12:41:30 +0000 |
| Subject: | com php-src: Change default of $variant param of idn_to_asc ii() and idn_to_utf8(): NEWS UPGRADING ext/intl/idn/idn.c ext/intl/tests/idn.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-103111@lists.php.net to get a copy of this message | ||
Commit: 01912f93c3f702b5b34a0a9a4c8f529785b0286a
Author: Christoph M. Becker <cmbecker69@gmx.de> Sat, 15 Sep 2018 14:37:55 +0200
Parents: 8a4c2f16217fb8f8d098355f3943f31e82bcfd71
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=01912f93c3f702b5b34a0a9a4c8f529785b0286a
Log:
Change default of $variant param of idn_to_ascii() and idn_to_utf8()
According to the “Deprecate and remove INTL_IDNA_VARIANT_2003” RFC[1],
we change the default of the $variant parameter of
idn_to_ascii() and
idn_to_utf8() from INTL_IDNA_VARIANT_2003 to
INTL_IDNA_VARIANT_UTS46.
[1] <https://wiki.php.net/rfc/deprecate-and-remove-intl_idna_variant_2003>
Changed paths:
M NEWS
M UPGRADING
M ext/intl/idn/idn.c
M ext/intl/tests/idn.phpt
Diff:
diff --git a/NEWS b/NEWS
index 9583b1c..421eb70 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@ PHP NEWS
- Intl:
. Lifted requirements to ICU ≥ 50.1. (cmb)
+ . Changed default of $variant parameter of idn_to_ascii() and idn_to_utf8().
+ (cmb)
- Standard:
. Fixed bug #74764 (Bindto IPv6 works with file_get_contents but fails with
diff --git a/UPGRADING b/UPGRADING
index 344ff39..729b5eb 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -19,6 +19,10 @@ PHP 7.4 UPGRADE NOTES
1. Backward Incompatible Changes
========================================
+- Intl:
+ . The default parameter value of idn_to_ascii() and idn_to_utf8() is now
+ INTL_IDNA_VARIANT_UTS46 instead of the deprecated INTL_IDNA_VARIANT_2003.
+
========================================
2. New Features
========================================
diff --git a/ext/intl/idn/idn.c b/ext/intl/idn/idn.c
index c9fc033..bf855c3 100644
--- a/ext/intl/idn/idn.c
+++ b/ext/intl/idn/idn.c
@@ -268,7 +268,7 @@ static void php_intl_idn_handoff(INTERNAL_FUNCTION_PARAMETERS, int mode)
{
zend_string *domain;
zend_long option = 0,
- variant = INTL_IDN_VARIANT_2003;
+ variant = INTL_IDN_VARIANT_UTS46;
zval *idna_info = NULL;
intl_error_reset(NULL);
diff --git a/ext/intl/tests/idn.phpt b/ext/intl/tests/idn.phpt
index 6c00c95..8e004ec 100644
--- a/ext/intl/tests/idn.phpt
+++ b/ext/intl/tests/idn.phpt
@@ -14,8 +14,5 @@ echo urlencode(idn_to_utf8('xn--tst-qla.de'))."\n";
?>
--EXPECTF--
-Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in %s on line %d
xn--tst-qla.de
-
-Deprecated: idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated in %s on line %d
-t%C3%A4st.de
\ No newline at end of file
+t%C3%A4st.de