Alies Lapatsin
451b438902
Use a safe way to execute dns_get_record (v3) ( #286 )
...
* #256 Bypass a PHP warning generated by @dns_get_record
The idea is to create a custom error handler for dns_get_record(), call dns_get_record and then restore the original error handler.
This way we can catch PHP warnings (e.g. "Warning: dns_get_record(): DNS Query failed" or "dns_get_record(): A temporary server error occurred." [ErrorException])
* #256 Make `UnableToGetDNSRecord` reason more testable
* #256 Suppress psalm’s false-positive error
see https://github.com/vimeo/psalm/issues/5134#issuecomment-782937791
* #256 Speed up tests: start from previously failed
* #256 Suppress psalm’s false-positive error
We don’t have a control over AbstractLexer and can’t specify array shape in this parent class
2021-02-28 15:27:57 +01:00
Eduardo Gulias Davis
a7b66b5d5a
Improve test coverage. Exclude Reasons from coverage, they are simple implementations of interface with only informative data
2021-01-17 15:57:03 +01:00
Eduardo Gulias Davis
47129ff2a4
Polish
2020-12-28 10:56:22 +01:00
Eduardo Gulias Davis
f72a7a1854
Port @vajexal #278
2020-12-28 10:40:47 +01:00
Eduardo Gulias Davis
cc695081fd
new home for extra validations
2020-12-05 23:34:35 +01:00
Eduardo Gulias Davis
a9d9083a9c
new home for comment strategies
2020-12-05 23:33:00 +01:00
Eduardo Gulias Davis
790881fe75
improving types
2020-12-05 23:16:56 +01:00
Eduardo Gulias Davis
3dc66acf64
domain improvements over UTF16 and invalid ascii chars
2020-12-05 22:58:13 +01:00
Eduardo Gulias Davis
c41a7b491e
Improve domain validation
2020-11-14 23:29:20 +01:00
Eduardo Gulias Davis
a7a69112df
complaying to RFC1035 about domain names
2020-11-10 11:22:03 +01:00
Eduardo Gulias Davis
e00a58a84e
Label and domain name validation
2020-11-10 11:08:53 +01:00
Eduardo Gulias Davis
c0e4efaeb0
Separation of tests to prepare for strictier domain validation
2020-11-10 10:36:53 +01:00
Eduardo Gulias Davis
729ecb2a35
Psalm fixes
2020-11-08 16:19:44 +01:00
Eduardo Gulias Davis
35c9db913f
Port of comma in domain and README improvement.
2020-11-08 15:57:58 +01:00
Eduardo Gulias Davis
cbe0d20542
fix #188 , adding TLD warnings
2020-10-10 18:47:15 +02:00
Eduardo Gulias Davis
e5bdc237eb
Fixing Psalm erros
2020-10-03 17:43:06 +02:00
Eduardo Gulias Davis
5455d688c1
Part extraction improvement with lexer recording. Reported in #181
2020-10-03 17:37:57 +02:00
Eduardo Gulias Davis
ce879d7d10
Fix Space after end of domain. #217
2020-09-26 16:30:00 +02:00
Eduardo Gulias Davis
49b18fbcfc
Remove deprecation, comes from #257
2020-09-19 16:37:33 +02:00
Eduardo Gulias Davis
e72f606ae3
Typo
2020-09-19 16:35:09 +02:00
Eduardo Gulias Davis
98ebd59e53
Psalm erros fixed
2020-09-19 16:33:03 +02:00
Eduardo Gulias Davis
9512ac0b19
Psalm errors plus test for MultipleErrors reason and improved multi validation tests
2020-09-19 16:17:03 +02:00
Eduardo Gulias Davis
8405dcde01
Added invalidtaion for backslash in domain literal and test data
2020-09-19 15:50:04 +02:00
Eduardo Gulias Davis
b76c116718
Psaml run 1
2020-09-12 16:55:59 +02:00
Eduardo Gulias Davis
afd6bcba6a
polish
2020-09-12 16:42:19 +02:00
Eduardo Gulias Davis
044b1d55d9
Return type in signature
2020-09-12 16:41:06 +02:00
Eduardo Gulias Davis
a7ebdba30a
Redefine parser signature
2020-09-12 16:35:38 +02:00
Eduardo Gulias Davis
0ba6f87f8e
Adjusting duplicated methods
2020-09-12 16:25:24 +02:00
Eduardo Gulias Davis
bad6b501d5
Removing obsolete exceptions
2020-09-12 16:10:20 +02:00
Eduardo Gulias Davis
5faf182cca
Minor polish
2020-09-12 16:02:00 +02:00
Eduardo Gulias Davis
b3a339b998
Evaluate comma ',' in domain part
2020-09-12 15:53:55 +02:00
Eduardo Gulias Davis
87ae1be93a
Rename reason usage
2020-09-12 15:47:56 +02:00
Eduardo Gulias Davis
1f6c674510
Removed obsolete exceptions
2020-09-12 15:45:30 +02:00
Eduardo Gulias Davis
bf39b372c1
update DNS validation
2020-09-12 15:43:58 +02:00
Eduardo Gulias Davis
3647ed6037
Fix #260 reporting an unhandled exception
2020-09-06 15:17:48 +02:00
Eduardo Gulias Davis
e2e234c4d8
merging from master, folder structure change
2020-08-30 15:59:42 +02:00
BenHarris
840d5603eb
Reimplement DNSCheckValidation ( #250 )
...
* Reimplement DNSCheckValidation to utilise get_dns_record and extend support for detection of Null MX records (RFC7505) and reserved, mDNS and private namespaces (RFC2606 & RFC6762)
* Change valid email tests to use github.com instead of example.com as example.com now (correctly) fails the tests due to the Null MX case
* Tweak to pass CI psalm issue
* Encapsulate dns check code. Simplify local and reserved domain checks. Switch test domain
* Set PHPDoc return type
* Use strict comparisons
2020-08-08 23:28:19 +02:00
Simon Schaufelberger
cfa3d44471
Move files in typical src and tests folder ( #242 )
...
* Move files in typical src and tests folder
* Fix psalm error
2020-06-16 22:11:17 +02:00
Eduardo Gulias Davis
68aae522c4
moving code around
2016-05-07 15:45:55 +02:00
Roland Franssen
102932acf8
check for escaped double quotes in local part ( #102 )
2016-05-02 16:04:07 +02:00
Eduardo Gulias Davis
8c4213336e
#64 NoRFCWarnings ( #99 )
2016-04-30 16:04:24 +02:00
Eduardo Gulias Davis
6484b80486
DNS validation. Closes #63 ( #98 )
2016-04-30 14:02:24 +02:00
Eduardo Gulias Davis
ed861e1696
RFCValidation strategy, multiple validation ( #96 )
...
closes #62
2016-04-30 12:35:17 +02:00
Eduardo Gulias Davis
0f768c989e
#62 - Change validation interface
2016-04-30 00:48:07 +02:00
Eduardo Gulias Davis
fa5dd33577
#66 custom warnings ( #94 )
...
close #66 custom warnings
2016-04-29 01:02:18 +02:00
Eduardo Gulias Davis
d29b96ba7c
Merge branch 'master' into 60-custom-exceptions
...
Conflicts:
src/Egulias/EmailValidator/Parser/DomainPart.php
src/Egulias/EmailValidator/Parser/LocalPart.php
src/Egulias/EmailValidator/Parser/Parser.php
tests/egulias/Tests/EmailValidator/EmailValidatorTest.php
2015-10-12 11:53:11 +02:00
Andrei Sozonov
c3a5dfb681
opened parenthesis converted to class field
2015-10-06 10:48:39 +03:00
Andrei Sozonov
eb1755efbf
#80 validate number of closing parenthesis
2015-10-02 12:42:25 +03:00
Eduardo Gulias Davis
d915e443f5
New exception
2015-08-15 23:49:12 +02:00
Eduardo Gulias Davis
4ab34b1c72
CRNoLF
2015-06-26 15:10:20 +02:00