PHPackages                             hiqdev/rdap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hiqdev/rdap

ActiveProject[Utility &amp; Helpers](/categories/utility)

hiqdev/rdap
===========

Registration Data Access Protocol – core objects implemantation package accodring to the RFC 7483

5965[1 issues](https://github.com/hiqdev/rdap/issues)PHPCI failing

Since Jan 15Pushed yesterday3 watchersCompare

[ Source](https://github.com/hiqdev/rdap)[ Packagist](https://packagist.org/packages/hiqdev/rdap)[ RSS](/packages/hiqdev-rdap/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

hiqdev/rdap
===========

[](#hiqdevrdap)

PHP library implementing core RDAP objects, serialization, and provider interfaces according to [RFC 7483](https://tools.ietf.org/html/rfc7483) / [RFC 9083](https://tools.ietf.org/html/rfc9083).

Requirements
------------

[](#requirements)

- PHP 8.1+
- `symfony/serializer`

Installation
------------

[](#installation)

```
composer require hiqdev/rdap:dev-master
```

Architecture
------------

[](#architecture)

The library is split into two layers:

**`Domain/`** — pure protocol objects with no external dependencies:

NamespaceContents`Domain/Entity``Domain`, `Entity`, `Nameserver`, `AutNum`, `IPNetwork`, `VCard``Domain/ValueObject``DomainName`, `Event`, `Link`, `Notice`, `SecureDNS`, `IpAddresses`, …`Domain/Constant`Native PHP 8.1 enums: `Role`, `Status`, `EventAction`, `ObjectClassName`**`Infrastructure/`** — interfaces and default implementations for building RDAP responses:

NamespaceContents`Infrastructure/Provider`Builder interfaces and implementations (see below)`Infrastructure/Storage``DomainInfoStorageInterface``Infrastructure/DTO``DomainData`, `ContactData`, `DnsSecData``Infrastructure/Query``DomainNamesQuery``Infrastructure/Serialization``SerializerInterface`, Symfony implementationBuilders
--------

[](#builders)

`DomainBuilder` assembles a `Domain` object from raw DTOs. It delegates to four focused sub-builders, each with its own interface:

InterfaceDefault implementationResponsibility`ContactBuilderInterface``ContactBuilder`Builds `Entity[]` with `VCard` from `ContactData[]``RegistrarBuilderInterface``RegistrarBuilder`Builds the registrar + abuse `Entity` from env vars`NoticeBuilderInterface``NoticeBuilder`Builds `Notice[]` with `Link` from a config array`SecureDnsBuilderInterface``SecureDnsBuilder`Builds a `SecureDNS` object from `DnsSecData[]`All four interfaces are injected into `DomainBuilder` via constructor, so any implementation can be swapped through DI.

### Implementing a custom builder

[](#implementing-a-custom-builder)

```
use hiqdev\rdap\core\Infrastructure\Provider\RegistrarBuilderInterface;
use hiqdev\rdap\core\Domain\Entity\Entity;

final class MyRegistrarBuilder implements RegistrarBuilderInterface
{
    public function build(): Entity
    {
        $entity = new Entity();
        // populate from your own source
        return $entity;
    }
}
```

Domain repository interfaces
----------------------------

[](#domain-repository-interfaces)

To feed data into `DomainProvider`, implement the three repository interfaces:

InterfaceMethodReturns`DomainRepositoryInterface``findDomainByName(string)``DomainData``DomainNamesRepositoryInterface``getDomainNames(DomainNamesQuery)``iterable``UpdateDomainInterface``setSuccessUpdateStatus(string)``void`Storage interface
-----------------

[](#storage-interface)

`DomainInfoStorageInterface` abstracts where serialized RDAP JSON is kept:

```
interface DomainInfoStorageInterface
{
    public function save(string $domainName, string $json): void;
    public function find(string $domainName): ?string;
    public function delete(string $domainName): void;
    public function removeNotUpdatedSince(\DateTimeImmutable $threshold): void;
}
```

DTOs
----

[](#dtos)

### `DomainData`

[](#domaindata)

Constructed with raw strings from the database. Date fields are converted to `DateTimeImmutable` (UTC) internally:

```
$data = new DomainData(
    handle: 'ABC123',
    statuses: 'clientTransferProhibited,serverHold',
    nameservers: 'ns1.example.com,ns2.example.com',
    creationDate: '2010-01-15 12:00:00',
    updatedDate: '2024-06-01 08:30:00',
    registrarExpiration: '2025-01-15 00:00:00',
    expiration: '2025-01-15 00:00:00',
    whoisProtected: false,
    delegationSigned: true,
);

$data->getCreationDate(); // DateTimeImmutable (UTC)
```

### `ContactData`

[](#contactdata)

Holds registrant/admin/tech contact fields. `isWhoisProtected()` signals that personal data should be redacted in the RDAP response.

Serialization
-------------

[](#serialization)

`SymfonySerializer` converts a `Domain` entity to RDAP-compliant JSON. Dates are serialized with a `Z` suffix (UTC).

```
$serializer = new SymfonySerializer();
$json = $serializer->serialize($domain); // RFC 9083 JSON string
```

Running tests
-------------

[](#running-tests)

```
php vendor/bin/phpunit
```

License
-------

[](#license)

BSD-3-Clause. Copyright © HiQDev.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance61

Regular maintenance activity

Popularity17

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ccb75e3312d6bd454ea445ea308139fd185a4ca906ca5df21cc66e6a35de25a3?d=identicon)[SilverFire](/maintainers/SilverFire)

![](https://www.gravatar.com/avatar/790fd24da129907d373559f60c6994f664f06e3f518502c03580cc9f3594615e?d=identicon)[hiqdev](/maintainers/hiqdev)

![](https://www.gravatar.com/avatar/99106256c24a8cb23871b99fa90e48f37f1aa71608c185759b7d2a88683a5918?d=identicon)[hiqsol](/maintainers/hiqsol)

---

Top Contributors

[![bladeroot](https://avatars.githubusercontent.com/u/10207103?v=4)](https://github.com/bladeroot "bladeroot (67 commits)")[![strorch](https://avatars.githubusercontent.com/u/23340907?v=4)](https://github.com/strorch "strorch (34 commits)")[![SilverFire](https://avatars.githubusercontent.com/u/4499203?v=4)](https://github.com/SilverFire "SilverFire (31 commits)")[![hiqsol](https://avatars.githubusercontent.com/u/11820365?v=4)](https://github.com/hiqsol "hiqsol (3 commits)")

---

Tags

hacktoberfest

### Embed Badge

![Health badge](/badges/hiqdev-rdap/health.svg)

```
[![Health](https://phpackages.com/badges/hiqdev-rdap/health.svg)](https://phpackages.com/packages/hiqdev-rdap)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
