实例化错误 - 名称已被使用

Instantiation error - name is already in use

我正在使用库并像这样实例化对象:

use \DTS\eBaySDK\Constants;
use \DTS\eBaySDK\Finding\Services;
use \DTS\eBaySDK\Finding\Types;

use \DTS\eBaySDK\Shopping\Services;
use \DTS\eBaySDK\Shopping\Types;
use \DTS\eBaySDK\Shopping\Enums;

导致错误:

Fatal error: Cannot use DTS\eBaySDK\Shopping\Services as Services because the name is already in use in ...

但是,如果我在单独的 php 文件中使用它们,它们可以正常工作。我应该在这里更改什么?

你可以给他们一个像这样的别名:

use \DTS\eBaySDK\Finding\Services as ServicesOne;

use \DTS\eBaySDK\Shopping\Services as ServicesTwo;