Skip to content

feat: bump appwrite/appwrite to 23.*#111

Merged
abnegate merged 4 commits into
mainfrom
feat/sdk-23
May 11, 2026
Merged

feat: bump appwrite/appwrite to 23.*#111
abnegate merged 4 commits into
mainfrom
feat/sdk-23

Conversation

@premtsd-code
Copy link
Copy Markdown
Contributor

Summary

  • Bumps `appwrite/appwrite` constraint from `19.` to `23.`
  • Updates `Appwrite\Enums\IndexType` → `Appwrite\Enums\TablesDBIndexType` (split in SDK 21)
  • Converts SDK array-offset access to typed property access on `Row`/`RowList`/`ColumnList`/`ColumnIndexList` models (SDK 22+)

Test plan

  • `composer lint` passes
  • `composer check` passes (PHPStan max — pre-existing PHPDoc warning on main retained)
  • CI integration tests

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 8, 2026

Greptile Summary

This PR bumps appwrite/appwrite from 19.* to 23.*, renames the IndexType enum to TablesDBIndexType (split in SDK 21), and converts all array-offset SDK access to typed property access on the new Row/RowList/ColumnList/ColumnIndexList models. The PHP floor and CI matrix are also updated from 8.1→8.2 as required by the new SDK.

  • Enum rename (IndexTypeTablesDBIndexType) and typed property access (->rows, ->columns, ->indexes, ->id) are consistently applied across TablesDB.php.
  • PHP minimum version in composer.json is correctly raised to >=8.2 to match the SDK's declared requirement, and the GitHub Actions matrix and Dockerfiles are aligned to 8.2/8.3/8.4.
  • CI integration tests remain unchecked in the test plan; the end-to-end behavior of the new typed Row model (especially the $row->data[...] property for user-defined columns) has not yet been validated against a live TablesDB instance.

Confidence Score: 4/5

Safe to merge once integration tests confirm the Row model data-access pattern behaves as expected in production.

All mechanical migration work is correct: enum rename, typed property access on RowList/ColumnList/ColumnIndexList, PHP floor aligned to SDK requirement, CI matrix and Dockerfiles updated. The remaining risk is concentrated in TablesDB.php's count/hit methods, where how SDK 23's Row model surfaces user-defined columns is still unconfirmed by a passing integration test. If the nesting assumption is wrong, rate limits would silently fail open.

src/Abuse/Adapters/TimeLimit/Appwrite/TablesDB.php — specifically the Row model data access in the count/hit methods, which drives rate-limit enforcement

Important Files Changed

Filename Overview
src/Abuse/Adapters/TimeLimit/Appwrite/TablesDB.php Core SDK migration — enum rename and typed property access applied throughout; correctness of $row->data['count'] nesting for user-defined columns is still unverified against SDK 23 Row model
composer.json SDK constraint bumped from 19.* to 23.*; PHP floor raised to >=8.2 matching the SDK's own requirement
.github/workflows/tests.yml CI matrix updated from ['8.1','8.2','8.3'] to ['8.2','8.3','8.4'], consistent with the PHP floor change
Dockerfile.php-8.4 Renamed from Dockerfile.php-8.1; base image bumped to appwrite/utopia-base:php-8.4-1.0.0
composer.lock Lock file regenerated for appwrite/appwrite 23.1.0 and transitive dependency updates

Reviews (4): Last reviewed commit: "ci: add PHP 8.4 to test matrix" | Re-trigger Greptile

Comment thread src/Abuse/Adapters/TimeLimit/Appwrite/TablesDB.php
PHP version constraint (must-fix):
- composer.json: php >=8.0 -> >=8.2 (SDK 22+ requires 8.2)
- tests.yml matrix: drop 8.1 leg (composer install would fail)
- Drop Dockerfile.php-8.1 (now dead)

Column status filter (latent bug):
- SDK 22+ exposes Column*::status as a ColumnStatus enum object;
  ColumnIndex::status is still string. The plain
  \$resource->status !== 'available' check is always true for column
  results (object !== string under strict equality), making the
  client-side safety filter dead code in the columns branch. Cast
  to string so both paths work.
Utopia\Exception came transitively from utopia-php/framework, which the
SDK 23 bump dropped from the dependency graph. Replace the unresolved
import with the built-in \Exception and prune the dead @throws tags.
Comment thread .github/workflows/tests.yml Outdated
strategy:
matrix:
php-versions: ['8.1', '8.2', '8.3']
php-versions: ['8.2', '8.3']
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add 8.4

Adds Dockerfile.php-8.4 and bumps the existing 8.2 / 8.3 images to
appwrite/utopia-base:php-X.Y-1.0.0 so all three stay aligned.
@abnegate abnegate merged commit 5d7efbe into main May 11, 2026
7 checks passed
@abnegate abnegate deleted the feat/sdk-23 branch May 11, 2026 08:07
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.

2 participants