docusign / docusign-esign-php-client

The Official Docusign PHP Client Library used to interact with the eSign REST API. Send, sign, and approve documents using this client.
https://www.docusign.com/devcenter
MIT License
198 stars 123 forks source link

ApiException#getResponseObject is now a serialized PHP object #83

Closed nie7321 closed 3 years ago

nie7321 commented 5 years ago

In v3.0.1, calling ApiException#getResponseObject() would return an ErrorDetails object:

Screen Shot 2019-07-11 at 8 02 59 AM

In the v4.0.0 release, this now returns a serialized PHP object as a string:

Screen Shot 2019-07-11 at 7 56 21 AM

The breaking changes section in the change notes do not mention this change, so I have to ask if it was intended or if this is a bug?

nie7321 commented 5 years ago

The break looks like it is being caused by this new bit of code: https://github.com/docusign/docusign-php-client/blob/master/src/Client/ApiClient.php#L326

I think the intention was the serialized data would be unpacked into something more meaningful (determined by the HTTP response code) by whichever code is calling callApi?

But I don't think ObjectSerializer#deserialize() actually handles PHP-serialized objects?

nie7321 commented 5 years ago

This isn't really a question. This is an undocumented breaking change.

LarryKlugerDS commented 5 years ago

Thank you for raising this issue. I have filed internal report DCM-3466. I will also ask for a new regression test to be added.

dbbrahmbhatt commented 3 years ago

Hi @nie7321 , we have fixed this for the forthcoming 5.5 release. Currently thats the 5.5.0-RC release -- RC means Release Candidate.

To install it: composer require docusign/esign-client:v5.5.0-rc

Please validate from your side and let us know if you still face the issue.

LarryKlugerDS commented 3 years ago

Fixed in v5.5. Please re-open if this is still an issue. Thank you