Absorb utopia-php/domains - #156
Open
loks0n wants to merge 344 commits into
Open
Conversation
Added code linter
…cancel purchase, purchase (register), update nameservers, and check if domain is available
Updated tansfer for working Added formal test for transfer
Adds return types
Removes zone classes, as they are not needed at this time
Fixes return type in test
Removes CodeQL workflow
Adds Contacts class to simplify contact sets
Fix Name.com error handling for invalid domains and unsupported TLDs
- Add new RateLimitException class to handle API rate limit errors - Update NameCom adapter to detect HTTP 429 and 'Rate Limit Exceeded' messages - Refactor exception handling to catch RateLimitException first before generic Exception - Add ERROR_RATE_LIMIT_EXCEEDED constant to error map
feat: add RateLimitException for NameCom adapter
Throw InvalidPeriodException when the API returns an invalid years error (HTTP 400). Ordered ERROR_INVALID_YEARS before ERROR_INVALID_CONTACT in ERROR_MAP so the more specific pattern matches first.
feat: add InvalidPeriodException for NameCom adapter
* Remove deprecated curl_close calls * Clean up curl_close removal formatting * Stabilize registrar update tests * Treat OpenSRS no-op updates as successful
chore: bump utopia-php/cache to 2.0.0
* chore: bump utopia-php/cache to ^3.0 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore: raise PHP minimum to 8.3 utopia-php/cache 3.0 requires PHP >=8.3, so consumers on 8.2 would fail to install. Drop 8.2 from the supported matrix to match. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore: refresh composer.lock content-hash Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * ci: test against PHP 8.3, 8.4, 8.5 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
* Fix premium domain pricing for aftermarket listings Name.com's getPricing endpoint only returns standard registry registration pricing, so premium aftermarket listings (e.g. short or brandable domains sold at a one-time acquisition fee) were quoted at the base TLD price — a domain selling for ~$2,200 was priced at $1.99. - NameCom::getPrice() now consults checkAvailability and, when the domain is a premium listing (premium flag or a non-registration purchaseType), uses its purchasePrice/renewalPrice as authoritative - NameCom::suggest() treats non-registration purchase types as premium and exposes renewalPrice and purchaseType per suggestion - purchase() accepts an optional purchasePrice (required by registrars for premium domains), wired through Registrar, NameCom (request payload, mirroring transfer()), OpenSRS (existing register() param) and Mock - getPrice() no longer caches null renewal/transfer prices as 0.0; they now correctly raise PriceNotFoundException * (fix): soft-fail availability lookup in getPrice for standard domains Per review: a transient checkAvailability failure no longer breaks getPrice() when getPricing already returned usable data. The premium merge is skipped and the result is not cached, so the merge is retried on the next request. Rate limits still propagate. Also documented why a renewal price of 0 (name.com's 'no data') must not override the registry renewal price.
* chore(deps)!: upgrade to utopia-php/cache 4.x Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * chore!: require PHP 8.4 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * ci: drop PHP 8.3 from the test matrix Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * chore: refresh lock content-hash after PHP requirement bump Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Cache 5.0.0 is released and this package pinned ^4, which blocks every consumer downstream: appwrite cannot move to cache 5 while any dependency still requires cache 4. Nothing here needs to change to support it. Cache's major is for the Redis\Multiplexing deadline behaviour and for requiring circuit-breaker ^0.4, which dropped the threshold argument. This package uses neither — grep for Multiplexing and CircuitBreaker across src/ and tests/ returns nothing, and the generic Cache and Adapter surface is identical between 4 and 5. Constrained as ^4.0 || ^5.0 rather than ^5.0 so this does not force the upgrade on anyone still on cache 4. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Imports the library with its history and brings it onto the monorepo's contracts. - QA hoisted to the root toolchain: pint.json is gone, Pint and Rector applied, and the package clears the root PHPStan floor. - Test contract: the parser, the validators and the Mock registrar are the unit tier; the OpenSRS and Name.com suites are the e2e tier, and they skip instead of failing when their sandbox credentials are absent (nothing in CI can hold them). - The generated public suffix dataset only ever answered "which section did this rule come from", so it is now a rule => section map rather than a record per rule with an unread suffix and comment list. That takes data.php from 59k lines to 10k — small enough for Pint to tokenise, which the old file was not. - The mirror's nightly import workflow becomes a monorepo workflow that opens a pull request when publicsuffix.org has moved on. Bugs found on the way in: - The cURL header callback lowercased whole header lines, so every response header value came back lowercased. - A JSON response was only decoded when its Content-Type carried a parameter — `application/json` on its own fell through undecoded, because strpos() returned false and truncated the comparison. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Imports
utopia-php/domainswith its full history and brings it onto the monorepo's contracts. Net -52k LoC.bin/monorepo absorb domainsdid the mechanical part: history import, hoisted QA stripped, the mirror's four workflows replaced with the redirectmirror.yml, issue templates dropped, README bannered, mirror ruleset normalised (PR-only, split app bypassed).By hand
pint.jsongone, Pint and Rector applied, package clears the root PHPStan floor.Mockregistrar (51 tests). E2E tier is the OpenSRS and Name.com suites, which now skip rather than fail an assertion when their sandbox credentials are absent, since nothing in CI can hold them.data/data.phponly ever answered "which list section did this rule come from": thesuffixkey duplicated the array key andcommentswas never read. It is now arule => sectionmap, 59,534 lines down to 10,252. That also unblocks Pint, which OOMed tokenising the old file (the rootpint.jsonis applied with a hardcoded--config, so a per-package exclude was not an option).test/test:e2escripts, modernphpunit.xml, trimmed.gitignore, packageCODE_OF_CONDUCT.md/CONTRIBUTING.mddropped.locahost, a stale PHP 8.2 claim, a dead Travis badge) plus a Tests section;OpenSRSandName.comadded to the shared vocabulary; dependency graph regenerated (dns --> domains)..github/workflows/domains-data.yml, opening a pull request when publicsuffix.org moves on.Bugs found on the way in
Content-Typecarried a parameter — bareapplication/jsonfell through undecoded, becausestrposreturnedfalseand truncated thesubstrcomparison.Verification
bin/monorepo check domains,test domains,validate,vale, ratchet lint, andbin/monorepo test dns --linked(its only dependent) all pass.Important
Land as a merge commit, never a squash — the import's subtree annotation lives in the merge, and a squash orphans the package from its mirror history.
🤖 Generated with Claude Code