From 5e911eccd61357f4d2c3eff7058413b663cdd47f Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Sat, 19 Jan 2019 22:02:23 +0000 Subject: [PATCH] loading in symfony polyfill, partially resolves egulias/EmailValidator#177, but SpoofChecker does not seem to be polyfilled in symfony/polyfill-intl-* --- EmailValidator/Validation/DNSCheckValidation.php | 2 +- composer.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/EmailValidator/Validation/DNSCheckValidation.php b/EmailValidator/Validation/DNSCheckValidation.php index e5c3e5d..b07c063 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 96cd91b..80f95c5 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,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",