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 122 forks source link

VSCode not resolving Docusign classes but they are working #166

Closed JonathanPort closed 2 years ago

JonathanPort commented 2 years ago

I composer installed in a standard laravel 9 project, trying to pull the dependency into a class:

use Docusign\eSign\Client\ApiClient; use DocuSign\eSign\Configuration; use DocuSign\Ect

The problem is vscode intelliphense is saying "Undefined type 'Docusign\eSign\Client\ApiClient'" and marking the file as failed. The classes are working however it's just VSCode reporting them as broken because of docusign namespace not being resolved.

Any ideas why?

I followed the docs to add the classmap into composer.json, I dumped auto load etc.

JonathanPort commented 2 years ago

Sorry my bad, worked it out. Turns out also the classes weren't actually working either, that was my mistake for a parent class i was dumping.

For Laravel 9, and I guess Laravel 5+, I needed my composer.json to look like this:

"autoload": { "psr-4": { "App\": "app/", "Database\Factories\": "database/factories/", "Database\Seeders\": "database/seeders/", "DocuSign\eSign\" : "src/" // ADDED THIS } },