PackageTrack
Sign in Get early access

jeremykendall/php-domain-parser

Public Suffix List and IANA Root Zone Database based Domain parsing implemented in PHP.

6.4.0 15M downloads/mo #1093 most downloaded on Packagist jeremykendall/php-domain-parser

What this package is like to depend on

Last release 1 years ago

26 Apr 2025

Release timing varies

gaps range from 3 weeks to 1.7 years

Some releases are documented

notes for 18 of 44 stable releases

Nothing withdrawn

no release was ever pulled

14 years old

48 releases · first in 2013

0 releases in the last 12 months

see the full history below

Release timeline

48 releases · Jan 2013 to Apr 2025
2014 2016 2018 2020 2022 2024 2026
Release Pre-release

Releases

latest 48
  1. 6.4.0 26 Apr 2025
    Release notes

    Added

    • DomainName::withRootLabel, DomainName::withoutRootLabel, DomainName::isAbsolute methods to handle absolute domain names.
    • DomainName::when to allow conditionable when building the domain.

    Fixed

    • Absolute domain name can now also be resolved by the package see issue #361 prior to this release an exception was thrown.
    • Since we no longer support PHP7 type hint and return type are improved.
    • Resolving private suffixes that have a wildcarded subdomain suffix #363 by @wikando-ck

    Warning

    When upgrading to version 6.4 you MUST refresh your local cache for the fix on private domain resolution to take effect.

    Deprecated

    • None

    Removed

    • None
    Open source →
    Release notes

    Added

    • DomainName::withRootLabel, DomainName::withoutRootLabel, DomainName::isAbsolute methods to handle absolute domain names.
    • DomainName::when to allow conditionable when building the domain.

    Fixed

    • Absolute domain name can now also be resolved by the package see issue #361 prior to this release an exception was thrown.
    • Since we no longer support PHP7 type hint and return type are improved.
    • Resolving private suffixes that have a wildcarded subdomain suffix #363 by @wikando-ck (Once downloaded and installed you MUST refresh your cache to enable the fix to work.)

    Deprecated

    • None

    Removed

    • None
    Open source →
    Release notes

    6.4.0 Latest

    Latest

    Compare

    Choose a tag to compare

    Open source →
  2. 6.3.1 10 Nov 2024
    Release notes

    What's Changed

    Open source →
    Release notes

    version 6.3.1

    Compare

    Choose a tag to compare

    Open source →
  3. 6.3.0 25 Feb 2023
    Release notes

    Added

    • RegisteredName class to allow domain with IP4-like labels

    Fixed

    • Using PHPUnit 10
    • Domain decorates the new RegisteredName class #347
    • Host::withoutLabel works without arguments.

    Deprecated

    • None

    Removed

    • None
    Open source →
    Release notes

    Added

    • RegisteredName class to allow domain with IP4-like labels

    Fixed

    • Using PHPUnit 10
    • Domain decorates the new RegisteredName class #347
    • Host::withoutLabel works without arguments.

    Deprecated

    • None

    Removed

    • None
    Open source →
    Release notes

    version 6.3.0

    Compare

    Choose a tag to compare

    Open source →
  4. 6.2.0 05 Nov 2022
    Release notes

    Added

    • None

    Fixed

    • Internal code to make services readonly

    • Internal code to make VO properties readonly

    • Internal code improved typehinting

    • Deprecated

    • None

    Removed

    • PHP7 and PHP8.0 support
    Open source →
    Release notes

    Added

    • None

    Fixed

    • None

    Deprecated

    • None

    Removed

    • PHP7 and PHP8.0 support
    Open source →
    Release notes

    version 6.2.0

    Compare

    Choose a tag to compare

    Open source →
  5. 6.1.2 29 Sep 2022
    Release notes

    Added

    • None

    Fixed

    • #321 remove regression when resolving private domain suffix.

    Deprecated

    • None

    Removed

    • None
    Open source →
    Release notes

    Added

    • None

    Fixed

    • #321 remove regression to resolving private domain suffix.

    Deprecated

    • None

    Removed

    • None
    Open source →
    Release notes

    version 6.1.2

    Compare

    Choose a tag to compare

    Open source →
  6. 6.1.1 18 Feb 2022
    Release notes

    Added

    • None

    Fixed

    • #321 improve resolving private domain suffix. Rules::getPrivateDomain is more restrictive It will throw if the domain name does not contain a valid "private" TLD.

    Deprecated

    • None

    Removed

    • None
    Open source →
    Release notes

    Added

    • None

    Fixed

    • #321 improve resolving private domain suffix. Rules::getPrivateDomain will now throw if the domain name does not contain a "private" TLD.

    Deprecated

    • None

    Removed

    • None
    Open source →
    Release notes

    version 6.1.1

    Compare

    Choose a tag to compare

    Open source →
  7. 6.1.0 19 Jun 2021
    Release notes

    Added

    • TimeToLive::until
    • TimeToLive::fromDurationString

    Fixed

    • .gitattributes files to be filter out.
    • TimeToLive marked as internal
    • Host::toUnicode method MUST never throw exceptions on conversion according to RFC3490.
    • UnableToResolveDomain typo in the exception message

    Deprecated

    • TimeToLive::fromDateTimeInterface use TimeToLive::fromNow
    • TimeToLive::fromScalar use TimeToLive::convert

    Removed

    • None
    Open source →
    Release notes

    Added

    • TimeToLive::until
    • TimeToLive::fromDurationString

    Fixed

    • .gitattributes files to be filter out.
    • TimeToLive marked as internal
    • Host::toUnicode method MUST never throw exceptions on conversion according to RFC3490.
    • UnableToResolveDomain typo in the exception message

    Deprecated

    • TimeToLive::fromDateTimeInterface use TimeToLive::fromNow
    • TimeToLive::fromScalar use TimeToLive::convert

    Removed

    • None
    Open source →
    Release notes

    version 6.1.0

    Compare

    Choose a tag to compare

    Open source →
  8. 6.0.0 13 Dec 2020
    Release notes

    Added

    • Adding proper Interfaces
    • Added Domain::clear to easily initialize an empty domain object
    • Added Domain::slice to easily slice a domain object
    • Added ResolvedDomain object to normalize Resolver results.
    • Added Suffix object to replace the PublicSuffix object from v5.
    • Public Suffix List and IANA Top Level Domain List are fully decoupled
    • Added Idna, IDN support has been completely revamped
    • Added internal Stream class, to improve path/stream resolution
    • Resolver uses by default UTS#46 IDNA2008 algorithm to convert domain names
    • Storage capability is now optional and can be based on PHP-FIG related interfaces to improve interoperability
    • Pdp\TopLevelDomains::getIANADomain which throws on syntax error and if no effective TLD is found (behave like Pdp\TopLevelDomains::resolve in v5).

    Fixed

    • The Pdp\Domain class not longer directly exposes Effective TLD status.
    • Effective TLD resolver (Pdp\Rules::resolve and Pdp\TopLevelDomains::resolve) no longer accept IDNA options.
    • Rules::getICANNDomain, Rules::getPrivateDomain will throw even if a PublicSuffix is found but does not belong to the correct PSL section.
    • Pdp\TopLevelDomains::resolve acts like Pdp\Rules::resolve and only throw on TypeError

    Deprecated

    • None

    Removed

    • __toString and __debugInfo usage
    • Support for PHP7.4-
    • Composer script for automatic updates of the remote databases
    • CLI command bin/update-psl
    • Pdp\Cache, Pdp\CacheException: The package PSR-16 Cache implementation using the underlying filesystem.
    • Pdp\HttpClient, Pdp\CurlHttpClient and Pdp\HttpClientException: The package Http Client.
    • Pdp\Installer, Pdp\Manager: The package source manager and installer
    • Pdp\Logger, The package logger implementation
    • Pdp\Rules::ALL_DOMAINS constant deprecated in version 5.3
    • Pdp\Domain::getDomain deprecated in version 5.3
    • Pdp\Domain::resolve
    • Pdp\Domain::getPublicSuffix replaced by Pdp\ResolvedDomain::suffix
    • Pdp\Domain::getRegistrableDomain replaced by Pdp\ResolvedDomain::registrableDomain
    • Pdp\Domain::getSubDomain replaced by Pdp\ResolvedDomain::subDomain
    • Pdp\Domain::withPublicSuffix replaced by Pdp\ResolvedDomain::withSuffix
    • Pdp\Domain::getLabel replaced by Pdp\Domain::label
    • Pdp\Domain::isTransitionalDifferent replaced by Pdp\IdnaInfo::isTransitionalDifferent
    • Pdp\PublicSuffix replaced by Pdp\Suffix
    • Accessing suffix information from the Pdp\Domain object is no longer possible you need to do it from Pdp\Suffix
    • Pdp\TopLevelDomains::contains without replacement
    • Internal Converter classes (implementation details are no longer exposed).
    Open source →
    Release notes

    Added

    • Adding proper Interfaces
    • Added Domain::clear to easily initialize an empty domain object
    • Added Domain::slice to easily slice a domain object
    • Added ResolvedDomain object to normalize Resolver results.
    • Added Suffix object to replace the PublicSuffix object from v5.
    • Public Suffix List and IANA Top Level Domain List are fully decoupled
    • Added Idna, IDN support has been completely revamped
    • Added internal Stream class, to improve path/stream resolution
    • Resolver uses by default UTS#46 IDNA2008 algorithm to convert domain names
    • Storage capability is now optional and can be based on PHP-FIG related interfaces to improve interoperability
    • Pdp\TopLevelDomains::getIANADomain which throws on syntax error and if no effective TLD is found (behave like Pdp\TopLevelDomains::resolve in v5).

    Fixed

    • The Pdp\Domain class not longer directly exposes Effective TLD status.
    • Effective TLD resolver (Pdp\Rules::resolve and Pdp\TopLevelDomains::resolve) no longer accept IDNA options.
    • Rules::getICANNDomain, Rules::getPrivateDomain will throw even if a PublicSuffix is found but does not belong to the correct PSL section.
    • Pdp\TopLevelDomains::resolve acts like Pdp\Rules::resolve and only throw on TypeError

    Deprecated

    • None

    Removed

    • __toString and __debugInfo usage
    • Support for PHP7.4-
    • Composer script for automatic updates of the remote databases
    • CLI command bin/update-psl
    • Pdp\Cache, Pdp\CacheException: The package PSR-16 Cache implementation using the underlying filesystem.
    • Pdp\HttpClient, Pdp\CurlHttpClient and Pdp\HttpClientException: The package Http Client.
    • Pdp\Installer, Pdp\Manager: The package source manager and installer
    • Pdp\Logger, The package logger implementation
    • Pdp\Rules::ALL_DOMAINS constant deprecated in version 5.3
    • Pdp\Domain::getDomain deprecated in version 5.3
    • Pdp\Domain::resolve
    • Pdp\Domain::getPublicSuffix replaced by Pdp\ResolvedDomain::suffix
    • Pdp\Domain::getRegistrableDomain replaced by Pdp\ResolvedDomain::registrableDomain
    • Pdp\Domain::getSubDomain replaced by Pdp\ResolvedDomain::subDomain
    • Pdp\Domain::withPublicSuffix replaced by Pdp\ResolvedDomain::withSuffix
    • Pdp\Domain::getLabel replaced by Pdp\Domain::label
    • Pdp\Domain::isTransitionalDifferent replaced by Pdp\IdnaInfo::isTransitionalDifferent
    • Pdp\PublicSuffix replaced by Pdp\Suffix
    • Accessing suffix information from the Pdp\Domain object is no longer possible you need to do it from Pdp\Suffix
    • Pdp\TopLevelDomains::contains without replacement
    • Internal Converter classes (implementation details are no longer exposed).
    Open source →
    Release notes

    version 6.0.0

    Compare

    Choose a tag to compare

    Open source →
  9. 5.7.2 26 Oct 2020
    Release notes

    Added

    • None

    Fixed

    Deprecated

    • None

    Removed

    • None
    Open source →
    Release notes

    Added

    • None

    Fixed

    Deprecated

    • None

    Remove

    • None
    Open source →
    Release notes

    version 5.7.2

    Compare

    Choose a tag to compare

    Open source →
  10. 5.7.1 24 Aug 2020
    Release notes

    Added

    • None

    Fixed

    • Cache throws when cache directory doesn't exist #280

    Deprecated

    • None

    Removed

    • None
    Open source →
    Release notes

    Added

    • None

    Fixed

    • Cache throws when cache directory doesn't exist #280

    Deprecated

    • None

    Removed

    • None
    Open source →
    Release notes

    version 5.7.1

    Compare

    Choose a tag to compare

    Open source →
  11. 5.7.0 03 Aug 2020
    Release notes

    Added

    • Rules::getCookieDomain
    • Rules::getICANNDomain
    • Rules::getPrivateDomain
    • CouldNotResolvePublicSuffix::dueToUnresolvableDomain

    Fixed

    • Improve type hinting and return type by dropping EOL PHP versions support.
    • Improve development environment by dropping EOL PHP versions support.
    • Composer script

    Deprecated

    • None

    Removed

    • Support for PHP7.0 and PHP7.1
    • The external data from IANA and mozilla is no longer part of the package and will be downloaded only on demand on composer update/install.
    Open source →
  12. 5.6.0 29 Dec 2019
    Release notes

    Added

    • A simple Psr3 compatible logger class which output the logs to you cli console.

    Fixed

    • composer.json updated to be composer 2.0 ready
    • package bundle installer is rewritten to improve its usage see #249 and #250

    Deprecated

    • None

    Removed

    • None
    Open source →
  13. 5.5.0 14 Apr 2019
    Release notes

    Added

    • Support for IDNA options see #236 thanks to Insolita.

    • PublicSuffix::labels and Domain::labels to return the VO labels see #241

    • IDNAConverterTrait::parse (internal)

    Fixed

    • Don't swallow cache errors #232
    • Update travis settings to allow testing against future version of PHP.

    Deprecated

    • IDNAConverterTrait::setLabels replaced by IDNAConverterTrait::parse (internal)

    Removed

    • None
    Open source →
  14. 5.4.0 22 Nov 2018
    Release notes

    Added

    • Pdp\TopLevelDomains to allow resolving domain againts IANA Root zone database
    • Pdp\TLDConverter converts the IANA Root Zones database into an associative array
    • Pdp\Manager::getTLDs a service to return a cache version of the IANA Root zone database
    • Pdp\Manager::refreshTLDs a service to refresh the cache version of the IANA Root zone database
    • added a new $ttl parameter to improve PSR-16 supports to
      • Pdp\Manager::__construct
      • Pdp\Manager::getRules
      • Pdp\Manager::refreshRules
    • Pdp\Exception\CouldNotLoadTLDs exception

    Fixed

    • Pdp\IDNAConverterTrait::setLabels improve IDN domain handling
    • Pdp\IDNAConverterTrait throws a UnexpectedValueException if the Intl extension is misconfigured see #230

    Deprecated

    • None

    Removed

    • None
    Open source →
  15. 5.3.0 22 May 2018
    Release notes

    Added

    • Pdp\PublicSuffixListSection interface implemented by Pdp\Rules and Pdp\PublicSuffix
    • Pdp\DomainInterface interface implemented by Pdp\Domain and Pdp\PublicSuffix
    • Pdp\Domain::getContent replaces Pdp\Domain::getDomain
    • Pdp\Domain::withLabel adds a new label to the Pdp\Domain.
    • Pdp\Domain::withoutLabel removes labels from the Pdp\Domain.
    • Pdp\Domain::withPublicSuffix updates the Pdp\Domain public suffix part.
    • Pdp\Domain::withSubDomain updates the Pdp\Domain sub domain part.
    • Pdp\Domain::append appends a label to Pdp\Domain.
    • Pdp\Domain::prepend prepends a label to Pdp\Domain.
    • Pdp\Domain::resolve attach a public suffix to the Pdp\Domain.
    • Pdp\Domain::isResolvable tells whether the current Pdp\Domain can have a public suffix attached to it or not.
    • Pdp\PublicSuffix::createFromDomain returns a new Pdp\PublicSuffix object from a Pdp\Domainobject
    • Pdp\Exception sub namespace to organize exception. All exception extends the Pdp\Exception class to prevent BC break.

    Fixed

    • Pdp\Domain domain part computation (public suffix, registrable domain and sub domain)
    • Pdp\Domain and Pdp\PublicSuffix host validation compliance to RFC improved
    • Improve Pdp\Converter and Pdp\Manager class to better report error on IDN conversion.
    • Improve Pdp\Installer vendor directory resolution see PR #222
    • Pdp\Exception nows extends InvalidArgumentException instead of RuntimeException

    Deprecated

    • Pdp\Domain::getDomain use instead Pdp\Domain::getContent
    • Pdp\Rules::ALL_DOMAINS use the empty string instead

    Removed

    • None
    Open source →
  16. 5.2.0 23 Feb 2018
    Release notes

    Added

    • Pdp\Rules::getPublicSuffix returns a Pdp\PublicSuffix value object
    • Pdp\Rules::__set_state is implemented
    • Pdp\Domain::toUnicode returns a Pdp\Domain with its value converted to its Unicode form
    • Pdp\Domain::toAscii returns a Pdp\Domain with its value converted to its AScii form
    • Pdp\PublicSuffix::toUnicode returns a Pdp\PublicSuffix with its value converted to its Unicode form
    • Pdp\PublicSuffix::toAscii returns a Pdp\PublicSuffix with its value converted to its AScii form

    Fixed

    • Pdp\Domain::getDomain returns the normalized form of the domain name
    • Pdp\PublicSuffix is no longer internal.
    • Normalizes IDN conversion using a internal IDNConverterTrait
    • Internal code improved by requiring PHPStan for development

    Deprecated

    • None

    Removed

    • None
    Open source →
  17. 5.1.0 18 Dec 2017
    Release notes

    Added

    • Pdp\Rules::createFromPath named constructor to returns a new instance from a path
    • Pdp\Rules::createFromString named constructor to returns a new instance from a string

    Fixed

    • None

    Deprecated

    • None

    Removed

    • None
    Open source →
  18. 5.0.0 13 Dec 2017
    Release notes

    Added

    • Pdp\Exception a base exception for the library
    • Pdp\Rules a class to resolve domain name against the public suffix list
    • Pdp\Domain an immutable value object to represents a parsed domain name
    • Pdp\Installer a class to enable improve PSL maintenance
    • Pdp\Cache a PSR-16 file cache implementation to cache a local copy of the PSL
    • Pdp\Manager a class to enable managing PSL sources and Rules objects creation
    • Pdp\Converter a class to convert the PSL into a PHP array

    Fixed

    • invalid domain names improved supported
    • idn_* conversion error better handled
    • domain name with RFC3986 encoded string improved supported

    Deprecated

    • None

    Removed

    • PHP5 support
    • URL Parsing capabilities and domain name validation
    • Pdp\PublicSuffixList class replaced by the Pdp\Rules class
    • Pdp\PublicSuffixManager class replaced by the Pdp\Manager class
    • Pdp\HttpAdapter\HttpAdapterInterface interface replaced by the Pdp\HttpClient interface
    • Pdp\HttpAdapter\CurlHttpAdapter class replaced by the Pdp\CurlHttpClient class
    Open source →
  19. 4.0.3-alpha 28 Sep 2017 pre-release

    Nothing published for this version

  20. 4.0.2-alpha 28 Sep 2017 pre-release

    Nothing published for this version

  21. 4.0.1-alpha 21 Aug 2017 pre-release

    Nothing published for this version

  22. 4.0.0-alpha 08 Feb 2016 pre-release

    Nothing published for this version

  23. 3.0.0 30 Mar 2015

    Nothing published for this version

  24. 2.0.3 16 Feb 2015

    Nothing published for this version

  25. 2.0.2 12 Feb 2015

    Nothing published for this version

  26. 2.0.1 27 Jan 2015

    Nothing published for this version

  27. 2.0.0 02 Jan 2015

    Nothing published for this version

  28. 1.4.6 28 Jul 2014

    Nothing published for this version

  29. 1.4.5 22 Jul 2014

    Nothing published for this version

  30. 1.4.4 21 Jul 2014

    Nothing published for this version

  31. 1.4.3 21 Jul 2014

    Nothing published for this version

  32. 1.4.2 21 Jul 2014

    Nothing published for this version

  33. 1.4.1 21 Jul 2014

    Nothing published for this version

  34. 1.4.0 21 Jul 2014

    Nothing published for this version

  35. 1.3.1 10 Jun 2014

    Nothing published for this version

  36. 1.3.0 15 May 2014

    Nothing published for this version

  37. 1.2.1 02 Feb 2014

    Nothing published for this version

  38. 1.2.0 02 Feb 2014

    Nothing published for this version

  39. 1.1.0 24 Dec 2013

    Nothing published for this version

  40. 1.0.0 23 Dec 2013

    Nothing published for this version

  41. 0.0.8 16 Oct 2013

    Nothing published for this version

  42. 0.0.7 27 Apr 2013

    Nothing published for this version

  43. 0.0.6 29 Jan 2013

    Nothing published for this version

  44. 0.0.5 24 Jan 2013

    Nothing published for this version

  45. 0.0.4 23 Jan 2013

    Nothing published for this version

  46. 0.0.3 17 Jan 2013

    Nothing published for this version

  47. 0.0.2 16 Jan 2013

    Nothing published for this version

  48. 0.0.1 15 Jan 2013

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive