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

请加上 namespace #3

Open
fouding opened this issue Jun 3, 2019 · 0 comments
Open

请加上 namespace #3

fouding opened this issue Jun 3, 2019 · 0 comments

Comments

@fouding
Copy link

fouding commented Jun 3, 2019

更新:以下是按 https://cloud.tencent.com/document/product/266/9725 来执行 composer require "qcloud/vod-sdk-v5" "v2.2.0" 后报的错。公共库的资源未更新?

======
我使用了以前的 tencentyun-api/qcloudapi-sdk-php 包。正准备逐步迁移到新的 qcloud/vod-sdk-v5。composer install 时,报错:

Warning: Ambiguous class resolution, "QcloudApi" was found in both "vendor/tencentyun-api/qcloudapi-sdk-php/src/QcloudApi/QcloudApi.php" and "vendor/tencentcloud/tencentcloud-sdk-php/src/QcloudApi/QcloudApi.php", the first will be used.

然后打开源文件一看,居然没有 namespace!
请加上,以免冲突。(就算不是新旧两个包同时用的情况,加个命名空间也是 best practise;而且最好是 vendor/packageName 的形式,而不仅仅是 Vod 模块名:聊胜于无)

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

No branches or pull requests

1 participant