Skip to content

Releases: rdapapi/rdapapi-php

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 19 Sep 09:37

Full Changelog: v0.5.1...v0.6.0

v0.5.1

Choose a tag to compare

@github-actions github-actions released this 12 May 07:29

Critical fix

The default base_url was missing a trailing slash, so RFC 3986 / PSR-7 URI
resolution dropped the /api/v1 path prefix and every request hit the
marketing 404 page instead of the API. All users on the default endpoint
must upgrade.

What changed

  • Default base_url now ends with /, and all internal paths are relative.
  • Constructor normalizes a custom base_url without a trailing slash,
    so user-supplied endpoints work too.
  • Regression test asserts the full request URI for every endpoint
    (domain, ip, asn, nameserver, entity, tlds, tld).

Upgrade

composer update rdapapi/rdapapi-php

No code changes required.

Full Changelog: v0.5.0...v0.5.1

v0.5.0

Choose a tag to compare

@boutetnico boutetnico released this 24 Apr 21:12

TLD catalog endpoints

Two new methods list the TLDs the API can resolve and how often each registry's RDAP server populates common fields. Neither endpoint counts against your monthly quota.

$tlds = $api->tlds();
if ($tlds !== null) {
    echo $tlds->meta->count." TLDs, coverage ".round($tlds->meta->coverage * 100)."%\n";

    foreach ($tlds->data as $tld) {
        if ($tld->field_availability !== null) {
            echo "{$tld->tld}: expires_at={$tld->field_availability->expires_at}\n";
        }
    }
}

Filters: since (ISO 8601), server (hostname). Pass the previous etag via if_none_match to skip unchanged transfers. The method returns null on HTTP 304.

$later = $api->tlds(['if_none_match' => $tlds->etag]);
$com = $api->tld('com');

New response classes in RdapApi\Responses\: TldListResponse, TldResponse, TldEntry, TldListMeta, TldMeta, TldThresholds, FieldAvailability.

NotSupportedException

A new NotSupportedException subclass of NotFoundException is thrown on HTTP 404 when the API returns error: "not_supported" (no RDAP coverage for the TLD, IP range, or ASN range). Existing catch (NotFoundException $e) blocks keep working.

use RdapApi\Exceptions\NotFoundException;
use RdapApi\Exceptions\NotSupportedException;

try {
    $api->domain('example.nope');
} catch (NotSupportedException $e) {
    echo "TLD not covered by RDAP\n";
} catch (NotFoundException $e) {
    echo "Domain not registered\n";
}

Install

composer require rdapapi/rdapapi-php:^0.5

Full Changelog: v0.3.0...v0.5.0

v0.3.0

Choose a tag to compare

@boutetnico boutetnico released this 17 Mar 13:05

Full Changelog: v0.2.0...v0.3.0

Full Changelog: v0.2.0...v0.3.0

v0.2.0

Choose a tag to compare

@boutetnico boutetnico released this 28 Feb 10:18

What's New

  • Date convenience methods on Dates: registeredAt(), expiresAt(), updatedAt() (DateTimeImmutable) and expiresInDays() (int)

Full Changelog: v0.1.0...v0.2.0

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 25 Feb 19:20