Php Guzzle注释在Symfony2项目中不使用Doctrine2注释解析器
我有一个Symfony2项目,正在尝试集成来构建一个web服务客户端。我正在为客户机命令使用Php Guzzle注释在Symfony2项目中不使用Doctrine2注释解析器,php,symfony,doctrine,Php,Symfony,Doctrine,我有一个Symfony2项目,正在尝试集成来构建一个web服务客户端。我正在为客户机命令使用@guzzle注释(它扩展了guzzle\Service\Command\AbstractCommand) 它似乎在开发环境中正常工作,但当我尝试使用prod环境加载页面时,我得到了一个条令注释异常: PHP Fatal error: Uncaught exception 'Doctrine\Common\Annotations\AnnotationException' with message '[
@guzzle
注释(它扩展了guzzle\Service\Command\AbstractCommand
)
它似乎在开发环境中正常工作,但当我尝试使用prod环境加载页面时,我得到了一个条令注释异常
:
PHP Fatal error: Uncaught exception 'Doctrine\Common\Annotations\AnnotationException' with message '[Semantical Error] The annotation "@guzzle" in class Admin\FindAnExpertBundle\Entity\SymplecticClient\Rest\Command\UserById was never imported. Did you maybe forget to add a "use" statement for this annotation?'
我还收到一个关于缺少代理的错误
类文件:
PHP Warning: require(/home/httpd/sites/experts.admin/app/cache/prod/doctrine/orm/Proxies/AdminFindAnExpertBundleEntityRelationshipTypeProxy.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/httpd/sites/experts.admin/vendor/doctrine/lib/Doctrine/ORM/Proxy/ProxyFactory.php
PHP警告:require(/home/httpd/sites/experts.admin/app/cache/prod/doctrine/orm/Proxies/AdminFindExpertBundleEntityRelationshipTypeProxy.PHP)[]:无法打开流:在/home/httpd/sites/experts.admin/vendor/doctrine/lib/doctrine/orm/Proxy/ProxyFactory.PHP中没有这样的文件或目录
我假设这是因为致命错误是停止创建所有代理类
Guzzle似乎没有使用条令注释解析器,因此我想知道是否有办法让它忽略
@Guzzle
注释或以某种方式注册它们?您必须导入Guzzle的注释解析器,该解析器处理“@Guzzle”注释,例如:
use Guzzle\Service\Inspector as guzzle;
但我不知道是哪一类
可能对您有所帮助。我最终将与web服务客户端相关的类从实体文件夹中移出,这阻止了条令注释解析器读取它们。回想起来,这些类无论如何都不应该在该文件夹中。谢谢你的指针。我曾试图找到负责“狂饮”注释的类,但没有任何运气。事后看来,我认为与web服务客户机相关的类无论如何都不应该在Entity文件夹中。