Commit Graph

355 Commits

Author SHA1 Message Date
Eduardo Gulias Davis 1ac0be80b3 bump dependencies and lock 3.2.2 2022-12-29 22:07:24 +01:00
Eduardo Gulias Davis c38e9600fb Merge branch 'derrabus-bump/vendors' into 3.x 2022-12-29 22:01:54 +01:00
Eduardo Gulias Davis 777864f79e Merge branch 'bump/vendors' of https://github.com/derrabus/EmailValidator into derrabus-bump/vendors 2022-12-29 22:01:11 +01:00
Eduardo Gulias Davis ecbcdcef05 Merge branch '3.x' of github.com:egulias/EmailValidator into 3.x 2022-12-29 21:59:01 +01:00
Alexander M. Turek b28de87213 Allow doctrine/lexer 2 (#340) 2022-12-29 21:52:48 +01:00
Alexander M. Turek 6d6a87e5d9 Bump all locked dependencies
- Removing openlss/lib-array2xml (1.0.0)
  - Removing phpspec/prophecy (v1.15.0)
  - Removing webmozart/path-util (2.3.0)
  - Upgrading composer/pcre (3.0.0 => 3.1.0)
  - Locking fidry/cpu-core-counter (0.4.1)
  - Upgrading guzzlehttp/guzzle (7.4.5 => 7.5.0)
  - Upgrading guzzlehttp/promises (1.5.1 => 1.5.2)
  - Upgrading guzzlehttp/psr7 (2.4.0 => 2.4.3)
  - Upgrading netresearch/jsonmapper (v4.0.0 => v4.1.0)
  - Upgrading nikic/php-parser (v4.13.2 => v4.15.2)
  - Upgrading php-coveralls/php-coveralls (v2.5.2 => v2.5.3)
  - Upgrading phpdocumentor/type-resolver (1.6.1 => 1.6.2)
  - Upgrading phpunit/php-code-coverage (9.2.15 => 9.2.23)
  - Upgrading phpunit/phpunit (9.5.20 => 9.5.27)
  - Upgrading sebastian/comparator (4.0.6 => 4.0.8)
  - Upgrading sebastian/exporter (4.0.4 => 4.0.5)
  - Upgrading sebastian/type (3.0.0 => 3.2.0)
  - Locking spatie/array-to-xml (2.17.1)
  - Upgrading symfony/config (v5.4.9 => v5.4.11)
  - Upgrading symfony/console (v5.4.9 => v5.4.16)
  - Upgrading symfony/deprecation-contracts (v2.5.1 => v2.5.2)
  - Upgrading symfony/filesystem (v5.4.9 => v5.4.13)
  - Upgrading symfony/polyfill-ctype (v1.25.0 => v1.27.0)
  - Upgrading symfony/polyfill-intl-grapheme (v1.25.0 => v1.27.0)
  - Upgrading symfony/polyfill-intl-idn (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-intl-normalizer (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-mbstring (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php72 (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php73 (v1.25.0 => v1.27.0)
  - Upgrading symfony/polyfill-php80 (v1.25.0 => v1.27.0)
  - Upgrading symfony/polyfill-php81 (v1.25.0 => v1.27.0)
  - Upgrading symfony/service-contracts (v2.5.1 => v2.5.2)
  - Upgrading symfony/stopwatch (v5.4.5 => v5.4.13)
  - Upgrading symfony/string (v5.4.9 => v5.4.15)
  - Upgrading symfony/yaml (v5.4.3 => v5.4.16)
  - Upgrading vimeo/psalm (4.23.0 => 5.4.0)
  - Upgrading webmozart/assert (1.10.0 => 1.11.0)
2022-12-28 13:45:16 +01:00
Alexis Lefebvre 0170967656 CHANGELOG: Fix typo “Breacking” (#333) 3.2.3 2022-09-03 11:54:08 +02:00
Eduardo Gulias Davis 4c72190f32 Update LICENSE 2022-08-14 20:36:33 +02:00
Mathias Reker ⚡️ 413b263617 Nullable type declaration for default null value (#328)
Adds ? before type declarations for parameters with a default null value
2022-07-13 16:53:11 +02:00
Mathias Reker ⚡️ 18b9e5b572 Visibility required (#329)
Visibility MUST be declared on all properties and methods; abstract and final MUST be declared before the visibility; static MUST be declared after the visibility.
2022-07-13 16:52:42 +02:00
Mathias Reker ⚡️ 1ca313dfcd Single blank line at eof (#330)
A PHP file without end tag must always end with a single empty line feed.
2022-07-13 16:51:51 +02:00
Mathias Reker ⚡️ cf5908bb1a No superfluous elseif (#331)
Replaces superfluous elseif with if.
2022-07-13 16:51:22 +02:00
Mathias Reker ⚡️ b241b54919 No unused imports (#332)
Unused use statements must be removed.
2022-07-13 16:50:27 +02:00
dependabot[bot] 74d2f16d9d Bump guzzlehttp/guzzle from 7.4.3 to 7.4.5 (#326)
Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.4.3 to 7.4.5.
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/master/CHANGELOG.md)
- [Commits](https://github.com/guzzle/guzzle/compare/7.4.3...7.4.5)

---
updated-dependencies:
- dependency-name: guzzlehttp/guzzle
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-24 20:51:04 +02:00
Nicolas Grekas f88dcf4b14 Don't use utf8_en/decode() functions, they're deprecated on PHP 8.2 (#325) 3.2.1 2022-06-18 22:57:19 +02:00
Eduardo Gulias Davis a5ed8d58ed Bug #321 (#323)
* Update dependencies

* dns_get_record wrapper for testing of the function's behaviour

* remove unused classes

* Fix Psalm errors

* Increase PHP Version
3.2
2022-05-29 00:19:18 +02:00
Eduardo Gulias Davis e3c1f426e5 Update dependencies 2022-05-28 17:34:06 +02:00
Daniel Winzen 312b65911f Fixed Spoofchecking link (#314) 2022-02-18 16:25:29 +01:00
Denis Gurov d51b279b5f Typos (#313)
A few typos in README
2022-02-11 18:09:16 +01:00
Robert Fridzema 9aab2ceed6 Typos (#311) 2022-02-04 21:30:40 +01:00
Julien Gidel 007bfd424e Small contribution - code readability improvements (#306)
* Some code improvements - tests same as beginning

* isUTF8Invalid returns a boolean

* Changes for tests passed

* Revert change + scrutinizer to flaky

* Null coalescing on token to return a null token

* Psalm pass and PHPunit too (php 7.4)

* Minor change to set lookahead to nullToken
2021-11-20 22:34:12 +01:00
Eduardo Gulias Davis 5cc04719d0 CI update to min supported version 2021-10-11 18:18:50 +02:00
Eduardo Gulias Davis c70449e7b1 CI update to supported versions in matrix 2021-10-11 18:15:58 +02:00
Eduardo Gulias Davis 36425ab1f9 Merge branch '3.x' of github.com:egulias/EmailValidator into 3.x 2021-10-11 18:11:58 +02:00
Eduardo Gulias Davis 4c7033b422 CI and dependencies update 2021-10-11 18:11:44 +02:00
Eduardo Gulias Davis 037594add3 Code quality 2021-10-11 17:54:24 +02:00
Eduardo Gulias Davis 4cccb8186b Update badges 2021-10-11 17:52:58 +02:00
Samuel Vicent ee0db30118 MultipleErrors->reason always returns [0] and should return first item from associative array (#305)
* Patch MultipleErrors->reason method by getting always the first item - Added Tests and a custom Exception

* Return EmptyReason instead of throwing exception when MultipleErrors has no reasons (validations accomplished)

Co-authored-by: Samuel Vicent <samuel.vicent@takeachef.com>
3.1.2
2021-10-11 11:18:27 +02:00
John Congdon c81f18a3ef Reset the label when a S_DOT is encountered. (#297)
This will allow multi label domain's to still validate correctly.

Reset the label when a S_DOT is encountered.
3.1.1
2021-04-01 20:37:14 +02:00
Dries Vints 95979e2ad6 Add null return type to getError DocBlock (#293) 2021-03-11 14:36:15 +01:00
Eduardo Gulias Davis 62c3b73c58 Update README.md 3.1.0 2021-03-07 15:33:28 +01:00
Eduardo Gulias Davis 8e526a57c1 Message-id validator (#290)
* scafolding for MessageID validation

* Improve domain valid tokens

* Improved EmailParser to remove leaked logic. User of lexer recorder within parsers.

* MessageIDParser passing tests.

* change left for right, which is the right one

* psaml errors

* Better naming

* comments are not allowed in IDLeft for message-id

* Suppress psalm inheritance over tokens and dependencies

* Update src/Parser.php

Co-authored-by: Alexander M. Turek <me@derrabus.de>

* Update src/Parser.php

Co-authored-by: Alexander M. Turek <me@derrabus.de>

* improve parser from comments

Co-authored-by: Alexander M. Turek <me@derrabus.de>
2021-03-06 18:29:10 +01:00
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
3.0.1
2021-02-28 15:27:57 +01:00
Chun-Sheng, Li 04cad1a5ec Fix testing class name and namespaces (#284) 2021-02-07 15:42:56 +01:00
Eduardo Gulias Davis de0fb24141 Typo & correct RFC 2021-01-27 17:48:19 +01:00
Eduardo Gulias Davis c4d50e9cb4 Merge branch '3.x' of github.com:egulias/EmailValidator into 3.x 2021-01-17 15:57:32 +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 bcfcb883df Update CHANGELOG.md 2021-01-04 00:27:46 +01:00
Eduardo Gulias Davis 17e0e0f683 Add internet domains rfc to the list 2020-12-30 12:10:38 +01:00
Eduardo Gulias Davis 3a80c1b2c4 Adding release version 2020-12-30 11:46:34 +01:00
Eduardo Gulias Davis 6d5bca49cd Update CONTRIBUTING.md 2020-12-30 11:31:31 +01:00
Eduardo Gulias Davis 4254b5c77a Badges update 2020-12-29 16:55:55 +01:00
Eduardo Gulias Davis e5df72f45f Final info to changelog 3.0.0 2020-12-29 16:04:19 +01:00
Eduardo Gulias Davis 9b0483cfa3 PHP version policy 2020-12-29 15:57:20 +01:00
Eduardo Gulias Davis d0ea847f77 polish 2020-12-29 15:47:34 +01:00
Eduardo Gulias Davis 226b3fc479 Contributing to older versions 2020-12-29 15:45:49 +01:00
Eduardo Gulias Davis 61f858a16f Adding supported versions 2020-12-28 23:46:39 +01:00
Eduardo Gulias Davis 36ce88d7a9 Licence and .lock file 2020-12-28 12:06:05 +01:00
Eduardo Gulias Davis 819aa5500a removing no longer useful performance tests 2020-12-28 11:55:44 +01:00
Eduardo Gulias Davis cf3467be77 Documentation 2020-12-28 11:54:02 +01:00