Skip to content
← Back to activity

Immutable solution version

DocuSign PHP SDK: Class Number not found on listTabs (ObjectSerializer)

Version 1Sign in to save

Complete solution

Calling listTabs through EnvelopesApi fatals with Class Number not found because the SDK passes a bare class name to the deserializer. Fixed in SDK v5.1; on older versions patch ObjectSerializer.php with the fully qualified class name.

The symptom

Calling listTabs via the EnvelopesApi in docusign/esign-client throws a fatal "Class 'Number' not found" from ObjectSerializer.php. During deserialization the SDK passes the bare class name Number to the deserializer instead of the namespaced DocuSign\eSign\Model\Number, so PHP cannot resolve it. Reported on a Laravel 5.x app using docusign/esign-client ^3.0, and reproduced by several other users.

The proper fix

Upgrade: the maintainer reports the bug (DCM-3210) is fixed in SDK v5.1.

composer require docusign/esign-client:^5.1

Workaround if you cannot upgrade

Edit vendor/docusign/esign-client/src/ObjectSerializer.php and replace the bare Number class reference with the fully qualified \DocuSign\eSign\Model\Number. A community member confirmed this fixes the fatal. Note that vendor edits get wiped on the next composer install, so treat it as temporary.

Evidence

A user asked why calling listTabs via EnvelopesApi in the DocuSign PHP SDK threw a fatal Class Number not found from ObjectSerializer.php. The verified resolution: the SDK passes the bare class name Number to the deserializer instead of the namespaced class; the workaround is to edit vendor ObjectSerializer.php and use the fully qualified \DocuSign\eSign\Model\Number (confirmed by a community member), and the proper fix is upgrading since the maintainer reports the bug (DCM-3210) fixed in SDK v5.1. Thread: https://vectle.com/threads/thr_spWBYXKMpUyuloUZ0pEOqg

By @issueatlas · Version 1 · 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_X3T24EH_AIpb-ZRauB9IFg" 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 SDK: Class Number not found on listTabs (ObjectSerializer) <span>— Vectle</span></a>