Skip to content

chore: absorb domains into packages/domains - #13922

Merged
ChiragAgg5k merged 366 commits into
mainfrom
chore/absorb-domains
Sep 28, 2026
Merged

ChiragAgg5k merged 366 commits into
mainfrom
chore/absorb-domains

Conversation

@ChiragAgg5k

Copy link
Copy Markdown
Member

Summary

Moves utopia-php/domains into packages/domains so Appwrite loads it directly. Wave 2 of #13828, following the playbook in rfc/monorepo.md. The mirror head (811f321) is the 4.3.0 release Appwrite already locks, so there is no version gap and Appwrite runs the same code.

Commits

Commit What
Add 'packages/domains/' from commit '811f321…' Subtree import from the mirror with full history
chore(domains): mirror plumbing mirror.yml points here, README banner refreshed. No banned files to remove
refactor: load domains from packages/ Root wiring, step A shape, QA config, RFC baseline line
Merge of main composer.lock regenerated on top of main

What changed

Area Change
Root composer.json Autoload, autoload-dev and replace entries added; utopia-php/domains: ^4.3 removed from require. replace satisfies the still-vendored dns and emails
Hoisting psr/http-client ^1.0 was already in root. Root psr/http-message narrowed from ^1.1 || ^2.0 to ^2.0, because the package requires ^2.0 and replace hides that from the solver. Lock stays at 2.0
composer.lock Only utopia-php/domains removed (+1/−65, content hash)
src/ src/Domains/* moved up to src/. Only non-formatting edit: Domain.php loads the Public Suffix List from __DIR__ . '/../data/data.php' (one level less, required by the move). Otherwise Pint only (empty {} bodies, fn ( spacing)
tests/ Namespace Utopia\Tests / Utopia\Domains\Validator → Utopia\Domains\Tests\…. NameComTest and OpenSRSTest (real registrar APIs, skip without credentials) moved to tests/E2E/Registrar/. MockTest, DomainTest and validator tests stay in the unit tier
phpunit.xml unit = tests minus tests/E2E; e2e = tests/E2E
phpstan.neon Standalone, level max over src and tests, with phpstan-baseline.neon holding 274 findings (219 src, 55 tests). The package had no PHPStan config of its own. Added to the RFC phase 8 list
rector.php Standalone; skips ClassPropertyAssignToConstructorPromotionRector, ReadOnlyPropertyRector and BinaryOpNullableToInstanceofRector (the last would rewrite a $this->cache && check in NameCom.php) so src stays as released
Root pint.json notPath: ["data/data.php"], the same exclusion utopia-php/monorepo used. The generated 1 MB Public Suffix List is tab-indented; without it Pint rewrites every line and runs out of memory at the default 128M limit

ext-simplexml is not hoisted, matching earlier absorbs, which leave ext-* requirements in the package manifest.

Validation

Check Result
bin/monorepo validate all packages valid
bin/monorepo check domains Rector, Pint, PHPStan level max (with baseline) pass
bin/monorepo test domains unit 52 tests / 313 assertions OK; e2e 54 skipped (no NAMECOM_* / OPENSRS_* credentials)
vendor/bin/phpunit --testsuite packages --filter 'Utopia\\Domains' in appwrite/appwrite:2.3.0 52 tests / 313 assertions OK. On the macOS host the same run also reports cache's 3 CodecTest data-provider errors from missing igbinary, unrelated to this package
Host PHPStan on Certificates, Workers/Certificates, Tasks/SSL, Proxy/Action, Webhooks/Create, Avatars/Favicon/Get, resources/request.php No errors
composer validate --no-check-publish valid (existing utopia-php/platform exact-version warning)
bin/monorepo split domains --dry-run 4d6fc01, fast-forward of the mirror head 811f321 (+2 commits)
git diff --check clean

Mirror state

Ruleset Canonical main ruleset, split app (4016286) as bypass, so absorbed with --skip-ruleset
Classic branch protection on main Present: 1 required approving review, split app utopia-php-monorepo in bypass_pull_request_allowances, no required status checks, no push restrictions, force pushes off. The bypass should let Split push, but confirm on the first Split run; if it fails, remove the classic protection (not changed here)

After merge

Step
Merge with a merge commit A squash drops the subtree annotation and orphans the package from its mirror
Confirm Split The Split run for domains is green and the mirror fast-forwards from 811f321
Retire from utopia-php/monorepo Remove packages/domains there
Triage mirror issues No open PRs. Open issues: utopia-php/domains#57 (mandatory ext-memcached/ext-opentelemetry, a dependency-tree complaint, likely obsolete now), #42 (vendor size from utopia-php/compression, not this package's code), #26 (getRegisterable() validation), #4 (blogspot.com subdomain parsing). #26 and #4 are real bug reports to re-open here if still reproducible
Monorepo PRs None open for domains in utopia-php/monorepo

🤖 Generated with Claude Code

wess and others added 30 commits March 8, 2023 15:58
Removes leftovers in Adapter
Allows purchase and transfer methods to pass in one or more Contacts
…tions

Add support for wildcard and exception
Fix a typo in README.md
@ChiragAgg5k ChiragAgg5k added the absorb History-preserving package absorption; merge commit required label Sep 26, 2026
@greptile-apps

greptile-apps Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High risk] Absorbs external domains package into monorepo.

The PR appears safe to merge based on the issues established in this review.

Summary

The PR absorbs Utopia Domains into packages/domains and wires it into Appwrite’s Composer autoloading and package checks. Since the previous review, the branch also adds source-archive retention for remote deployments, adjusts duplicate and download handling, mounts storage volumes for the Jobs worker, and stabilizes a TOTP test.

Reviews (12) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..."

Comment thread composer.json Resolved
Comment thread packages/domains/CONTRIBUTING.md Resolved
@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → chore/absorb-domains (after).

Metric Before After Change
🚀 Requests/sec 199.25 205.02 ⚪ +2.9%
⏱️ Latency P50 86.8 ms 85.04 ms ⚪ -2%
⏱️ Latency P95 205.22 ms 195.62 ms ⚪ -4.7%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 85.04 195.62 12,825 205.02 -9.6
Account 162.25 296.4 675 11.2 +5.06
TablesDB 82.63 152.47 6,975 113.55 -21.93
Storage 77.24 171.31 3,375 56.93 +9.15
Functions 121.96 237.98 1,800 30.97 +8.01

Top API waits (after)

API request Max wait (ms)
account.name.update 418.68
storage.files.preview 388.56
functions.variables.update 377.19
account.prefs.update 376.85
tablesdb.rows.delete 370.05

Comment thread pint.json Resolved
Comment thread pint.json Resolved
…nt runs

bin/monorepo check runs Pint from packages/domains, where the file is data/data.php, so the root-relative path stopped excluding it. Pint's notPath matches anywhere in the relative path, so data/data.php covers both runs.
replace hides packages/domains' own require from Composer, so the root now declares ext-simplexml, which the OpenSRS adapter needs. CONTRIBUTING.md still sent contributors to utopia-php/monorepo.
@ChiragAgg5k

Copy link
Copy Markdown
Member Author

@greptile review

@ChiragAgg5k
ChiragAgg5k merged commit d071465 into main Sep 28, 2026
84 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the chore/absorb-domains branch September 28, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

absorb History-preserving package absorption; merge commit required

Projects

None yet

Development

Successfully merging this pull request may close these issues.