Skip to content

Releases: domainvalidity/php-domain-validator

v3.0.1 — security hardening

Choose a tag to compare

@adrorocker adrorocker released this 01 May 17:59
5e32ea9

Security

  • Host::tld() no longer builds a PCRE pattern from a publicly-settable value. Previous code escaped only . characters, leaving every other PCRE metacharacter to land in a dynamic regex unescaped — allowing unintended match behavior, PCRE compile errors, and a small ReDoS surface. The suffix is now removed with str_ends_with + substr.
  • HostParser now uses str_starts_with for scheme detection. The previous strpos(...) !== false check matched http:// / https:// anywhere in the input, mis-classifying URLs containing those literals in their path or query.

Deprecated

v3.0.0 is deprecated. All consumers should upgrade to v3.0.1.

Action required: if you are on 3.0.0, run composer update domainvalidity/php-domain-validator to pick up 3.0.1.

Docs

  • New docs/USAGE.md — full usage guide, secure PSL fetch pattern, caching strategy, complete API reference, worked examples, error handling.
  • README slimmed to a landing page; SECURITY policy updated with a "Known insecure versions" subsection.

See CHANGELOG.md for the full entry.

v3.0.0

Choose a tag to compare

@adrorocker adrorocker released this 31 Jan 07:46
6047827

Breaking Changes

  • Minimum PHP version is now 8.2.0 (was 8.1.0)
    • For PHP 8.1 support, use the v2.x branch

Added

  • Hierarchical suffix list structure for dramatically improved performance
  • Precise recursive type definitions throughout codebase
  • Enhanced type safety with strict PHPStan analysis

Changed

  • ~100-200x faster domain validation through hash-based O(1) lookups
  • Refactored internal suffix parser with hierarchical maps
  • Updated to Pest 3.x and PHPUnit 11.x for modern testing

Dependencies

  • php: ^8.1.0 -> ^8.2.0
  • pestphp/pest: ^2.0 -> ^3.0
  • phpunit/phpunit: ^10.5 -> ^11.5

2.0.3

Choose a tag to compare

@adrorocker adrorocker released this 08 Mar 06:58
b83c559

What's Changed

  • [2.x] - fix(validation): Also try to find the complete TLD when 1st part is not found. by @adrorocker in #4

Full Changelog: 2.0.2...2.0.3

2.0.2

Choose a tag to compare

@adrorocker adrorocker released this 29 Feb 18:49
4687932

What's Changed

  • [2.x] Correctly obtain domain when tld substring is in it by @rickycheers in #3

New Contributors

Full Changelog: 2.0.1...2.0.2

2.0.1

Choose a tag to compare

@adrorocker adrorocker released this 24 Jan 06:26
571c697

What's Changed

New Contributors

Full Changelog: 2.0.0...2.0.1

2.0.0

Choose a tag to compare

@adrorocker adrorocker released this 15 Jan 18:55
668d581

Full Changelog: 1.0.2...2.0.0

1.0.3

Choose a tag to compare

@adrorocker adrorocker released this 15 Jan 18:54
e2986ab

Full Changelog: 1.0.2...1.0.3

1.0.2 - Fix export ignore

Choose a tag to compare

@adrorocker adrorocker released this 27 Jul 16:38
6dd3b40

Full Changelog: 1.0.1...1.0.2

Fix .gitattributes

Choose a tag to compare

@adrorocker adrorocker released this 27 Jul 14:55
eaed72a
1.0.1

Cleanup and export fixes.

Stable functionality

Choose a tag to compare

@adrorocker adrorocker released this 27 Jul 05:43
e946a42
1.0.0

fix: Get rid of non standar characters for a domain.