Closed PrakashInfiniti closed 4 years ago
Namespace Path( \DocuSign\eSign\Model) is not included while deserializing happening
I'm running into a similar problem. However, the message I receive is:
PHP Fatal error: Class 'Number' not found in vendor/docusign/esign-client/src/ObjectSerializer.php on line 274
I believe that there might be an issue/conflict with the Laravel framework.
To replicate the problem. I'm using PHP 5.6.31. I have the following in my composer.json
:
{
"require": {
"laravel/framework": "5.1.*",
"docusign/esign-client": "^3.0"
}
}
This will get an older version of Laravel (which I currently believe is an LTS version) and the lastest version of the DocoSign PHP client (3.0.1).
This is my test script:
<?php
require("vendor/autoload.php");
$accountId = '123';
$auth = [
'Username' => 'test',
'Password' => 'secret',
'IntegratorKey' => 'secret',
];
$config = new \DocuSign\eSign\Configuration();
$config->setHost("https://demo.docusign.net/restapi");
$config->addDefaultHeader("X-DocuSign-Authentication", json_encode($auth));
$apiClient = new \DocuSign\eSign\ApiClient($config);
$templatesApi = new \DocuSign\eSign\Api\TemplatesApi($apiClient);
$response = $templatesApi->get($accountId, 'abc');
The above will produce the error.
However, if I remove the Laravel dependency from composer.json
and update
, when I now run the sample, I don't get the error.
This same error was raised a few weeks ago as well and I had been using a patch to work around this problem. When I use the ObjectSerializer
presented at the following location, I do not get the error:
https://raw.githubusercontent.com/trickeyone/docusign-php-client/cc3483c44c301ad7c0d42e41094e70dfde5f68ef/src/ObjectSerializer.php
Looking forward to see this problem smashed once and for all.
+1
Exception in ObjectSerializer.php (line 274)
Using Laravel 5.5 and latest DocuSign API
I am experiencing the same problem. I use PHP 7.0, Laravel 5.5 and the latest version of docusign-php sdk.
[2017-11-28 19:07:12] local.ERROR: Class 'Number' not found {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Class 'Number' not found at ...\vendor\docusign\esign-client\src\ObjectSerializer.php:274)
[stacktrace]
#0 ...\vendor\docusign\esign-client\src\ObjectSerializer.php(291): DocuSign\eSign\ObjectSerializer::deserialize(1, 'Number', NULL)
#1 ...\vendor\docusign\esign-client\src\ObjectSerializer.php(236): DocuSign\eSign\ObjectSerializer::deserialize(Object(stdClass), '\\DocuSign\\eSign...', NULL)
#2 ...\vendor\docusign\esign-client\src\ObjectSerializer.php(291): DocuSign\eSign\ObjectSerializer::deserialize(Array, '\\DocuSign\\eSign...', NULL)
#3 ...\vendor\docusign\esign-client\src\Api\EnvelopesApi.php(8113): DocuSign\eSign\ObjectSerializer::deserialize(Object(stdClass), '\\DocuSign\\eSign...', Array)
#4 ...\vendor\docusign\esign-client\src\Api\EnvelopesApi.php(8012): DocuSign\eSign\Api\EnvelopesApi->listTabsWithHttpInfo('310...', '37a21de1-1382-4...', '1', NULL)
#5 ...\app\Support\DocusignHelper.php(679): DocuSign\eSign\Api\EnvelopesApi->listTabs('310...', '37a21de1-1382-4...', '1')
This is error stacktrace.
See ticket #41 and if you swap out this ObjectSerializer.php for the default one - https://github.com/trickeyone/docusign-php-client/blob/cc3483c44c301ad7c0d42e41094e70dfde5f68ef/src/ObjectSerializer.php
Worked for me
Thank you for the problem report. And please accept my apologies for the very slow DocuSign staff replies on this issue. We have reorganized so we can provide faster response.
This issue now has internal bug report # DCM-3210
We are working on it.
is this fixed now? will updating the api client work ?
Hello, is this fixed? I have same problem.
Replacing 'Number' with '\DocuSign\eSign\Model\Number' seems to fix problem.
I'm told this is fixed in v5.1. Please respond and we'll re-open the issue if there is still a bug. Thank you.
On line 276 while calling listTabs in envelopeapi