Skip to content

chore: absorb messaging into packages/messaging - #13863

Merged
ChiragAgg5k merged 414 commits into
mainfrom
feat/absorb-messaging
Sep 24, 2026
Merged

ChiragAgg5k merged 414 commits into
mainfrom
feat/absorb-messaging

Conversation

@ChiragAgg5k

Copy link
Copy Markdown
Member

Summary

Move utopia-php/messaging into packages/messaging so Appwrite loads it directly. This is the last step of the chain in #13828 (smtp → telemetry → pools → client + span → messaging). All four of its Utopia dependencies are already in packages/.

  1. Add 'packages/messaging/' from commit 'c60cc16…': subtree import from the mirror with full history. The mirror head is the 2.5.0 tag Appwrite already locks, so nothing moves in the dependency graph.
  2. chore(messaging): mirror plumbing: mirror.yml points here and the README banner is refreshed. The same absorb run updated the mirror ruleset so the split app can bypass it.
  3. refactor: load messaging from packages/:
    • The root gets autoload and replace entries, and utopia-php/messaging leaves require and the lock. Nothing needs hoisting.
    • Step A of the standard shape: src/Utopia/Messaging and tests/Messaging are flattened, and tests live under Utopia\Messaging\Tests.
    • The four provider suites (Email, SMTP, SMS, WhatsApp) move to tests/E2E/, replacing the per-file includes and excludes in phpunit.xml.
    • messaging now requires client ^0.5 and imports Utopia\Client\Client directly, so it no longer relies on client's alias shim. The RFC's shim-removal note drops it from the list.
    • Production changes are that import and Pint formatting. docs/add-new-adapter.md points at the new source path.

History and push protection

GitHub push protection flagged a Twilio Account SID and token in the imported history. They are in tests/e2e/SMS/TwilioTest.php at f0c5cbb (2023), and that commit has been public on the mirror since then. The history can't be rewritten without breaking the split's fast-forward onto the mirror, so the push went through with a push-protection bypass recorded as used_in_tests.

Validation

  • bin/monorepo validate: all packages valid
  • bin/monorepo check messaging: Pint and PHPStan (the package's level 6 on src and tests)
  • bin/monorepo test messaging: unit 105 tests. e2e 31 tests against mailcatcher and requestcatcher, with 7 skipped because they need provider credentials.
  • The untouched copy in utopia-php/monorepo gives identical counts: 105 unit, 31 e2e, 7 skipped.
  • vendor/bin/phpunit --testsuite packages --filter 'Utopia\\Messaging\\Tests': the same 105 tests pass under the root autoloader.
  • Root PHPStan is clean on all 21 Appwrite files that use Utopia\Messaging.
  • composer dump-autoload shows no PSR-4 warnings. bin/monorepo split messaging --dry-run gives c3f9df1.

Merge and follow-up

Merge with a merge commit, not squash, to preserve the subtree annotation the split continues from.

After merge:

  • Confirm the Split run pushes to utopia-php/messaging.
  • Retire packages/messaging from utopia-php/monorepo.
  • Decide what happens to the 30 PRs still open on the mirror, mostly community adapters. The redirect only covers new PRs.

Part of #13828.

loks0n and others added 30 commits November 20, 2023 10:03
feat: add sms from override to constructor
Use default false bool sandbox instead of endpoint param
# Conflicts:
#	composer.json
#	composer.lock
#	src/Utopia/Messaging/Adapter/Push/APNS.php
#	src/Utopia/Messaging/Messages/Email.php
#	src/Utopia/Messaging/Messages/Push.php
#	src/Utopia/Messaging/Messages/SMS.php
#	tests/Messaging/Adapter/Email/EmailTest.php
#	tests/Messaging/Adapter/Email/MailgunTest.php
#	tests/Messaging/Adapter/Email/SendgridTest.php
#	tests/Messaging/Adapter/Push/APNSTest.php
#	tests/Messaging/Adapter/Push/FCMTest.php
#	tests/Messaging/Adapter/SMS/GEOSMS/CallingCodeTest.php
#	tests/Messaging/Adapter/SMS/GEOSMSTest.php
#	tests/Messaging/Adapter/SMS/Msg91Test.php
#	tests/Messaging/Adapter/SMS/SMSTest.php
#	tests/Messaging/Adapter/SMS/TelesignTest.php
#	tests/Messaging/Adapter/SMS/TelnyxTest.php
#	tests/Messaging/Adapter/SMS/TwilioTest.php
#	tests/Messaging/Adapter/SMS/VonageTest.php
This was referenced Sep 24, 2026
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.

10 participants