Skip to content

fix: SDK update for version 30.3.1 - #93

Merged
ChiragAgg5k merged 1 commit into
mainfrom
release/30.3.1
Oct 12, 2026
Merged

ChiragAgg5k merged 1 commit into
mainfrom
release/30.3.1

Conversation

@ChiragAgg5k

Copy link
Copy Markdown
Member

This PR contains updates to the SDK for version 30.3.1.

What's Changed

  • Fixed: added ProjectAuthMethodId::PASSKEY(), so project.updateAuthMethod can enable passkeys
  • Fixed: added ProjectPolicyId::PASSKEY() and the PolicyPasskey model, so getPolicy and listPolicies return the passkey policy

Completes the passkeys release: the previous patch shipped the passkey methods, but not the passkey auth method and policy IDs or the PolicyPasskey model, so the SDK could not enable passkeys on a project. Made the same way, from a spec with exactly these pieces removed, three-way merged onto main. Verified live: updateAuthMethod(passkey), getPolicy(passkey) and listPolicies against Appwrite Cloud.

@hansi-codes

hansi-codes Bot commented Oct 12, 2026

Copy link
Copy Markdown

🔵 Tier A · Mergeable after minor fixes

The change is otherwise straightforward, but the new test does not verify that the passkey policy ID is actually used.

Adds passkey auth-method and policy identifiers plus a PolicyPasskey response model. Project::getPolicy() now hydrates passkey policy responses, and the SDK version metadata and changelog are updated.

Verdict New comments Fixed Still open
✅ Approved 1 0 0
Finding Where
🟡 Test does not exercise the new passkey policy ID tests/Appwrite/Services/ProjectTest.php:3230
Fix with agent prompt
### Issue 1
tests/Appwrite/Services/ProjectTest.php:3230
**Test does not exercise the new passkey policy ID**

The mocked response has `$id = passkey`, but this test still calls `ProjectPolicyId::PASSWORDDICTIONARY()` and does not assert the request path, so it passes even if `PASSKEY()` is missing or `getPolicy(PASSKEY())` targets the wrong endpoint. It also replaces the prior deny-corporate-email hydration case; please exercise the passkey ID/path and retain coverage for that existing branch.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
📂 Walkthrough · 7
File Change
CHANGELOG.md Documents the 30.3.1 passkey SDK updates.
src/Appwrite/Client.php Updates the SDK version in the request headers.
src/Appwrite/Enums/ProjectAuthMethodId.php Adds the passkey auth-method identifier and string mapping.
src/Appwrite/Enums/ProjectPolicyId.php Adds the passkey policy identifier and string mapping.
src/Appwrite/Models/PolicyPasskey.php Adds a model for passkey policy responses.
src/Appwrite/Services/Project.php Adds passkey response hydration to getPolicy().
tests/Appwrite/Services/ProjectTest.php Adjusts the policy lookup test to cover passkey response hydration.

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

@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 · Looks good to merge. Summary

);

$this->assertInstanceOf(\Appwrite\Models\PolicyDenyCorporateEmail::class, $response);
$this->assertInstanceOf(\Appwrite\Models\PolicyPasskey::class, $response);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Test does not exercise the new passkey policy ID

The mocked response has $id = passkey, but this test still calls ProjectPolicyId::PASSWORDDICTIONARY() and does not assert the request path, so it passes even if PASSKEY() is missing or getPolicy(PASSKEY()) targets the wrong endpoint. It also replaces the prior deny-corporate-email hydration case; please exercise the passkey ID/path and retain coverage for that existing branch.

Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/Appwrite/Services/ProjectTest.php
Line: 3230

Comment:
**Test does not exercise the new passkey policy ID**

The mocked response has `$id = passkey`, but this test still calls `ProjectPolicyId::PASSWORDDICTIONARY()` and does not assert the request path, so it passes even if `PASSKEY()` is missing or `getPolicy(PASSKEY())` targets the wrong endpoint. It also replaces the prior deny-corporate-email hydration case; please exercise the passkey ID/path and retain coverage for that existing branch.

---

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 f4888d6 into main Oct 12, 2026
2 checks 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.

1 participant