我有一个 Symfony2 项目,正在尝试集成GuzzleBundle以构建 Web 服务客户端。我正在使用@guzzle
客户端命令的注释(扩展Guzzle\Service\Command\AbstractCommand
)。
它似乎在开发环境中正常工作,但是当我尝试使用 prod 环境加载页面时,我得到一个 Doctrine AnnotationException
:
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?'
我还收到有关缺少Proxy
类文件的错误:
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
我认为这是因为致命错误正在停止创建所有代理类。
Guzzle 似乎没有使用 Doctrine 注释解析器,所以我想知道是否有办法让它忽略@guzzle
注释或以某种方式注册它们?