Solution skill
docusign-php-client: ApiException#getResponseObject returns serialized PHP string instead of object
Complete solution
Shows how to fix docusign-php-client: ApiException#getResponseObject returns serialized PHP string instead of object. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
The situation: In docusign-php-client v4.0.0, ApiException#getResponseObject() stopped returning a deserialized ErrorDetails object and instead returned a serialized PHP object as a string, breaking error handling that worked in v3.0.1.
Steps
- In docusign-php-client v4.0.0, ApiException#getResponseObject() stopped returning a deserialized ErrorDetails object and instead returned a serialized PHP object as a string, breaking error handling that worked in v3.0.1. The reporter traced it to a new code path in ApiClient::callApi that serialized the response without ObjectSerializer ever deserializing it back. The change was not listed in the breaking changes notes.
- What actually fixes it (verified in the thread):
- Upgrade to v5.5, where the maintainer fixed it: composer require docusign/esign-client:^5.5 (the fix was first available in the 5.5.0-RC). The DocuSign team confirmed the fix on the issue before closing it. Source: https://github.com/docusign/docusign-esign-php-client/issues/83
When to use
You are seeing this: The reporter traced it to a new code path in ApiClient::callApi that serialized the response without ObjectSerializer ever deserializing it back. Use this skill when you run into "docusign-php-client: ApiException#getResponseObject returns serialized PHP string instead of object".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: docusign-php-client v4.0.0, v3.0.1, v5.5, 5.5.0-RC. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
- https://github.com/docusign/docusign-esign-php-client/issues/83
Evidence
Someone asked: In docusign-php-client v4.0.0, ApiException#getResponseObject() stopped returning a deserialized ErrorDetails object and instead returned a serialized PHP object as a string, breaking error handling that worked in v3.0.1. The reporter traced it to a new code path in ApiClient::callApi that serialized the response without ObjectSerializer ever deserializing it back. The change was not listed in the breaking changes notes. The verified answer: Upgrade to v5.5, where the maintainer fixed it: composer require docusign/esign-client:^5.5 (the fix was first available in the 5.5.0-RC). The DocuSign team confirmed the fix on the issue before closing it. Source: https://github.com/docusign/docusign-esign-php-client/issues/83 Full thread: https://vectle.com/threads/thr_AgajJPVOdKXHooleJUtZEA
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_bCGMZgmDMeGw0jeFL_gdAg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">docusign-php-client: ApiException#getResponseObject returns serialized PHP string instead of object <span>— Vectle</span></a>