All notable changes to this project will be documented in this file. The format is based on Keep a Changelog.
2.1.0-beta1 - 2026-02-22
- Require PHP 8.2 as minimum version (was PHP 7.4); remove
symfony/polyfill-php80andsymfony/polyfill-mbstringpolyfill dependencies - Require
ext-mbstringas a hard dependency (was provided by polyfill) - Remove
bin/reloadpslconvenience script entirely — invokebin/update-psl.phpdirectly instead - Require PHPUnit
^11.0only (was^9.6 || ^10.0 || ^11.0)
- Fix
getPublicSuffix()PSL exception-rule handling — exception branch returned one label too many; now correctly returns the exception rule minus its leftmost label (e.g.!city.kawasaki.jpyields public suffixkawasaki.jp, notcity.kawasaki.jp) - Fix
normalizeHost()corrupting IPv6 addresses — the port-stripping regex/:\d+$/mistakenly treated the last hextet of addresses like::1as a port, truncating them; IPv6 literals are now parsed bracket-aware - Fix PSL cache storing IDN rules as Unicode —
bin/update-psl.phpnow normalizes all rules to ASCII/punycode viaidn_to_ascii(), matching the form used bynormalizeDomain()at runtime; previously 457 Unicode keys were unreachable whenext-intlwas loaded - Fix
composer.jsonPHP constraint from"^7.4 || ^8.5"to"^7.4 || ^8.0"(previously excluded PHP 8.0–8.4) - Fix
normalizeDomain()crash on empty string —idn_to_ascii('')throwsValueErroron PHP 8.4+; added$domain !== ''guard - Fix PSL exception tests referencing
parliament.uk(removed from the PSL); replaced with stable entries (www.ck,city.kawasaki.jp) - Fix
bin/update-psl.phpfailing when run standalone on PHP 7.4 —str_starts_with()was called without loading the polyfill autoloader - Fix
getMetadata()unreachable statement
- Add
opcache_invalidate()after atomic cache writes inbin/update-psl.php - Add
is_array()validation for all three PSL cache keys (NORMAL,WILDCARD,EXCEPTION) inloadRules() - Add file size sanity check (100KB–10MB) before
includeinloadRules()to reject corrupt or tampered cache files - Replace suppressed
@unlink()with explicitfile_exists()guard on temp-file cleanup inbin/update-psl.php
- Make
normalizeDomain()aprivate staticmethod (was instance method) - Replace
strpos()/substr()patterns withstr_contains()/str_starts_with()/str_ends_with()(native in PHP 8.0) - Add
@throws PslCacheNotFoundExceptionPHPDoc tags toPublicSuffixList::__construct()andloadRules() - Add XOOPS copyright headers to all source files
- Clarify
README.mdlicense section — library code is Apache-2.0, bundled PSL data is MPL-2.0
- Add
ext-intltosuggestincomposer.json
- Add PSL exception-rule regression tests —
sub.city.kawasaki.jp,city.kawasaki.jp,sub.www.ck,www.ckfor bothgetPublicSuffix()andgetRegisteredDomain() - Add IPv6 normalization tests —
[::1],[::1]:443,[2001:db8::1]:8080forgetRegisteredDomain()anddomainMatches() - Add IDN/punycode PSL cache tests —
公司.cn,xn--55qx5d.cnforisPublicSuffix()andgetPublicSuffix() - Add IDN integration tests —
test.公司.cn,test.xn--55qx5d.cn,公司.cnthrough the fullRegisteredDomainstack - Add
PslCacheNotFoundExceptionTest— exception class, message, code, previous exception - Add edge case tests for
getRegisteredDomain()— trailing dots, URLs with ports - Add
PublicSuffixListtests — empty string, IP addresses,isException, normalization (dots, case) - Add
domainMatches()tests for RFC 6265 cookie domain validation - Expand
getMetadata()assertions —needs_update, wildcard/exception counts
- Add
declare(strict_types=1)tobin/update-psl.php - Add Composer autoloader bootstrap to
bin/update-psl.phpfor standalone execution - Add
composer ciscript chaining lint + analyse + test - Add
composer update-pslandauto-update-pslscripts withXOOPS_SKIP_PSL_UPDATEsupport - Update GitHub Actions CI matrix from PHP 7.4–8.5 to PHP 8.2–8.5; lowest-deps on 8.2, coverage on 8.3
- Fix CI coverage matrix entry running tests twice — added
if: !matrix.coverageguard - Fix SonarCloud workflow using
secretscontext in step-levelif:— moved to job-levelenv - Add GitHub Copilot custom instructions (
.github/copilot-instructions.md) - Add Dependabot configuration for Composer and GitHub Actions
- Add Qodana static analysis workflow
- Add
.editorconfig(UTF-8, LF, PSR-12 indentation) - Convert test
@dataProviderannotations to PHPUnit 11#[DataProvider]attributes - Convert test
@requiresannotations to#[RequiresPhpExtension]attributes - Add PHPUnit 11 XSD schema and
cacheDirectorytophpunit.xml.dist - Standardize
.gitattributeswith LF enforcement and export-ignore list - Standardize
.gitignorewith local config overrides, build artifacts, PHPUnit cache - Track
phpcs.xmlin version control (was previously untracked, causing CI lint failure) - Fix PSR-4 autoload-dev mappings for
tests/unit/andtests/integration/ - Rewrite
README.mdwith current API documentation and usage examples - Remove legacy config files (
.travis0.yml,phpcs.xml.dist,phpcs.xml0.dist,phpunit.xml0.dist,.scrutinizer0.yml,composer0.json,composer1.json)
2.0.2-beta2 - 2025-10-01
- Rewrite
PublicSuffixList— flat-file PSL cache (data/psl.cache.php) replaces tree-based data structure; three-category rule lookup (NORMAL,WILDCARD,EXCEPTION) withO(1)hash lookups - Rewrite
RegisteredDomain— simplified API usingPublicSuffixListfor all PSL queries; addeddomainMatches()for RFC 6265 cookie domain validation - Replace
bin/reloadpslwithbin/update-psl.php— HTTP conditional downloads (ETag/Last-Modified), atomic file writes, metadata tracking - Add custom exception
PslCacheNotFoundExceptionfor missing/invalid cache files - Require
symfony/polyfill-mbstring^1.33
- Add
getMetadata()toPublicSuffixList— cache age, rule counts, staleness warning - Add
isException()toPublicSuffixList— check if a domain is a PSL exception entry - Add
isPublicSuffix()andgetPublicSuffix()public methods toPublicSuffixList - Add integration test suite with real PSL data
- Add PHPStan static analysis (
phpstan.neon, level max) - Add PHP_CodeSniffer with PSR-12 standard
- Add
.scrutinizer.ymlconfiguration - Add
phpunit.xml.distwith unit and integration test suites - Require PHPUnit
^9.6 || ^10.0 || ^11.0
2.0.2-beta1 - 2025-09-10
- Add
.gitattributeswith export-ignore rules - Add PHPStan configuration (
phpstan.neon) - Add PHP_CodeSniffer as a dev dependency
- Add
phpstan/phpstanandsquizlabs/php_codesniffertorequire-dev - Remove backslash prefix from
isset()calls inPublicSuffixList - Update
composer.jsondependencies
2.0.1 - 2024-11-27
- Add
.github/CONTRIBUTING.mdwith contribution guidelines - Add
.github/ISSUE_TEMPLATE/bug-report.ymlwith PHP version dropdown (7.4–8.4) - Add
.github/ISSUE_TEMPLATE/feature-request.yml
- Add PHP 8.4 to Travis CI test matrix
- Update
composer.jsonPHP constraint
2.0.0 - 2024-07-26
- Bump
symfony/polyfill-mbstringconstraint from^1.29.0to^1.30.0
2.0.0-Alpha - 2024-07-08
- Rename namespace from
Geekwright\RegDomtoXoops\RegDom - Modernise codebase for PHP 7.4+ — short array syntax, type hints, Yoda conditions removed
- Replace
PHPUnit_Framework_TestCasewithPHPUnit\Framework\TestCase - Improve
decodePunycode()implementation - Add
is_string()guard to curl return value - Remove redundant type casts and
elsekeywords - Remove
PHP_VERSION_ID < 70000compatibility code - Update Public Suffix List data
- Add GitHub Actions workflow for CI (
pr_tests.yml) - Add Scrutinizer CI configuration
- Add
symfony/polyfill-mbstring^1.29.0as a runtime dependency - Add PSR-4 autoloading via Composer
- Remove
/archivedirectory with legacy files - Remove Travis CI configuration (
.travis.yml)
- Tweak PHP version check for pre-7.0 compatibility (geekwright)
- Fix
unserialize()— limit allowed classes for security (geekwright)
- Limit
unserialize()to prevent object injection (geekwright) - Add Scrutinizer CI configuration (geekwright)
- Remove array access with curly brackets for PHP 7.4 compatibility (geekwright)
- Fix build for PHP 5.4 and 5.5 (geekwright)
- Restructure unit tests (geekwright)
- Simplify Travis CI configuration (geekwright)
- Add PHP 7.2 support (geekwright)
- Update Public Suffix List data (geekwright)
- Fix CI configuration (geekwright)
- Rewrite as OO library under
Geekwright\RegDomnamespace (geekwright) - Add Composer support with PSR-4 autoloading (geekwright)
- Add
PublicSuffixListclass for PSL data management (geekwright) - Add
RegisteredDomainclass for domain extraction (geekwright) - Add
bin/reloadpslscript for PSL updates (geekwright) - Add unit tests with PHPUnit (geekwright)
- Add Scrutinizer CI and Travis CI configurations (geekwright)
- Add workaround for missing
ext-intl(geekwright)
- Import Florian Sager's regdom-php library (Synchro/Marcus Bointon)
- PHP include file for domain registration data (Synchro/Marcus Bointon)