Repository navigation
chore: absorb smtp into packages/smtp - #13829
Conversation
smtp: absorb the library and stub the package
smtp: implement the client, the message builder and both transports
smtp: give failures a hierarchy, and waits their own budgets
chore: stop committing package lock files
…stale-session fix(smtp): let a holder reuse a connection the server may have closed
Point mirror.yml and the README banner at appwrite/appwrite so PRs and issues opened on the mirror are redirected here.
Appwrite now autoloads Utopia\SMTP from packages/smtp and replaces utopia-php/smtp so the vendored copy is no longer installed. The package needs no third-party requirements hoisted and no version bump: the mirror head is the 0.2.0 tag the lock already resolved. Shape follows rfc/monorepo.md step A: the unit tier moves from tests/Unit to tests/ under Utopia\SMTP\Tests, the Mailpit e2e tier stays in tests/E2E, and phpstan.neon and rector.php no longer reach for the old monorepo root configs. Source changes are Pint formatting only.
|
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
|
Confirmed the split app bypass on the |
Summary
Move
utopia-php/smtpintopackages/smtpso Appwrite loads it directly, the first step of the messaging chain in #13828 (smtp→telemetry→pools→client+span→messaging). Three commits, per the playbook inrfc/monorepo.md:Add 'packages/smtp/' from commit '7115e54d…': subtree import from the mirror with full history. The mirror head is byte-identical to the0.2.0tag Appwrite already locks, so nothing in the dependency graph moves.chore(smtp): mirror plumbing:mirror.ymlpointed here, README banner refreshed.refactor: load smtp from packages/: root autoload andreplaceentries,utopia-php/smtpdropped from the lock (it was only ever transitive, throughmessaging). Step A of the standard shape:tests/Unitflattened totests/underUtopia\SMTP\Tests, the Mailpit e2e tier kept intests/E2Ewith its compose file andtest:e2escript,phpstan.neonmade standalone (it used to include the old monorepo's root config, whichvalidaterejects),rector.phpmade standalone with the same prepared sets it had minusphpunitCodeQuality(needs a package-localinstalled.json) andrectorPreset(annotated source classes with their test class names on chore: absorb telemetry, system, psr7 and smtp into packages/ #13721). Rector is clean on arrival, so production changes are Pint formatting only.Nothing to hoist: the package requires only PHP. Appwrite reaches it in one file directly (
Project/Http/Project/SMTP/Update.php), which root PHPStan is clean on.Validation
bin/monorepo validate: all packages validbin/monorepo check smtp: Rector, Pint and PHPStan level max onsrcandtests, no baselinebin/monorepo test smtp: unit 194 tests / 858 assertions, e2e 28 tests / 606 assertions against Mailpitvendor/bin/phpunit --testsuite packages --filter 'Utopia\\SMTP\\Tests': 194 tests green under the root autoloadercomposer validate --no-check-publish: existing exact-version warnings only;composer dump-autoloadwithout PSR-4 warningsbin/monorepo split smtp --dry-run:18cf7983c21be42c4a6681387bdefb49fd6ae723git diff --checkThe full
--testsuite packagesrun segfaults on this macOS host (Swoole 6 + PHP 8.5) right afterpackages/lock's coroutine test, with and withoutsmtppresent, so it is not introduced here; the Linux runner decides.Merge and follow-up
Merge with a merge commit, not squash, to preserve the subtree annotation the split continues from.
The
utopia-php/smtpmirror already carries the canonicalmainruleset (id20795955) with the split app as an always-bypass actor, verified after the fact with an owner role; no ruleset change was needed.After merge: confirm Appwrite's
Splitpushes toutopia-php/smtp, then removepackages/smtpfromutopia-php/monorepoand regenerate its graph in a follow-up PR. No open PRs on the smtp mirror.Part of #13828.