diff --git a/EmailValidator/Validation/DNSCheckValidation.php b/EmailValidator/Validation/DNSCheckValidation.php index 207fc73..da13253 100644 --- a/EmailValidator/Validation/DNSCheckValidation.php +++ b/EmailValidator/Validation/DNSCheckValidation.php @@ -21,7 +21,7 @@ class DNSCheckValidation implements EmailValidation public function __construct() { - if (!extension_loaded('intl')) { + if (!function_exists('idn_to_ascii')) { throw new \LogicException(sprintf('The %s class requires the Intl extension.', __CLASS__)); } } diff --git a/composer.json b/composer.json index 5423e9f..510dcd4 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,8 @@ ], "require": { "php": ">= 5.5", - "doctrine/lexer": "^1.0.1" + "doctrine/lexer": "^1.0.1", + "symfony/polyfill-intl-idn": "^1.10" }, "require-dev" : { "satooshi/php-coveralls": "^1.0.1",