feat: PHP SDK update for version 24.1.0#73
Conversation
Greptile SummaryThis PR bumps the PHP SDK to version 24.1.0 with three functional changes:
Confidence Score: 5/5All changes are additive or narrowly scoped model updates with consistent validation, serialization, and test fixture coverage. The nullable BillingLimits refactor correctly handles both absent and present keys via array_key_exists guards and the existing hydrateTypedValue null-passthrough logic. The new sizeActual field on File is required and consistently plumbed through construction, validation, and serialization. The Prompt enum deletion was verified against the full source tree — zero remaining references. No logic errors or contract breaks were found across any of the changed files. No files require special attention. Important Files Changed
Reviews (5): Last reviewed commit: "chore: update PHP SDK to 24.1.0" | Re-trigger Greptile |
| public static function from(array $data): static | ||
| { | ||
| if (!array_key_exists('bandwidth', $data)) { | ||
| throw new \InvalidArgumentException('Missing required field "bandwidth" for ' . static::class . '.'); | ||
| } | ||
| if (!array_key_exists('storage', $data)) { | ||
| throw new \InvalidArgumentException('Missing required field "storage" for ' . static::class . '.'); | ||
| } | ||
| if (!array_key_exists('users', $data)) { | ||
| throw new \InvalidArgumentException('Missing required field "users" for ' . static::class . '.'); | ||
| } | ||
| if (!array_key_exists('executions', $data)) { | ||
| throw new \InvalidArgumentException('Missing required field "executions" for ' . static::class . '.'); | ||
| } | ||
| if (!array_key_exists('GBHours', $data)) { | ||
| throw new \InvalidArgumentException('Missing required field "GBHours" for ' . static::class . '.'); | ||
| } | ||
| if (!array_key_exists('imageTransformations', $data)) { | ||
| throw new \InvalidArgumentException('Missing required field "imageTransformations" for ' . static::class . '.'); | ||
| } | ||
| if (!array_key_exists('authPhone', $data)) { | ||
| throw new \InvalidArgumentException('Missing required field "authPhone" for ' . static::class . '.'); | ||
| } | ||
| if (!array_key_exists('budgetLimit', $data)) { | ||
| throw new \InvalidArgumentException('Missing required field "budgetLimit" for ' . static::class . '.'); | ||
| } | ||
|
|
||
| return new static( |
There was a problem hiding this comment.
There is a stray blank line immediately after the opening brace of
from(), left over from removing the required-field validation blocks. It has no functional impact but looks unintentional.
| public static function from(array $data): static | |
| { | |
| if (!array_key_exists('bandwidth', $data)) { | |
| throw new \InvalidArgumentException('Missing required field "bandwidth" for ' . static::class . '.'); | |
| } | |
| if (!array_key_exists('storage', $data)) { | |
| throw new \InvalidArgumentException('Missing required field "storage" for ' . static::class . '.'); | |
| } | |
| if (!array_key_exists('users', $data)) { | |
| throw new \InvalidArgumentException('Missing required field "users" for ' . static::class . '.'); | |
| } | |
| if (!array_key_exists('executions', $data)) { | |
| throw new \InvalidArgumentException('Missing required field "executions" for ' . static::class . '.'); | |
| } | |
| if (!array_key_exists('GBHours', $data)) { | |
| throw new \InvalidArgumentException('Missing required field "GBHours" for ' . static::class . '.'); | |
| } | |
| if (!array_key_exists('imageTransformations', $data)) { | |
| throw new \InvalidArgumentException('Missing required field "imageTransformations" for ' . static::class . '.'); | |
| } | |
| if (!array_key_exists('authPhone', $data)) { | |
| throw new \InvalidArgumentException('Missing required field "authPhone" for ' . static::class . '.'); | |
| } | |
| if (!array_key_exists('budgetLimit', $data)) { | |
| throw new \InvalidArgumentException('Missing required field "budgetLimit" for ' . static::class . '.'); | |
| } | |
| return new static( | |
| public static function from(array $data): static | |
| { | |
| return new static( |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
* Breaking: Removed `Prompt` enum class * Breaking: Changed `BillingLimits` properties from required to nullable * Breaking: Moved `billingLimits` property to optional in `Project` model * Added `sizeActual` property to `File` model for compressed storage size * Updated authentication examples from session to API key based * Breaking: Removed `updateDenyCanonicalEmailPolicy` method documentation
ChiragAgg5k
left a comment
There was a problem hiding this comment.
LGTM. Auto-generated SDK updates consistent with the matching PRs in the other language SDKs (sizeActual on File, BillingLimits nullability, advisor docs switched to API key auth, version + changelog bump).
This PR contains updates to the PHP SDK for version 24.1.0.
Changes
sizeActualproperty toFilemodel for actual stored size after compression/encryptionBillingLimitsproperties to be nullable to match the server's sparse "limits crossed" responseProject.billingLimitsto be nullablePromptenum (already unused; superseded byProjectOAuth2GooglePromptin 24.0.0)