Skip to content

Absorb the remaining Utopia libraries into packages/ #13828

Closed

Description

@ChiragAgg5k

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/, plus the utopia-php libraries that were never in the monorepo but have first-party consumers (wave 5). Those used only by appwrite-labs go to appwrite/cloud or appwrite-labs/edge rather than here. 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–5 done (2026-10-05): 46 packages live in Appwrite's packages/, 5 in Cloud's (pay cloudevents waf feed tests), 3 in Edge's (async fastly proxy). Appwrite's lock still vendors 3: database 7.4.0, mongo 1.5.4, migration 2.0.8 (config absorbed 2026-10-07).

Remaining (audit 2026-10-07)

  1. config ✅ absorbed (chore: absorb utopia-php/config into packages/config #14227, merged): 2.x lives in packages/config with the registry (setParam/getParam) restored on Config, released as config/2.1.0 (mirror + Packagist). Retired from the monorepo (chore: retire config after its move to Appwrite utopia-php/monorepo#373) and Cloud moved onto it (appwrite-labs/cloud#6371, with test(scopes): read each catalog from its own file #14229 so CE's scopes test reads its own catalogs). Edge and executor can move from 0.2 to ^2.1 when convenient.
  2. Wave 6: mongo + database in one PR (head now 7.4.0; 56 open PRs / 4 issues on utopia-php/database, 3 / 2 on mongo), then migration (head 2.0.8; 20 PRs / 2 issues). Exit: Appwrite's lock has no utopia-php/*.
  3. Packagist: register waf, feed, mqtt, cdn ✅ registered 2026-10-07, auto-update hooks in place.
  4. Edge ✅ vcs entries dropped (appwrite-labs/edge#1554) and off fetch (appwrite-labs/edge#1557, Feat - Parellel builds to reduce build time #1562, refactor(tests): build the e2e client on utopia-php/client open-runtimes/executor#261).
  5. Cloud: drop its last direct requirement, utopia-php/migration ^2.0.0, and take it through server-ce (after wave 6).
  6. client/0.6.0 release ✅ released 2026-10-07 (mirror release, on Packagist).
  7. logger: three consumers moved to spans (all merged). Left: archive open-runtimes/proxy (needs an open-runtimes admin), then archive utopia-php/logger.
  8. Phase 6 (step B for validators and console, then drop the bare Utopia\ autoload entry).
  9. Phase 7: after chore: retire config after its move to Appwrite utopia-php/monorepo#373, the monorepo holds only replication and reputation. Archive replication, place reputation, close auth: OAuth2 clients, identity validators, and Phone calling codes utopia-php/monorepo#137 and Fix PT-BR Typo #167, archive the monorepo.

Decisions pending: video (no first-party consumer found on 2026-10-07; stays standalone), utopia-php/monorepo#137 (draft on the retired auth / validators / dns; close or re-open against packages/), utopia-php/validators#6 (WhiteList casing; re-open against packages/validators),

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
orchestration none

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 land before database (wave 6) 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 2.x → packages/config with the registry restored (#14227)

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: libraries that were never in the monorepo

Audit of the utopia-php org on 2026-10-01: every repository that is not in packages/, not in utopia-php/monorepo, and not already planned below. Appwrite's lock contains none of these. Each goes to the repository of its consumers: Appwrite when anything outside appwrite-labs uses it, otherwise appwrite/cloud, or appwrite-labs/edge when Edge is the only user. None requires database, mongo or migration, so the whole wave lands before wave 6.

Into appwrite/appwrite packages/ (consumers outside appwrite-labs)

Package Head Consumers Requires (to fix in the absorb) Notes
orchestration 0.20.0 open-runtimes/executor (and edge through it) console 0.2.* Docker-in-Docker e2e compose. 1 issue, 5 PRs to triage

Into appwrite/cloud packages/ (used by Cloud and Edge)

Cloud first gains the split tooling: bin/monorepo split and split.yml, so every package under its packages/ is pushed to its utopia-php/<name> mirror and Edge keeps requiring it from there. Same layout and absorb playbook as here, with the pay move (0657709edc) as the template.

Package Head Cloud / Edge files Requires (to fix in the absorb) Notes
split tooling Port bin/monorepo split + split.yml; first run splits packages/pay, which has drifted from utopia-php/pay since 2026-09-29
cloudevents 0.1.0 2 / 1 none Leaf; land first, feed needs it
waf 0.1.2 36 / 6 validators ^1.0 Not on Packagist: register the mirror, drop the vcs entries in cloud and edge. 3 open PRs
tests 0.1.0 15 / 19 (test suites) none Cloud maps it in autoload-dev. Its own tests become Utopia\Tests\Tests\
feed 1.1.2 7 / 2 client ^0.4 → ^0.5, cache 4.*||5.*, pools, psr7, cloudevents After cloudevents. Not on Packagist: register the mirror, drop the vcs entries. Redis e2e compose

Into appwrite-labs/edge packages/ (Edge is the only user; no split, archive the repository with a pointer)

Package Head Edge files Requires (to fix in the absorb) Notes
async 0.2.0 9 (VCS, locked 0.1.1) opis/closure 4.* Hoists opis/closure; amphp/react adapters stay suggest, their dev requirements hoisted to require-dev. PHPUnit pinned at 11.5.45
proxy 0.2.2 18 (VCS) validators ^0.6 → ^1.0, console * → ^0.2, ext-redis, ext-swoole >=6 Declares PHPUnit ^13
fastly 0.2.1 2 client ^0.5, psr7 ^0.2 The RFC planned to archive it, but Edge requires ^0.2. Retire PR on utopia-php/monorepo as usual

The three tracks are independent and run in parallel; within the Cloud track, the split tooling comes first and feed follows cloudevents.

Stays standalone, then archive

  • logger (0.8.0): Appwrite dropped it in 1d639e0 (errors through spans). Its consumers (appwrite-labs/databases, appwrite-labs/pwned, appwrite/docker-geo, open-runtimes/proxy) pin 0.7/0.8 from Packagist. Not absorbed (chore: absorb logger into packages/logger #14051 closed): move them to span-based error reporting, then archive.

Archive, no first-party consumer

Repository Last commit Why
ab 2023-10-11 No consumer, 15 downloads/month
view 2024-04-01 No consumer, 0 downloads/month
preloader 2023-01-28 Removed from Appwrite as dead code in 35873e5
analytics 2026-05-05 Removed from Appwrite in 35873e5; still requires the archived fetch

Decision pending

  • video (0.0.1, active 2026-08): no consumer yet. It goes wherever its first consumer lives; until then leave it standalone.

Out of scope: .github, demo, docker-base, docs, php-scrypt-test (not libraries); database-proxy, fetch, jwt, swoole (already archived).

Wave 6: database

Package Home Lock → head Notes
mongo + database standalone 1.5.4 / 7.4.0 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. 60 open issues/PRs on utopia-php/database to triage (2026-10-07)
migration standalone 2.0.8 Set utopia-php/dsn to ^1.0. Hoists halaxa/json-machine, appwrite/appwrite. 22 open issues/PRs to triage (2026-10-07)

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

Phase 6: step B

Phase 7: retire the old homes

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.

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

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

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).

Activity

  1. added
    absorb
    on Sep 22, 2026
  2. self-assigned this
    on Sep 22, 2026
  3. added
    product / messaging
    product / storage
    product / vcs
    sdk / cli
    on Sep 22, 2026
  4. changed the title [-]Absorb messaging into packages/messaging, starting with the smtp leaf[/-] [+]Absorb the remaining Utopia libraries into packages/[/+] on Sep 24, 2026
  5. removed
    product / messaging
    sdk / cli
    on Sep 24, 2026
  6. nk0273926 commented on Sep 29, 2026

    @nk0273926

    I’d like to work on this issue. I can help with the migration of one of the remaining utopia-php/* packages into packages/<name> following the existing absorb workflow and dependency order.

    I’ll first verify the package structure, dependencies, and required changes before opening a PR.

  7. added a commit that references this issue on Oct 7, 2026
  8. ChiragAgg5k commented on Oct 8, 2026

    @ChiragAgg5k
    MemberAuthor

    Released in cloud 1.50.146 (appwrite-labs/cloud#6371, server-ce with #14227) and cloud 1.50.149 (server-ce bump appwrite-labs/cloud#6391 contains #14235).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

absorbproduct / storageproduct / vcs

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions