Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class 'Number' not found on Object Serializer #48

Closed
PrakashInfiniti opened this issue Sep 19, 2017 · 10 comments
Closed

Class 'Number' not found on Object Serializer #48

PrakashInfiniti opened this issue Sep 19, 2017 · 10 comments

Comments

@PrakashInfiniti
Copy link

On line 276 while calling listTabs in envelopeapi

@PrakashInfiniti
Copy link
Author

Namespace Path( \DocuSign\eSign\Model) is not included while deserializing happening

@northern
Copy link

northern commented Nov 1, 2017

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.

@lpeterke
Copy link

+1

Exception in ObjectSerializer.php (line 274)

Using Laravel 5.5 and latest DocuSign API

@gitspider
Copy link

gitspider commented Nov 28, 2017

I am experiencing the same problem. I use PHP 7.0, Laravel 5.5 and the latest version of docusign-php sdk.

@gitspider
Copy link

[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.

@newtek-bneff
Copy link

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

@Ohda Ohda mentioned this issue Apr 24, 2018
@LarryKlugerDS
Copy link
Contributor

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.

@astroanu
Copy link

is this fixed now? will updating the api client work ?

@Muspi
Copy link

Muspi commented May 15, 2019

Hello, is this fixed? I have same problem.

Replacing 'Number' with '\DocuSign\eSign\Model\Number' seems to fix problem.

@LarryKlugerDS
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants