Conversation
Greptile SummaryThis release updates the PHP SDK to Appwrite API response format 2.0.0 and promotes the dedicated database APIs to their stable surface.
Confidence Score: 4/5The nullable credential-generation state must be handled before merging because valid dedicated-database responses can otherwise fail model hydration. DedicatedDatabase documents credentialGeneration as null before initialization but passes it into a required int constructor parameter, causing a TypeError on that valid lifecycle state. Files Needing Attention: src/Appwrite/Models/DedicatedDatabase.php Important Files Changed
Prompt To Fix All With AI### Issue 1
src/Appwrite/Models/DedicatedDatabase.php:84
**Credential generation rejects null state**
If a dedicated database has not initialized its credential-rotation contract, the API can return a null `credentialGeneration`, but this property requires an `int` and hydration passes the value directly to it, causing a `TypeError` instead of returning the database model.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "chore: update PHP SDK to 30.0.0" | Re-trigger Greptile |
| public int $connectionPort, | ||
| public string $connectionUser, | ||
| public string $connectionPassword, | ||
| public int $credentialGeneration, |
There was a problem hiding this comment.
Credential generation rejects null state
If a dedicated database has not initialized its credential-rotation contract, the API can return a null credentialGeneration, but this property requires an int and hydration passes the value directly to it, causing a TypeError instead of returning the database model.
Knowledge Base Used: Typed model serialization
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/Appwrite/Models/DedicatedDatabase.php
Line: 84
Comment:
**Credential generation rejects null state**
If a dedicated database has not initialized its credential-rotation contract, the API can return a null `credentialGeneration`, but this property requires an `int` and hydration passes the value directly to it, causing a `TypeError` instead of returning the database model.
**Knowledge Base Used:** [Typed model serialization](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/sdk-for-php/-/docs/typed-model-serialization.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
This PR contains updates to the SDK for version 30.0.0.
What's Changed
mysql,postgresql,mongo,documentsDB, andvectorsDBservices, previously released as release candidatestablesDB.cutoverMigrationis renamed totablesDB.createCutoverusageAggregateOnlyMetricson theBillingPlanmodeltransactionIdis accepted again bydocumentsDBandvectorsDBcreateDocumentandcreateDocumentsX-Appwrite-Response-Formatis now2.0.0FrameworkAdapter.fallbackFileis now optional