For example, consider the TLD eu.org - it is listed as a valid private domain, but it is also a part of other valid private domains:
// EU.org https://eu.org/
// Submitted by Pierre Beyssac <hostmaster@eu.org>
eu.org
al.eu.org
asso.eu.org
at.eu.org
au.eu.org
...
After the changes in https://github.com/jeremykendall/php-domain-parser/pull/322, domains such as test-domain.eu.org are not recognised as private domains:
PHP Fatal error: Uncaught Pdp\UnableToResolveDomain: The domain "test-domain.eu.org" does not contain a "private" TLD.
Only lower-level entries, such as test-domain.au.eu.org are recognised properly.
System informations
Information
Description
Pdp version
6.1.1
PHP version
*
OS Platform
*
Standalone code, or other way to reproduce the problem
Issue summary
The changes introduced with https://github.com/jeremykendall/php-domain-parser/pull/322 broke the resolution of private domains that contain valid higher-level suffixes.
For example, consider the TLD
eu.org
- it is listed as a valid private domain, but it is also a part of other valid private domains:After the changes in https://github.com/jeremykendall/php-domain-parser/pull/322, domains such as
test-domain.eu.org
are not recognised as private domains:PHP Fatal error: Uncaught Pdp\UnableToResolveDomain: The domain "test-domain.eu.org" does not contain a "private" TLD.
Only lower-level entries, such as
test-domain.au.eu.org
are recognised properly.System informations
Standalone code, or other way to reproduce the problem
Expected result
private domain {"domain":"test-domain.eu.org","subdomain":null,"registrable_domain":"test-domain.eu.org","second_level_domain":"test-domain"}
Actual result
PHP Fatal error: Uncaught Pdp\UnableToResolveDomain: The domain "test-domain.eu.org" does not contain a "private" TLD.