Skip to content

feat: SDK update for version 32.1.0 - #98

Merged
ChiragAgg5k merged 8 commits into
mainfrom
dev
Oct 28, 2026
Merged

ChiragAgg5k merged 8 commits into
mainfrom
dev

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

This PR contains updates to the SDK for version 32.1.0.

What's Changed

  • Updated: protected Client::getHttpClient() and createHttpClient() drop their bool argument; $httpClientNoRedirect removed
  • Updated: redirects are no longer followed; a 3xx throws AppwriteException naming the Location
  • Added: Migrations service to run Appwrite, Firebase, NHost, Supabase, CSV and JSON migrations, plus retries and listing
  • Added: Migration, MigrationList and MigrationReport models and the AppwriteMigrationResource, FirebaseMigrationResource, NHostMigrationResource, SupabaseMigrationResource and OnDuplicate enums
  • Added: Project::updateDenyRealtimeGuestsPolicy, the PolicyDenyRealtimeGuests model and ProjectPolicyId::DENYREALTIMEGUESTS()
  • Added: Project::deleteSessions to sign out every user in the project
  • Added: BillingPlan::$deploymentRetention, $deploymentRetentionMax and $deploymentsRetentionCount
  • Added: python-3.15, deno-2.9, go-1.27 and rust-1.99 to Runtime and BuildRuntime
  • Updated: requests send X-Appwrite-Response-Format: 2.6.2; README targets Appwrite 2.6.x
  • Fixed: small (≤ 5 MB) uploads send X-Appwrite-Project and the other method headers instead of failing with 401
  • Fixed: path parameters are percent-encoded as one segment; . and .. throw AppwriteException
  • Fixed: header names or values containing CR, LF or NUL throw AppwriteException instead of being sent
  • Fixed: enum values are sent in GET query strings instead of being dropped, e.g. avatars->getBrowser code

@hansi-codes

hansi-codes Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

🔵 Tier A · Mergeable after minor fixes

The pull request has minor issues around valid 304 responses and untested path-encoding behavior.

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.

Verdict New comments Fixed Still open
💬 Commented 2 0 0

Note

Not approving while a bug finding is open: Don't treat 304 responses as redirects

Finding Where
🟡 Don't treat 304 responses as redirects src/Appwrite/Client.php:469
🟡 Cover encoded and dot-segment path values src/Appwrite/Service.php:23
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
File Change
CHANGELOG.md, README.md, docs/** Refreshes the 2.6.x documentation and adds migration and project API examples.
src/Appwrite/Client.php, src/Appwrite/Service.php Updates request handling for redirects, headers, enum serialization, and encoded path segments.
src/Appwrite/Services/** Adds migration and project endpoints and applies path-segment encoding across service routes.
src/Appwrite/Enums/** Adds migration and environment resource enums and runtime and project-policy values.
src/Appwrite/Models/** Adds migration and realtime-guest policy models and extends billing and DNS models.
tests/Appwrite/** Updates service and client tests for the new APIs and request handling.

Reviewed 5bad90d · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@ChiragAgg5k ChiragAgg5k changed the title feat: PHP SDK update for version 32.1.0 feat: SDK update for version 32.1.0 Oct 27, 2026

@hansi-codes hansi-codes 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 B · 1 blocking finding to address. Summary

Comment thread src/Appwrite/Client.php Resolved
@ChiragAgg5k ChiragAgg5k changed the title feat: SDK update for version 32.1.0 feat: PHP SDK update for version 32.1.0 Oct 27, 2026

@hansi-codes hansi-codes 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

@ChiragAgg5k ChiragAgg5k changed the title feat: PHP SDK update for version 32.1.0 feat: SDK update for version 32.1.0 Oct 27, 2026
@ChiragAgg5k

Copy link
Copy Markdown
Member Author

@hansi-codes review

@hansi-codes hansi-codes 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 A · See the inline comments. Summary

Comment thread src/Appwrite/Client.php
$responseContentType = $response->getHeaderLine('content-type');
$responseBody = (string) $response->getBody();

if ($responseType !== 'location' && $responseStatus >= 300 && $responseStatus < 400) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread src/Appwrite/Service.php
Comment on lines +23 to +24
if ($segment === '.' || $segment === '..') {
throw new AppwriteException('Path parameter cannot be "." or ".."');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@ChiragAgg5k
ChiragAgg5k merged commit 92e8400 into main Oct 28, 2026
1 check passed
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