Skip to content

chore: require appwrite/appwrite ^32.2.0 - #126

Closed
claudear wants to merge 1 commit into
mainfrom
chore/bump-appwrite-sdk-32
Closed

claudear wants to merge 1 commit into
mainfrom
chore/bump-appwrite-sdk-32

Conversation

@claudear

Copy link
Copy Markdown
Contributor

What does this PR do?

Follow-up to appwrite/appwrite#15409 (code-scanning alert appwrite:appwrite:alert#4695) landing in the dependency this package tracks.

That fix is entirely server-side: assertProviderType() and requireAttachmentsScope() on the messaging module's Messages\Action, so PATCH /v1/messaging/messages/{sms,push,email}/:messageId can only reach a message of its own provider type. It touches src/Appwrite/Platform/Modules/Messaging/** and the messaging e2e tests — no appwrite/appwrite SDK class, no API spec, and nothing under packages/abuse. There is no API change here to adapt to.

What the review did turn up is that the SDK constraint had drifted. composer.json pinned appwrite/appwrite: ^27.1, while appwrite/appwrite's root composer.json requires ^32.2.0 and its lock resolves 32.2.0 — so the code in packages/abuse is exercised against 32.2.0 upstream, and a standalone install of this mirror resolved an SDK five majors behind it.

Changed

  • appwrite/appwrite ^27.1 → ^32.2.0.

The adapter needed no changes. Reviewing 27.1.0 → 32.2.0 against everything TimeLimit\Appwrite\TablesDB touches:

  • Services\TablesDB keeps every signature the adapter calls. createTable, create{String,Datetime,Integer}Column and createIndex only gained a trailing optional ?string $description, after the arguments the adapter passes positionally.
  • Query, ID and TablesDBIndexType keep theirs (TablesDBIndexType gained a TRIGRAM case; KEY(), UNIQUE() and from() are unchanged), and Service::__construct(Client $client) still takes the client the adapter is handed.
  • Models\Row keeps id and data, RowList keeps rows and total, and ColumnList still hands back raw column payloads — the shape resourceStatus() already accommodates. Models\ColumnIndex gained a description property, which this package only ever reads through listIndexes().
  • The SDK's requirements tightened to PHP >=8.5, psr/http-client ^1.0 and utopia-php/client ^0.6. abuse already requires all three, so resolution is unaffected.
  • One consumer-visible behaviour change, noted in the changelog: the SDK client no longer follows redirects, so an endpoint that redirects (an http:// endpoint on a host forcing https://) now fails the call instead of being followed with the API key attached.

Test Plan

TablesDBTest gains coverage of setup() through a recording client (SetupTablesDBClient), so the requests it makes are pinned without an Appwrite backend:

  • the table is created with its columns and indexes inline, and nothing is created one by one or polled;
  • a table left behind by a setup that stopped halfway is repaired through the per-type column endpoints with the same schema, and the type each index was defined with round trips through TablesDBIndexType.

Both tests pass unchanged on appwrite/appwrite 27.1.0 and 32.2.0, which is the compatibility claim above, stated as a test.

Run on PHP 8.5.12 with 32.2.0 resolved: unit suite 49 tests / 160 assertions green; TablesDBFixtureTest and DiscoveryTest 9 tests / 81 assertions green, the fixture test driving the real SDK over HTTP against an owned endpoint, so the rewritten PSR-18 transport is covered; PHPStan level max clean; Rector dry run clean. The E2E\Appwrite\TablesDBTest suite was not run — it skips without APPWRITE_ENDPOINT, APPWRITE_PROJECT_ID and APPWRITE_API_KEY for a disposable project.

Note

This repository is a read-only mirror of packages/abuse. The same one-line constraint bump and tests belong in appwrite/appwrite for the mirror to stay in sync.

🤖 Generated with Claude Code

The Appwrite SDK constraint sat at ^27.1 while appwrite/appwrite runs this
package against 32.2.0, so a standalone install resolved an SDK five majors
behind the one packages/abuse is exercised with.

Nothing the TablesDB adapter calls moved between the two: the TablesDB
service keeps its signatures (the create endpoints only gained a trailing
optional description), Query, ID and TablesDBIndexType keep theirs, and the
Row model it reads keeps id and data. The SDK's own requirements tightened to
PHP >=8.5, psr/http-client ^1.0 and utopia-php/client ^0.6, all of which
abuse already requires.

TablesDBTest now covers setup() against a recording client, so the requests
it makes are pinned without a backend: the table created with its columns and
indexes inline and nothing polled, and the repair path a half-finished setup
leaves behind, where each column goes through its own endpoint and the index
types round trip through TablesDBIndexType. The same requests go out on 27.1
and on 32.2.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Thanks for contributing! This repository is a read-only mirror; development for this library happens in packages/abuse in appwrite/appwrite. Please open this pull request there instead.

@appwrite

appwrite Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

The SDK upgrade matches the package's declared platform requirements, and the added coverage exercises both setup paths against the SDK client interface.

Updates the Appwrite PHP SDK requirement to ^32.2.0 and documents the SDK redirect behavior change. Adds recording-client coverage for inline table schema creation and repair of an existing table during TablesDB::setup().

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 4
File Change
composer.json Raises the Appwrite SDK dependency constraint from ^27.1 to ^32.2.0.
CHANGELOG.md Documents the SDK version and redirect behavior changes, along with the added setup coverage.
tests/TablesDBTest.php Asserts the inline schema-creation and existing-table repair request flows.
tests/TimeLimit/SetupTablesDBClient.php Adds a recording SDK client test double that responds to setup requests.

Reviewed 8c7820e · Details · Comment @appwrite review to re-run, or mention @appwrite with a question.

@github-actions github-actions Bot closed this Nov 11, 2026

@appwrite appwrite Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Tier S · Looks good to merge. Summary

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant