====== PHP RFC: Deprecate and remove INTL_IDNA_VARIANT_2003 ====== * Version: 1.1 * Date: 2017-01-07 * Author: Christoph M. Becker, cmb@php.net * Status: Implemented * First Published at: http://wiki.php.net/rfc/deprecate-and-remove-intl_idna_variant_2003 ===== Introduction ===== As of ICU 55.1 (released 2015-04-01) the [[http://source.icu-project.org/repos/icu/icu/tags/release-55-1/APIChangeReport.html#deprecated|IDNA2003 APIs are deprecated]], because [[https://sourceforge.net/p/icu/mailman/message/32980778/|UTS #46 should be preferred over the obsolete IDNA 2003 variant]]. However, the intl extension still uses INTL_IDNA_VARIANT_2003 as default for [[http://php.net/manual/en/function.idn-to-ascii.php|idn_to_ascii()]] and [[http://php.net/manual/en/function.idn-to-utf8.php|idn_to_utf8()]], which should be changed as soon as possible. ===== Proposal ===== Therefore I suggest the following procedure: * //PHP 7.2//: deprecate INTL_IDNA_VARIANT_2003 * //PHP 7.4//: change the default of idn_to_ascii()'s and idn_to_utf8()'s $variant parameter to INTL_IDNA_VARIANT_UTS46 * //PHP 8.0//: remove support for INTL_IDNA_VARIANT_2003 altogether ===== Backward Incompatible Changes ===== Obviously, code explicitly using INTL_IDNA_VARIANT_2003 would break (during PHP 7 only with regard to triggering a deprecation notice), and code relying on the default variant might break (however, it might be "magically" fixed as well). ===== RFC Impact ===== Besides the obvious behavioral changes to idn_to_ascii() an idn_to_utf8() there is no further impact on SAPIs, extensions or OPcache. ===== Open Issues ===== None. ===== Proposed Voting Choices ===== Whether to implement the proposal above, or not. This RFC requires a 2/3 majority. Voting starts on 2017-01-31T12:30Z and ends on 2017-02-14T12:30Z. * Yes * No ===== Patches and Tests ===== [[https://github.com/php/php-src/pull/2355|PR implementing the deprecation]]. ===== Implementation ===== - PR #2355 has been merged into master (which is supposed to become PHP-7.2) with [[https://github.com/php/php-src/commit/6cfbb7f9bd4576f8f6172a33d49e7498b3b617e1|commit 6cfbb7f9]]. - The PHP manual has been [[http://svn.php.net/viewvc?view=revision&revision=341894|updated]]. The migration guide will be written based on UPGRADING, which already has a respective note. - [[http://git.php.net/?p=php-src.git;a=commit;h=3d15a6f86b56c8acbf7363fb5e70a054918dbd64|Removed for PHP 8]] ===== References ===== * [[http://marc.info/?t=148001209500002&r=1&w=2|First introduction on internals]] * [[http://marc.info/?t=148379802600002&r=1&w=2|Discussion thread on internals]] ===== Rejected Features ===== None.