【发布时间】:2016-07-28 12:10:23
【问题描述】:
我即将在我的 Symfony 3.0 项目中使用 KnpGaufretteBundle,该项目使用 aws/aws-php-sdk 依赖项。
我已配置我的服务,将 AWS 凭证和客户端定义为服务。
<!-- AWS -->
<service id="app.aws_credentials" class="Aws\Credentials\Credentials">
<argument>%aws_access_key_id%</argument>
<argument>%aws_secret_access_key%</argument>
</service>
<service id="app.aws_s3.client" class="Aws\S3\S3Client">
<argument type="collection">
<argument key="region">%aws_s3_region%</argument>
<argument key="version">%aws_sdk_version%</argument>
<argument key="credentials" type="service" id="app.aws_credentials"/>
</argument>
</service>
当我运行composer update,cache:clear 失败并抛出时,奇怪的部分开始了:
[Doctrine\Common\Annotations\AnnotationException]
[Semantical Error] The annotation "@http" in method Aws\AwsClientInterface::getCommand() was never imported. Did you maybe forget to add a "use" statement for this annotation?
@http 似乎不是一个可以做任何事情的注释。
有什么办法解决这个问题吗?
【问题讨论】:
-
字符串“@http”是该接口中方法文档的一部分,而不是注释。
-
@giaour 好吧,我知道,但 Symfony 仍然将其视为注释。
标签: php amazon-web-services symfony aws-php-sdk