HelloSign 捆绑包在 Symfony 中不起作用

HelloSign bundle not working in Symfony

我已经在 Symfony 项目中安装了 Hello Sign PHP SDK,但它无法正常工作,并请求添加我添加的 "use" 语句,但仍然无法正常工作。 (https://github.com/HelloFax/hellosign-php-sdk)

这是我在使用 SDK 时遇到的错误

Attempted to load class "Client" from namespace "AppBundle\Controller\HelloSign". Did you forget a "use" statement for e.g. "HelloSign\Client", "Symfony\Component\BrowserKit\Client", "Symfony\Component\HttpKernel\Client", "Symfony\Bundle\FrameworkBundle\Client" or "GuzzleHttp\Client"

然后我为 Hello Sign 使用了一个名为 "bukashk0zzz/hellosign-bundle" 的 PHP 包装器。这也要求添加我添加但不起作用的 "use" 语句。 (https://github.com/Bukashk0zzz/HelloSignBundle)

这是那个错误。

Attempted to load class "TemplateSignatureRequest" from namespace "AppBundle\Controller\HelloSign". Did you forget a "use" statement for "HelloSign\TemplateSignatureRequest"?

我的密码是

require_once('../vendor/hellosign/hellosign-php-sdk/vendor/autoload.php');
$client = new HelloSign\Client('apikey');
$account = $client->getAccount();

我该如何解决这个问题?

你试过了吗:

$client = new \HelloSign\Client('apikey');
$account = $client->getAccount();

如果 hellosign-php-sdk 安装了 composer

Hellosign 在 apisupport@hellosign.com 提供 API 开发人员支持,如果您有任何其他问题。也请随时联系我们。听起来你得到了答案。