Skip to content

feat: PHP SDK update for version 25.1.0#78

Merged
abnegate merged 1 commit into
mainfrom
dev
Jun 5, 2026
Merged

feat: PHP SDK update for version 25.1.0#78
abnegate merged 1 commit into
mainfrom
dev

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Jun 5, 2026

Copy link
Copy Markdown
Member

This PR contains updates to the PHP SDK for version 25.1.0.

What's Changed

  • Added: createSesProvider and updateSesProvider to messaging
  • Added: updateOAuth2Server to project for OAuth2 server settings
  • Added: updatePasswordStrengthPolicy and PolicyPasswordStrength to project
  • Added: getAuditsDB health check to health
  • Added: password-strength to ProjectPolicyId
  • Added: apps.read and apps.write to ProjectKeyScopes

@greptile-apps

greptile-apps Bot commented Jun 5, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates the PHP SDK to version 25.1.0, introducing new OAuth2 server configuration, SES messaging provider, password-strength policy, and new project key scopes. The most significant structural change is that setProject() no longer adds X-Appwrite-Project as a global header; instead, every service method now explicitly injects it per-request via $this->client->getConfig('project').

  • New updateOAuth2Server and updatePasswordStrengthPolicy endpoints added to the Project service, along with supporting models, enum values, and tests.
  • createSesProvider / updateSesProvider added to the Messaging service; a querySeparator bug in Client::call() (double ? in query strings) is fixed.

Confidence Score: 4/5

Safe to merge after addressing the nullable-parameter bug in updateOAuth2Server; all other changes are consistent and well-tested.

The new updateOAuth2Server method unconditionally assigns five optional nullable parameters into $apiParams without null guards, while $scopes in the same method is correctly guarded. Omitting those arguments will serialize null into the JSON body for typed integer/boolean fields, which the API is likely to reject or mishandle.

src/Appwrite/Services/Project.php — specifically the updateOAuth2Server method around lines 689–693.

Important Files Changed

Filename Overview
src/Appwrite/Client.php Version bump to 25.1.0; setProject() now stores the project ID in $this->config rather than as a global header; a new getConfig() accessor is added; querySeparator fix ensures & is used when the path already contains ?.
src/Appwrite/Services/Project.php Adds updateOAuth2Server and updatePasswordStrengthPolicy methods and propagates per-request X-Appwrite-Project header to all methods; the new updateOAuth2Server method omits null checks for 5 optional parameters, sending null in the JSON body.
src/Appwrite/Services/Messaging.php Adds createSesProvider and updateSesProvider; follows the existing convention of sending enabled unconditionally (consistent with all other provider methods).
src/Appwrite/Models/PolicyPasswordStrength.php New model for password-strength policy with standard from()/toArray() implementation.
src/Appwrite/Models/Project.php Adds 9 OAuth2 server fields and moves $region earlier in the constructor; from() and toArray() updated consistently.
src/Appwrite/Enums/ProjectPolicyId.php Adds PASSWORDSTRENGTH enum value with correct lazy-singleton pattern.
src/Appwrite/Enums/ProjectKeyScopes.php Adds APPSREAD and APPSWRITE enum values following the existing singleton pattern.
src/Appwrite/Services/Health.php Adds getAuditsDb method and propagates per-request project header to all methods.
tests/Appwrite/Services/ProjectTest.php Adds test coverage for new project methods including testMethodUpdateOAuth2Server and testMethodUpdatePasswordStrengthPolicy.

Reviews (1): Last reviewed commit: "chore: update PHP SDK to 25.1.0" | Re-trigger Greptile

Comment thread src/Appwrite/Services/Project.php
@abnegate abnegate merged commit ec02d82 into main Jun 5, 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.

2 participants