From fc61b5c8541976cc064fda7e382cc351e512559e Mon Sep 17 00:00:00 2001 From: Koen Hendriks Date: Mon, 4 May 2026 10:00:50 +0200 Subject: [PATCH 1/2] Add test for `.com` TLD API nullable fields configuration. confirming bug. --- tests/Clients/Domains/TLDsApiInfoTest.php | 16 ++++ tests/Domain/data/tldinfo_com-nullables.json | 89 ++++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 tests/Domain/data/tldinfo_com-nullables.json diff --git a/tests/Clients/Domains/TLDsApiInfoTest.php b/tests/Clients/Domains/TLDsApiInfoTest.php index 777173a..50f30b6 100644 --- a/tests/Clients/Domains/TLDsApiInfoTest.php +++ b/tests/Clients/Domains/TLDsApiInfoTest.php @@ -33,6 +33,22 @@ public function test_info_com(): void Assert::assertSame(113, $languageCodes->count()); } + public function test_info_com_nullables(): void + { + $json = file_get_contents(__DIR__ . '/../../Domain/data/tldinfo_com-nullables.json'); + + assert(is_string($json)); + + $sdk = MockedClientFactory::makeSdk( + 200, + $json, + MockedClientFactory::assertRoute('GET', 'v2/tlds/com/info', $this) + ); + + $response = $sdk->tlds->info('com'); + $this->assertInstanceOf(TLDInfo::class, $response); + } + public function test_info_nl(): void { $json = file_get_contents(__DIR__ . '/../../Domain/data/tldinfo_nl.json'); diff --git a/tests/Domain/data/tldinfo_com-nullables.json b/tests/Domain/data/tldinfo_com-nullables.json new file mode 100644 index 0000000..2d4d8f5 --- /dev/null +++ b/tests/Domain/data/tldinfo_com-nullables.json @@ -0,0 +1,89 @@ +{ + "metadata": { + "renewDomainPeriods": [ + 12, + 24, + 36, + 48, + 60, + 72, + 84, + 96, + 108, + 120 + ], + "whoisExposure": "FULL", + "gdprCategory": "UNKNOWN", + "createDomainPeriods": [ + 12, + 24, + 36, + 48, + 60, + 72, + 84, + 96, + 108, + 120 + ], + "autoRenewDomainPeriods": [ + 12 + ], + "registrant": { + "organizationRequired": false, + "organizationAllowed": true + }, + "adjustableAuthCode": true, + "creationRequiresPreValidation": false, + "transferFOA": true, + "featuresAvailable": [ + "RESTORE", + "CREATE", + "PRIVACY_PROTECT", + "RENEW", + "TRANSFER", + "UPDATE" + ], + "customAuthcodeSupport": true, + "adminContacts": { + "min": 1, + "max": 10, + "required": true, + "organizationRequired": false, + "organizationAllowed": true + }, + "billingContacts": { + "min": 0, + "max": 10, + "required": false, + "organizationRequired": false, + "organizationAllowed": true + }, + "techContacts": { + "min": 1, + "max": 10, + "required": true, + "organizationRequired": false, + "organizationAllowed": true + }, + "nameservers": { + "min": 0, + "max": 10, + "required": false + }, + "domainSyntax": { + "minLength": 3, + "maxLength": 63, + "idnType": "UTS46", + "idnSupport": true + }, + "transferRequiresAuthcode": true, + "transferSupportsAuthcode": true, + "registrantChangeApprovalRequired": true + }, + "provider": "Verisign", + "applicableFor": [ + "com", + "net" + ] +} From 766439865794a4a69ffddd08b6e9e89a036a062b Mon Sep 17 00:00:00 2001 From: Koen Hendriks Date: Mon, 4 May 2026 10:48:45 +0200 Subject: [PATCH 2/2] Add non-nullable items after upstream changes. --- tests/Domain/data/tldinfo_com-nullables.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/Domain/data/tldinfo_com-nullables.json b/tests/Domain/data/tldinfo_com-nullables.json index 2d4d8f5..2c5531b 100644 --- a/tests/Domain/data/tldinfo_com-nullables.json +++ b/tests/Domain/data/tldinfo_com-nullables.json @@ -79,7 +79,11 @@ }, "transferRequiresAuthcode": true, "transferSupportsAuthcode": true, - "registrantChangeApprovalRequired": true + "registrantChangeApprovalRequired": true, + "registrantChangeTransferLock": false, + "renewalOnTransfer": "NO_CHANGE", + "restoreIncludesRenew": false, + "premiumSupport": "NO" }, "provider": "Verisign", "applicableFor": [