Commit Graph

25 Commits

Author SHA1 Message Date
Mark Magyar 68a9ae20bd removed redundant phpdoc - type is already inferred 2023-05-18 00:35:56 +02:00
Alexander M. Turek 17865e0fb7 Fix Lexer 2 compatibility (#349) 2023-01-02 23:13:52 +01:00
Eduardo Gulias Davis 28e911fa56 Resolve conflicts for v4 first commit 2023-01-02 19:00:18 +01:00
Alexander M. Turek 5f35e41eba Allow doctrine/lexer 2 (#345) 2022-12-30 15:09:25 +01:00
Bastien Wermeille 4665415250 Fix psalm type issues info 2022-12-18 23:33:57 +01:00
Bastien Wermeille 7771e2bf2c Fix types issues 2022-12-18 22:43:52 +01:00
Bastien Wermeille f9e4bc5835 Use php nullsafe operator to fix type issues 2022-12-18 22:04:37 +01:00
Bastien Wermeille 0841364b8d Upgrade to doctrine/lexer 3.x 2022-12-18 21:51:37 +01:00
Bastien Wermeille 3d25492123 Fix Tests + Psalm issues 2022-12-15 00:04:10 +01:00
Bastien Wermeille d80748070a Apply feedbacks 2022-12-14 20:29:41 +01:00
Bastien Wermeille 86933da4bb Migrate to doctrine/lexer v2.0 2022-12-14 14:12:31 +01: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
Nicolas Grekas f88dcf4b14 Don't use utf8_en/decode() functions, they're deprecated on PHP 8.2 (#325) 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
2022-05-29 00:19:18 +02: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 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
2021-02-28 15:27:57 +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 35c9db913f Port of comma in domain and README improvement. 2020-11-08 15:57:58 +01: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
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