Repository navigation
feat: SDK update for version 32.1.0 - #98
Conversation
🔵 Tier A · Mergeable after minor fixes
This update targets Appwrite 2.6.2, adds migration and project-policy APIs, and expands runtime and billing models. It also updates request serialization, path and header handling, redirect behavior, and the related documentation and examples. 59 of 117 changed files were too large to include in full.
Note Not approving while a bug finding is open: Don't treat 304 responses as redirects
Fix with agent prompt### Issue 1
src/Appwrite/Client.php:469
**Don't treat 304 responses as redirects**
A valid `304 Not Modified` response is not a redirect and normally has no `Location` header, but this condition turns it into an `AppwriteException` with an empty redirect target. Requests using conditional headers (for example, through `addHeader`) therefore fail instead of receiving the unchanged response.
### Issue 2
src/Appwrite/Service.php:23-24
**Cover encoded and dot-segment path values**
The new encoder is used across service path parameters, but the tests only exercise ordinary IDs; they do not cover reserved characters or the explicit `.`/`..` rejection. A focused URI-level test would protect against regressions that let a slash escape its segment or allow a dot segment through.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.📂 Walkthrough · 6
Reviewed |
|
@hansi-codes review |
| $responseContentType = $response->getHeaderLine('content-type'); | ||
| $responseBody = (string) $response->getBody(); | ||
|
|
||
| if ($responseType !== 'location' && $responseStatus >= 300 && $responseStatus < 400) { |
There was a problem hiding this comment.
Don't treat 304 responses as redirects
A valid 304 Not Modified response is not a redirect and normally has no Location header, but this condition turns it into an AppwriteException with an empty redirect target. Requests using conditional headers (for example, through addHeader) therefore fail instead of receiving the unchanged response.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/Appwrite/Client.php
Line: 469
Comment:
**Don't treat 304 responses as redirects**
A valid `304 Not Modified` response is not a redirect and normally has no `Location` header, but this condition turns it into an `AppwriteException` with an empty redirect target. Requests using conditional headers (for example, through `addHeader`) therefore fail instead of receiving the unchanged response.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.🟡 Minor · bug · Reply if this doesn't apply.
| if ($segment === '.' || $segment === '..') { | ||
| throw new AppwriteException('Path parameter cannot be "." or ".."'); |
There was a problem hiding this comment.
Cover encoded and dot-segment path values
The new encoder is used across service path parameters, but the tests only exercise ordinary IDs; they do not cover reserved characters or the explicit ./.. rejection. A focused URI-level test would protect against regressions that let a slash escape its segment or allow a dot segment through.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/Appwrite/Service.php
Line: 23-24
Comment:
**Cover encoded and dot-segment path values**
The new encoder is used across service path parameters, but the tests only exercise ordinary IDs; they do not cover reserved characters or the explicit `.`/`..` rejection. A focused URI-level test would protect against regressions that let a slash escape its segment or allow a dot segment through.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.🟡 Minor · testing · Reply if this doesn't apply.
This PR contains updates to the SDK for version 32.1.0.
What's Changed
Client::getHttpClient()andcreateHttpClient()drop theirboolargument;$httpClientNoRedirectremovedAppwriteExceptionnaming theLocationMigrationsservice to run Appwrite, Firebase, NHost, Supabase, CSV and JSON migrations, plus retries and listingMigration,MigrationListandMigrationReportmodels and theAppwriteMigrationResource,FirebaseMigrationResource,NHostMigrationResource,SupabaseMigrationResourceandOnDuplicateenumsProject::updateDenyRealtimeGuestsPolicy, thePolicyDenyRealtimeGuestsmodel andProjectPolicyId::DENYREALTIMEGUESTS()Project::deleteSessionsto sign out every user in the projectBillingPlan::$deploymentRetention,$deploymentRetentionMaxand$deploymentsRetentionCountpython-3.15,deno-2.9,go-1.27andrust-1.99toRuntimeandBuildRuntimeX-Appwrite-Response-Format: 2.6.2; README targets Appwrite 2.6.xX-Appwrite-Projectand the other method headers instead of failing with 401.and..throwAppwriteExceptionAppwriteExceptioninstead of being sentavatars->getBrowsercode