#13828·appwrite

Absorb the remaining Utopia libraries into packages/

Author: ChiragAgg5kCreated Sep 22, 2026Updated Sep 29, 2026
Labelsproduct / storageproduct / vcsabsorb

Tracks moving every remaining utopia-php/* library into packages/<name> per rfc/monorepo.md. It started with the messaging chain (done, below); it now covers the other 32 packages Appwrite still resolves from vendor/. One package per PR (two only when they require each other), in dependency order; each PR follows the six-step absorb playbook and lands with a merge commit (labelled absorb).

Where we are

Waves 1–3 done (2026-09-28): 40 packages live in packages/, each published to its mirror and retired from utopia-php/monorepo where it lived there. 9 are still vendored: abuse audit config database fetch migration mongo platform usage.

In progress: wave 4 (platform, abuse, audit, usage).

Decisions pending: config (move to src/Appwrite/Config vs keep Utopia\Config), utopia-php/monorepo#137 (draft on the retired auth / validators / dns), utopia-php/validators#6 (WhiteList casing), registering utopia-php/mqtt and utopia-php/cdn on Packagist, releasing client/0.6.0 (needed for withFollowRedirects(maxHops:) outside Appwrite).

Dependency graph (remaining packages only)

Already-absorbed dependencies are omitted.

Package Requires (still vendored)
config fetch mongo platform none
database mongo
abuse usage database
audit database fetch (switches to client in its absorb)
migration database

platform, abuse, audit and usage can all land before database: the root still requires utopia-php/database, and replace covers each package's own requirement on it.

Plan

Waves follow the graph. Packages within a wave are independent and can run as parallel PRs. Waves 4 and 5 keep the RFC's order (framework tier before database) because replace lets a package land before a vendored dependency.

Wave 1: leaves ✅

Package Absorb PR Monorepo retire Notes
validators #13897 utopia-php/monorepo#356 bare Utopia\ prefix until phase 6; bin/monorepo learned the bare prefix and a duplicate-class check
di #13885 utopia-php/monorepo#355 step A: Utopia\DI\
auth #13890 utopia-php/monorepo#357 vcs repository entry dropped
cache #13899 utopia-php/monorepo#351
schedule #13887 utopia-php/monorepo#353
balancer #13886 standalone classic branch protection removed from the mirror
detector #13891 standalone
locale #13888 standalone
query #13896 standalone 0.6.0 → 0.6.1
registry #13889 standalone 0.5.0 → 0.6.0
dsn #13894 standalone 0.2.1 → 1.0.0
mqtt #13892 standalone not yet on Packagist
client #13910 redirect hop cap; in-memory bodies replay on 307/308
fetch #13893 replaced by client, not absorbed
config decision pending

Every mirror's tree matches its packages/<name>. Open mirror PRs and issues were closed with a pointer here.

Wave 2 ✅

Package Home Lock → head Notes
console monorepo 0.2.9 Declares bare Utopia\ (Utopia\Console); step B in phase 6
servers monorepo 0.4.11
cdn monorepo, VCS 0.0.13 Not on Packagist; drop the vcs entry, register the mirror
domains monorepo 4.3.0 Hoists psr/http-client, psr/http-message
storage monorepo 4.3.0 Hoists psr/http-client, psr/http-message

Wave 3 ✅

Package Home Lock → head Notes
http monorepo 2.0.0-rc33 Step A: Utopia\ → Utopia\Http\. 269 Appwrite files; last user of the bare prefix apart from validators and console
cli monorepo 0.24.4
queue monorepo 6.0.0 Delete tests/extensions/Queue/InMemoryConnection.php in phase 8 once queue's own fakes are here
dns monorepo 3.0.7
emails standalone 0.8.3
vcs monorepo, VCS 5.5.1 Switch from fetch to client in the absorb. Drop the vcs entry. Hoists adhocore/jwt. 13 open issues/PRs on the repo to triage

Wave 4: framework tier

Package Home Lock → head Notes
platform monorepo 1.0.0-rc25 Every action and worker inherits from it: run the full e2e matrix by workflow_dispatch
abuse standalone 2.0.1 Hoists appwrite/appwrite (PHP SDK ^27.1, already in the lock at 27.1.0). Its Redis cluster log adapters need a PHPStan baseline
audit monorepo 4.0.3 Switch from fetch to client in the absorb
usage standalone 0.16.6 Hoists psr/http-client

Wave 5: database

Package Home Lock → head Notes
mongo + database standalone 1.5.4 / 7.3.11 → 7.3.12 One PR: they share the MariaDB/PostgreSQL/MongoDB e2e compose. Switch the widened-matrix rule in ci.yml to a packages/database/ + packages/mongo/ path check. Hoists ramsey/uuid. 47 open issues/PRs on utopia-php/database to triage
migration standalone 2.0.7 Set utopia-php/dsn to ^1.0. Hoists halaxa/json-machine, appwrite/appwrite. 19 open issues/PRs to triage

Exit: composer.lock contains no utopia-php/* package.

Phase 6: step B

  • validators: Utopia\Validator → Utopia\Validator\Validator, Utopia\PHPStan → Utopia\Validator\PHPStan\*; class_alias shim, major release, Appwrite call sites in the same PR
  • console: Utopia\Console → Utopia\Console\Console; same pattern
  • Remove the bare Utopia\ list from the root autoload with the last of the two

Phase 7: retire the old homes

  • Archive utopia-php/monorepo (after every retire PR, only fastly nats replication reputation remain): nats and replication to appwrite/cloud, archive fastly, place reputation (open question 1)
  • appwrite/cloud drops its own utopia-php/* requirements and takes the classes through server-ce

Per-package checklist

For each package: absorb PR merged with a merge commit → Split run green and mirror tree identical to packages/<name> → retire PR on utopia-php/monorepo (monorepo-hosted only) → open PRs on the mirror closed with a pointer here.

  • Decide fetch: replace with client
  • Decide config 2.x home
  • Wave 1: validators di auth cache schedule balancer detector locale query registry dsn mqtt
  • fetch → client (#13893)
  • config registry move
  • Wave 2: console #13925, servers #13921, cdn #13923, domains #13922, storage #13926 (retired: utopia-php/monorepo#358-361, #363)
  • Wave 3: http #13930, cli #13928, queue #13931, dns #13927, emails #13929, vcs #13932 (retired: utopia-php/monorepo#362, #364-367)
  • Wave 4: platform abuse audit usage
  • Wave 5: mongo + database, migration
  • Phase 6 and 7 above

Before each wave, re-run the version comparison: bin/monorepo list against jq '.packages[] | select(.name|startswith("utopia-php/"))' composer.lock.

Open follow-up from the messaging chain

  • Release client 0.6.0 (the aliases for the pre-0.5 names left packages/client in #13883)
Done: the messaging chain (psr7, smtp, telemetry, pools, client + span, messaging)
Order Package Appwrite lock Mirror head State Notes
done psr7 0.2.1 0.2.1 merged #13723
1 smtp 0.2.0 (transitive) 0.2.0 (7115e54) merged #13829 zero Utopia and zero third-party requirements; was part of the closed batch #13721 and never re-landed
2 telemetry 0.4.11 0.4.11 merged #13731 hoists nyholm/psr7, open-telemetry/*, symfony/http-client
3 pools 2.1.2 2.1.2 merged #13845 needs telemetry; step A: src/Pools → src/, Utopia\Tests → Utopia\Pools\Tests
4 client + span 0.4.4 / 4.2.0 0.5.0 / 4.2.0 merged #13858 client renamed and released as 0.5.0 first (utopia-php/monorepo#331); agents and span use the new names; old names aliased for the vendored consumers
5 messaging 2.5.0 2.5.0 merged #13863 step A reshape; provider suites to tests/E2E/; moves to client ^0.5 names; push-protection bypass (used_in_tests) for a 2023 Twilio test credential in its history
  • smtp: #13829 merged (32ea8b5); Split pushed 8baa195; retired from the monorepo in utopia-php/monorepo#322
  • telemetry: #13731 merged (7eab5f1); Split pushed 81dcd88; retired in utopia-php/monorepo#323. The Realtime e2e flake that blocked it is fixed on main by #13840
  • pools: #13845 merged (28b7197); Split pushed 74fddc5; retired in utopia-php/monorepo#326. Also fixed bin/monorepo check to install a package's own dependencies first
  • client renamed first (RFC step B) in utopia-php/monorepo#331 and released as client/0.5.0; #13850 closed in favour of this
  • client + span: #13858 merged (008b5f9); Split pushed client 7cea773, span 3df719d, agents 951c5f5; retired in utopia-php/monorepo#338
  • messaging: #13863 merged (5238cbd); Split pushed 894c283; retired in utopia-php/monorepo#346; all 41 open PRs on the mirror closed with a pointer here
  • Released client/0.5.1 (guarded alias shim); moved the remaining consumers off client's pre-0.5 names (utopia-php/monorepo#347, utopia-php/usage#43, open-runtimes/sdk-for-php#18); released storage 4.3.0, domains 4.3.0, cdn 0.0.13, fastly 0.2.1, usage 0.16.6, sdk-for-php 2.1.0; Appwrite bump and alias removal in #13883

Absorbed outside this chain: lock #13718, bus #13715, system #13804, compression #13798, user-agent #13862, openapi #13865, image #13867, circuit-breaker #13869, websocket #13870.

Refs: #13700 (RFC), #13803 and #13797 (single-package absorbs used as the template).