From a64d3aed95b11e8e9343625d59e28b4abafb68fe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Aug 2026 03:12:24 +0000 Subject: [PATCH 1/2] chore(internal): codegen related update --- src/Core/BaseClient.php | 5 +---- src/Core/Concerns/SdkModel.php | 20 ++++++++++++++++++++ src/Core/Util.php | 2 +- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/Core/BaseClient.php b/src/Core/BaseClient.php index fd84b21..5d3cb2c 100644 --- a/src/Core/BaseClient.php +++ b/src/Core/BaseClient.php @@ -130,10 +130,7 @@ protected function buildRequest( $parsedPath = Util::parsePath($path); /** @var array $mergedQuery */ - $mergedQuery = array_merge_recursive( - $query, - $options->extraQueryParams ?? [] - ); + $mergedQuery = [...$query, ...($options->extraQueryParams ?? [])]; $uri = Util::joinUri($this->baseUrl, path: $parsedPath, query: $mergedQuery)->__toString(); $idempotencyHeaders = $this->idempotencyHeader && !array_key_exists($this->idempotencyHeader, array: $headers) ? [$this->idempotencyHeader => $this->generateIdempotencyKey()] diff --git a/src/Core/Concerns/SdkModel.php b/src/Core/Concerns/SdkModel.php index a8548e1..ec39af3 100644 --- a/src/Core/Concerns/SdkModel.php +++ b/src/Core/Concerns/SdkModel.php @@ -97,6 +97,26 @@ public function __get(string $key): mixed return null; } + /** + * @internal + * + * Like {@link __unserialize()}, but for raw API payloads, whose keys are + * API property names rather than PHP property names + * + * @param array $data + */ + public function unserializeFromApiPayload(array $data): void + { + foreach (self::$converter->properties as $name => $info) { + if ($name !== $info->apiName && array_key_exists($info->apiName, array: $data)) { + $data[$name] = $data[$info->apiName]; + unset($data[$info->apiName]); + } + } + + $this->__unserialize($data); + } + /** * @internal * diff --git a/src/Core/Util.php b/src/Core/Util.php index b3db605..57cfaa6 100644 --- a/src/Core/Util.php +++ b/src/Core/Util.php @@ -207,7 +207,7 @@ public static function joinUri( parse_str($base->getQuery(), $q1); parse_str($parsed['query'] ?? '', $q2); - $mergedQuery = array_merge_recursive($q1, $q2, $query); + $mergedQuery = [...$q1, ...$q2, ...$query]; /** @var array */ $normalizedQuery = self::mapRecursive( From b14537091f9c88a332387e521c2c7464cff6a6ef Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Aug 2026 03:12:49 +0000 Subject: [PATCH 2/2] release: 0.11.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ src/Version.php | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f7014c3..e82003f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.11.0" + ".": "0.11.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 61a3dce..f90f9e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.11.1 (2026-08-18) + +Full Changelog: [v0.11.0...v0.11.1](https://github.com/CASParser/cas-parser-php/compare/v0.11.0...v0.11.1) + +### Chores + +* **internal:** codegen related update ([a64d3ae](https://github.com/CASParser/cas-parser-php/commit/a64d3aed95b11e8e9343625d59e28b4abafb68fe)) + ## 0.11.0 (2026-08-14) Full Changelog: [v0.10.0...v0.11.0](https://github.com/CASParser/cas-parser-php/compare/v0.10.0...v0.11.0) diff --git a/src/Version.php b/src/Version.php index 05fd03f..23a98f9 100644 --- a/src/Version.php +++ b/src/Version.php @@ -5,5 +5,5 @@ namespace CasParser; // x-release-please-start-version -const VERSION = '0.11.0'; +const VERSION = '0.11.1'; // x-release-please-end