Skip to content

feat: PHP SDK update for version 27.0.0#81

Merged
ChiragAgg5k merged 2 commits into
mainfrom
dev
Jul 13, 2026
Merged

feat: PHP SDK update for version 27.0.0#81
ChiragAgg5k merged 2 commits into
mainfrom
dev

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Jul 13, 2026

Copy link
Copy Markdown
Member

This PR contains updates to the SDK for version 27.0.0.

What's Changed

  • Breaking: Removed Health service with its models and enums
  • Breaking: Removed Usage service and usage models
  • Breaking: Removed Messaging methods listMessageLogs, listProviderLogs, listSubscriberLogs, listTopicLogs
  • Breaking: Renamed TablesDB::create parameter dedicatedDatabaseId to specification
  • Breaking: Removed countryCode and countryName from ActivityEvent model
  • Added: Organization service get, update, delete, and membership CRUD methods
  • Added: Client::setSigningKey and Client::setBearer for JWT and bearer authentication
  • Added: vector query helpers Query::vectorDot, Query::vectorCosine, Query::vectorEuclidean
  • Added: appwrite OAuth2 provider and Project::updateOAuth2Appwrite method
  • Added: prompt and maxAge parameters to updateOAuth2Oidc, defaultScopes to updateOAuth2Server
  • Added: newSpecification parameter to Backups::createRestoration
  • Added: type parameter to Functions and Sites listSpecifications
  • Added: token parameter to Functions::getDeploymentDownload
  • Added: mode to Block, status to Database, geolocation/ISP fields to Locale models
  • Added: onboarding and oAuth2ServerDefaultScopes to Project model
  • Added: organization membership, organization, and project.oauth2/stages key scopes
  • Added: billing plan models, BillingPlanGroup, DatabaseStatus, OIDC prompt enums
  • Updated: deprecated Databases transaction and text attribute methods in favor of TablesDB

@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates the PHP SDK to version 27.0.0, regenerating service classes from the updated Appwrite API spec. The most significant changes are the addition of a JWT signing key auth mechanism in Client.php, new Organization membership management endpoints, removal of the Health and Usage service classes, and several parameter additions across Functions, Sites, Project, and Backups.

  • Client.php: New setSigningKey / setBearer / getAuthorization methods implement a short-lived self-signed JWT flow (1 h TTL, refreshed automatically with a 5-second early-expiry buffer); adhocore/jwt added as a required dependency.
  • Organization.php: Adds get, update, delete, and a full membership CRUD suite (listMemberships, createMembership, getMembership, updateMembership, deleteMembership); the three keyed membership methods redundantly add the path parameter membershipId to $apiParams — already flagged in a prior review.
  • Functions.php / Sites.php: The null-guard around buildSpecification was removed, making it unconditionally sent even when null; runtimeSpecification immediately below remains guarded — noted in a prior review as a P1 regression.

Confidence Score: 4/5

  • Safe to merge once the buildSpecification null regression in Functions.php and Sites.php is resolved; the rest of the SDK update is structurally sound.
  • The unconditional transmission of a null buildSpecification in both Functions.php and Sites.php changes the behavior of existing callers who relied on the previous conditional guard — callers who do not supply the parameter will now silently overwrite a previously-set specification with null. This is an active regression on a commonly-used deployment path. All other changes look correct: the JWT signing mechanism is properly implemented with mutual exclusion, new vector query helpers follow established patterns, and the Organization membership methods work correctly aside from the redundant path-parameter issue.
  • src/Appwrite/Services/Functions.php and src/Appwrite/Services/Sites.php — the removed null-guard on buildSpecification deserves attention before merge.

Important Files Changed

Filename Overview
src/Appwrite/Client.php Adds JWT signing key mechanism (setSigningKey, setBearer, getAuthorization) with proper mutual exclusion between bearer and signing-key auth, caches JWTs with 5-second buffer before expiry; also bumps SDK version to 27.0.0 and adds adhocore/jwt dependency.
src/Appwrite/Services/Organization.php Adds CRUD methods for organization (get/update/delete) and membership management; the three new membership methods (getMembership, updateMembership, deleteMembership) add membershipId redundantly to $apiParams after already substituting it into the URL path.
src/Appwrite/Services/Functions.php Adds type parameter to listSpecifications and token to getDeploymentDownload; removes the null-guard on buildSpecification in the deployment update path, causing it to be unconditionally sent as null when callers omit it.
src/Appwrite/Services/Sites.php Mirrors the Functions.php change — adds type to listSpecifications and removes the null-guard on buildSpecification, sending null unconditionally when the caller omits it.
src/Appwrite/Services/Project.php Adds updateOAuth2Appwrite method and new prompt/maxAge params to updateOAuth2Oidc and defaultScopes to updateOAuth2Server; new params follow the same unconditional-null pattern already used throughout the file for all other OAuth2 PATCH methods.
src/Appwrite/Services/Backups.php Adds optional newSpecification parameter to createRestoration, properly guarded with an is_null check before adding to params.
src/Appwrite/Query.php Adds three new vector query helpers (vectorDot, vectorCosine, vectorEuclidean) following the existing Query method pattern.
composer.json Adds adhocore/jwt ^1.1 as a runtime dependency to support the new JWT signing key feature in Client.php.

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

@ChiragAgg5k
ChiragAgg5k merged commit 9baf330 into main Jul 13, 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