Closed mehrdadep closed 1 year ago
@mehrdadep thanks for using the library.
I believe the package is behaving as expected. Aren't you making a mistake between the suffix and the registrable domain part ?
eu.org
is the registrable domain (the part of the domain against which you need to register your domain. for instance you can buy test.eu.org
.
The suffix is something else. Please read the documentation of check for more information on the internet.
Yes, you're right. I forget to check the beginning of the private domains section
Based on the behavior of some of the node
packages like psl and parse-domain, either this package is not working as expected or those two.
@mehrdadep I have no knowledge on those package so you should
Hi there again, reopening this issue because right now the packages act differently from when I opened the issue. Running this now outputs eu.org
use Pdp\Rules;
use Pdp\Domain;
// The link is downloaded to this relative path
$publicSuffixList = Rules::fromPath('public.dat');
$domain = Domain::fromIDNA2008('test.eu.org');
$result = $publicSuffixList->resolve($domain)->suffix()->toString();
@mehrdadep please refer to the package CHANGELOG. a patch version was released recently to fix an inconsistency into the private domain parsing.
Issue summary
Incorrect public suffix extraction. Referencing this list for public suffix we know that the
eu.org
is a suffix but the code below returnsorg
. Is there something that I'm missing?System informations
Standalone code, or another way to reproduce the problem
Expected result
eu.org
Actual result
org