]> granicus.if.org Git - php/commitdiff
Change default of $variant param of idn_to_ascii() and idn_to_utf8()
authorChristoph M. Becker <cmbecker69@gmx.de>
Sat, 15 Sep 2018 12:37:55 +0000 (14:37 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Sat, 15 Sep 2018 12:41:30 +0000 (14:41 +0200)
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>

NEWS
UPGRADING
ext/intl/idn/idn.c
ext/intl/tests/idn.phpt

diff --git a/NEWS b/NEWS
index 9583b1cb6819f3f68ce810533d8995b209849084..421eb707a9be0aa12bf08ef56f39aa0f81c7d5b3 100644 (file)
--- 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 
index 344ff39ea1f77ca2fc5043d185b0c1c09bb09ffa..729b5ebb2c523ead1fb7d8ca4fd00f77a66bddd6 100644 (file)
--- 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
 ========================================
index c9fc033024cc1f3792f4ef465b1bd556f382091b..bf855c3ef9ce51aea6c634f17317f4a084fa7902 100644 (file)
@@ -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);
index 6c00c95493d7f8263d96f800e7265cfb8f16f395..8e004ec2e20cb10f6117b206b7af917abec8a5bb 100644 (file)
@@ -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