Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Fix deprecated variant in idn_to_ascii #181

Closed
wants to merge 2 commits into from

Conversation

matbech
Copy link

@matbech matbech commented Nov 18, 2017

In PHP 7.2, INTL_IDNA_VARIANT_2003 is deprecated in
PHP Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in zendframework\zend-mail\src\Header\AbstractAddressList.php on line 105

Reference issue: #177

In PHP 7.2, INTL_IDNA_VARIANT_2003 is deprecated in 
PHP Deprecated:  idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in zendframework\zend-mail\src\Header\AbstractAddressList.php on line 105
@Slamdunk
Copy link
Contributor

Slamdunk commented Dec 7, 2017

Thanks for contribution, but it's not enough as of yet.
We need to build the library against PHP 7.2 and take care of zendframework/zend-validator#193 here too.

Are you able to do this (like zendframework/zend-validator#175)? Wanna try?

If not, I can take care of this.

@@ -102,7 +102,7 @@ public function getFieldName()
protected function idnToAscii($domainName)
{
if (extension_loaded('intl')) {
return (idn_to_ascii($domainName) ?: $domainName);
return (idn_to_ascii($domainName, 0, INTL_IDNA_VARIANT_UTS46) ?: $domainName);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (extension_loaded('intl')) { if (defined('INTL_IDNA_VARIANT_UTS46')) { return (idn_to_ascii($email, 0, INTL_IDNA_VARIANT_UTS46) ?: $email); } return (idn_to_ascii($email) ?: $email); ...

@Slamdunk Slamdunk mentioned this pull request Dec 29, 2017
3 tasks
@Ocramius Ocramius self-assigned this Mar 1, 2018
@Ocramius Ocramius added the bug label Mar 1, 2018
@Ocramius Ocramius added this to the 2.9.0 milestone Mar 1, 2018
@Ocramius
Copy link
Member

Ocramius commented Mar 1, 2018

Handled in #189

@Ocramius Ocramius closed this Mar 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants