feat: SDK update for version 25.0.0#312
Conversation
Greptile SummaryThis PR introduces SDK version 25.0.0, replacing the mutable
Confidence Score: 4/5The core factory constructor logic, endpoint validation, and service migrations are correct and internally consistent. Two gaps — a missing deprecation annotation and an undocumented breaking API removal — won't crash production at runtime but will surprise users upgrading from 24.x. The new
Important Files Changed
Reviews (1): Last reviewed commit: "Commit from GitHub Actions (Format and p..." | Re-trigger Greptile |
| factory Client({ | ||
| String endPoint = 'https://cloud.appwrite.io/v1', | ||
| bool selfSigned = false, | ||
| }) => | ||
| createClient(endPoint: endPoint, selfSigned: selfSigned); |
There was a problem hiding this comment.
Client() constructor not annotated as deprecated
The CHANGELOG entry for 25.0.0 states: "Deprecated: Client() constructor and setter pattern remain for backwards compatibility but are marked deprecated where the analyzer supports it." Every setter method on Client received a @Deprecated annotation, but the factory Client({...}) constructor itself did not. In Dart, @Deprecated is valid on factory constructors and will generate analyzer warnings for call sites. Without it, users who continue using Client() see no IDE warnings or dart analyze hints pointing them toward the new factory constructors.
| ## 25.0.0 | ||
|
|
||
| * Added: `ClientAuth` interface returned by static factory constructors | ||
| * Added: Static factory constructors `Client.from`, `Client.fromSession`, `Client.fromDevKey`, and `Client.fromImpersonation` | ||
| * Added: Endpoint scheme validation in factory setup (rejects non-`http(s)`/`ws(s)` URLs) | ||
| * Added: `Realtime` and generated services accept factory-created `ClientAuth` clients | ||
| * Deprecated: `Client()` constructor and setter pattern remain for backwards compatibility but are marked deprecated where the analyzer supports it | ||
| * Updated: Consolidated realtime IO and browser implementations into the shared client | ||
|
|
||
| ## 24.1.1 | ||
|
|
There was a problem hiding this comment.
Breaking change not documented:
Service.client field removed
The old Service class exposed a public final Client client field that subclasses and any downstream code could access directly (e.g., myService.client). This PR removes that field entirely — Service is now const Service(ClientAuth _) with no stored reference. Each service subclass now holds its own private _client field. Any app-layer code or third-party integration that relied on aService.client will fail to compile at 25.0.0. The CHANGELOG lists six bullet points for this release but does not mention this breaking removal, which is a significant omission for a public-API change.
This PR contains updates to the SDK for version 25.0.0.
What's Changed
ClientAuthinterface returned by static factory constructorsClient.from,Client.fromSession,Client.fromDevKey, andClient.fromImpersonationhttp(s)/ws(s)URLs)Realtimeand generated services accept factory-createdClientAuthclientsClient()constructor and setter pattern remain for backwards compatibility but are marked deprecated where the analyzer supports it