Skip to content

Commit

Permalink
Merge branch 'release/3.0.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Feb 11, 2020
2 parents 80862e5 + 45bf481 commit 3546c99
Show file tree
Hide file tree
Showing 24 changed files with 248 additions and 45 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v3.0.6
## 02/11/2020

1. [](#improved)
* Updated email validator library

# v3.0.5
## 02/03/2020

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Email
version: 3.0.5
version: 3.0.6
testing: false
description: Enables the emailing system for Grav
icon: envelope
Expand Down
13 changes: 7 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ private function findFileWithExtension($class, $ext)
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
$search = $subPath.'\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
Expand Down
2 changes: 1 addition & 1 deletion vendor/composer/autoload_files.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
return array(
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
'def43f6c87e4f8dfd0c9e1b1bab14fe8' => $vendorDir . '/symfony/polyfill-iconv/bootstrap.php',
'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
'def43f6c87e4f8dfd0c9e1b1bab14fe8' => $vendorDir . '/symfony/polyfill-iconv/bootstrap.php',
'2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php',
);
2 changes: 1 addition & 1 deletion vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class ComposerStaticInitdec5d78def1384d1f20996ded9d7efbf
public static $files = array (
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
'def43f6c87e4f8dfd0c9e1b1bab14fe8' => __DIR__ . '/..' . '/symfony/polyfill-iconv/bootstrap.php',
'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
'def43f6c87e4f8dfd0c9e1b1bab14fe8' => __DIR__ . '/..' . '/symfony/polyfill-iconv/bootstrap.php',
'2c102faa651ef8ea5874edb585946bce' => __DIR__ . '/..' . '/swiftmailer/swiftmailer/lib/swift_required.php',
);

Expand Down
15 changes: 8 additions & 7 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,23 @@
},
{
"name": "egulias/email-validator",
"version": "2.1.14",
"version_normalized": "2.1.14.0",
"version": "2.1.15",
"version_normalized": "2.1.15.0",
"source": {
"type": "git",
"url": "https://github.com/egulias/EmailValidator.git",
"reference": "c4b8d12921999d8a561004371701dbc2e05b5ece"
"reference": "e834eea5306d85d67de5a05db5882911d5b29357"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/c4b8d12921999d8a561004371701dbc2e05b5ece",
"reference": "c4b8d12921999d8a561004371701dbc2e05b5ece",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/e834eea5306d85d67de5a05db5882911d5b29357",
"reference": "e834eea5306d85d67de5a05db5882911d5b29357",
"shasum": ""
},
"require": {
"doctrine/lexer": "^1.0.1",
"php": ">=5.5"
"php": ">=5.5",
"symfony/polyfill-intl-idn": "^1.10"
},
"require-dev": {
"dominicsayers/isemail": "^3.0.7",
Expand All @@ -90,7 +91,7 @@
"suggest": {
"ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation"
},
"time": "2020-01-05T14:11:20+00:00",
"time": "2020-01-20T21:40:59+00:00",
"type": "library",
"extra": {
"branch-alias": {
Expand Down
44 changes: 41 additions & 3 deletions vendor/egulias/email-validator/EmailValidator/EmailLexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,37 @@ class EmailLexer extends AbstractLexer
'\0' => self::C_NUL,
);

/**
* @var bool
*/
protected $hasInvalidTokens = false;

protected $previous;
/**
* @var array
*
* @psalm-var array{value:string, type:null|int, position:int}|array<empty, empty>
*/
protected $previous = [];

/**
* The last matched/seen token.
*
* @var array
*
* @psalm-var array{value:string, type:null|int, position:int}
*/
public $token;

/**
* The next token in the input.
*
* @var array|null
*/
public $lookahead;

/**
* @psalm-var array{value:'', type:null, position:0}
*/
private static $nullToken = [
'value' => '',
'type' => null,
Expand All @@ -86,6 +113,7 @@ class EmailLexer extends AbstractLexer
public function __construct()
{
$this->previous = $this->token = self::$nullToken;
$this->lookahead = null;
}

/**
Expand All @@ -98,15 +126,20 @@ public function reset()
$this->previous = $this->token = self::$nullToken;
}

/**
* @return bool
*/
public function hasInvalidTokens()
{
return $this->hasInvalidTokens;
}

/**
* @param string $type
* @param int $type
* @throws \UnexpectedValueException
* @return boolean
*
* @psalm-suppress InvalidScalarArgument
*/
public function find($type)
{
Expand All @@ -122,7 +155,7 @@ public function find($type)
/**
* getPrevious
*
* @return array token
* @return array
*/
public function getPrevious()
{
Expand Down Expand Up @@ -196,6 +229,11 @@ protected function getType(&$value)
return self::GENERIC;
}

/**
* @param string $value
*
* @return bool
*/
protected function isValid($value)
{
if (isset($this->charValue[$value])) {
Expand Down
37 changes: 35 additions & 2 deletions vendor/egulias/email-validator/EmailValidator/EmailParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,40 @@ class EmailParser
{
const EMAIL_MAX_LENGTH = 254;

protected $warnings;
/**
* @var array
*/
protected $warnings = [];

/**
* @var string
*/
protected $domainPart = '';

/**
* @var string
*/
protected $localPart = '';
/**
* @var EmailLexer
*/
protected $lexer;

/**
* @var LocalPart
*/
protected $localPartParser;

/**
* @var DomainPart
*/
protected $domainPartParser;

public function __construct(EmailLexer $lexer)
{
$this->lexer = $lexer;
$this->localPartParser = new LocalPart($this->lexer);
$this->domainPartParser = new DomainPart($this->lexer);
$this->warnings = new \SplObjectStorage();
}

/**
Expand Down Expand Up @@ -57,6 +78,9 @@ public function parse($str)
return array('local' => $this->localPart, 'domain' => $this->domainPart);
}

/**
* @return Warning\Warning[]
*/
public function getWarnings()
{
$localPartWarnings = $this->localPartParser->getWarnings();
Expand All @@ -68,18 +92,27 @@ public function getWarnings()
return $this->warnings;
}

/**
* @return string
*/
public function getParsedDomainPart()
{
return $this->domainPart;
}

/**
* @param string $email
*/
protected function setParts($email)
{
$parts = explode('@', $email);
$this->domainPart = $this->domainPartParser->getDomainPart();
$this->localPart = $parts[0];
}

/**
* @return bool
*/
protected function hasAtToken()
{
$this->lexer->moveNext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ class EmailValidator
private $lexer;

/**
* @var array
* @var Warning\Warning[]
*/
protected $warnings;
protected $warnings = [];

/**
* @var InvalidEmail
* @var InvalidEmail|null
*/
protected $error;

Expand Down Expand Up @@ -58,7 +58,7 @@ public function getWarnings()
}

/**
* @return InvalidEmail
* @return InvalidEmail|null
*/
public function getError()
{
Expand Down
Loading

0 comments on commit 3546c99

Please sign in to comment.