Checks for INTL_IDNA_VARIANT_UTS46#1440
Conversation
|
After a bit more research and touching base with sysadmin, the setup of the testing box is a default CentOS6/cPanel-powered box with PHP updated. So, I think we'll need to account for both lacking |
So if ICU is at an old version as before PHP 5.4 but the current version of PHP is 7.2+?
@kraftbj Humm. I don't really know. I'll go with whatever you think is best. |
Yup, ICU is independent of PHP, apparently. 5.4+ integrated the "wrapper", but isn't an indicator of what version of ICU is available to a given system. So yes, PHP 7.2+ with older ICU <4.6, we're stuck between a rock and a hard place. For now, I think what I have is decent. I would expect people with 7.2+ with outdated ICU would be fewer than people on 5.4+ with outdated ICU. Long-term, I need to chew on it more. |
Fixes #1439
Since ICU, which provides the
INTL_IDNA_VARIANT_UTS46may not be kept up to date the same as PHP, a separate check here will prevent the undeclared constant warning.The downside is
idn_to_utf8function defaults to usingINTL_IDNA_VARIANT_2003which would then throw a deprecated warning in PHP 7.2+. If PHP 7.4, it is planned that the default will beINTL_IDNA_VARIANT_UTS46which would likely return the original issue.@westonruter What would you prefer? Checking for UTS46 and taking the deprecated in PHP 7.2 for sites running ancient ICU or check for the UTS46 variant along with the
idn_to_utf8exists check? Or a third option?