You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains updates to the PHP SDK for version 25.1.0.
What's Changed
createSesProviderandupdateSesProvidertomessagingupdateOAuth2Servertoprojectfor OAuth2 server settingsupdatePasswordStrengthPolicyandPolicyPasswordStrengthtoprojectgetAuditsDBhealth check tohealthpassword-strengthtoProjectPolicyIdapps.readandapps.writetoProjectKeyScopes