Zend_auth - Doctrine 2.2 - 自动加载 pbl
我已使用 Bisna lib 将 lib Doctrine 2.0 更新为 2.2。它工作得很好,但是当调用 Zend_Session::start()
时(进入 Boostrap.php
),我遇到了 Zend_Session / zend_auth 的问题。由于会话中存储了用户代理,我遇到了致命错误。
> Zend_Session_Exception Object
(
[_previous:Zend_Exception:private] =>
[message:protected] => Zend_Session::start() - /home/site/dev.full-estudio.com/library/Zend/Loader.php(Line:146): Error #2 include_once(): Failed opening 'Studio/Domain/Proxy/__CG__/Studio/Domain/Entity/ESecurityStudioUser.php' for inclusion
类名
Studio\Domain\Proxy\__CG__\Studio\Domain\Entity\ESecurityStudioUser
该类的真实路径是
Studio\Domain\Proxy\__CG__StudioDomainEntityESecurityStudioUser
Configuration Doctrine Proxy:
resources.doctrine.orm.entityManagers.default.proxy.autoGenerateClasses = true
resources.doctrine.orm.entityManagers.default.proxy.namespace = "Studio\Domain\Proxy"
resources.doctrine.orm.entityManagers.default.proxy.dir = APPLICATION_PATH "/../library/Studio/Domain/Proxy"
I've updating lib Doctrine 2.0 to 2.2 with Bisna lib. It works just fine, but i've got a problem with Zend_Session / zend_auth when Zend_Session::start()
is called (into Boostrap.php
). I've got a fatal error due to User's Proxy stocked in session.
> Zend_Session_Exception Object
(
[_previous:Zend_Exception:private] =>
[message:protected] => Zend_Session::start() - /home/site/dev.full-estudio.com/library/Zend/Loader.php(Line:146): Error #2 include_once(): Failed opening 'Studio/Domain/Proxy/__CG__/Studio/Domain/Entity/ESecurityStudioUser.php' for inclusion
Class Name
Studio\Domain\Proxy\__CG__\Studio\Domain\Entity\ESecurityStudioUser
The real path of this class is
Studio\Domain\Proxy\__CG__StudioDomainEntityESecurityStudioUser
Configuration Doctrine Proxy:
resources.doctrine.orm.entityManagers.default.proxy.autoGenerateClasses = true
resources.doctrine.orm.entityManagers.default.proxy.namespace = "Studio\Domain\Proxy"
resources.doctrine.orm.entityManagers.default.proxy.dir = APPLICATION_PATH "/../library/Studio/Domain/Proxy"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
安德鲁的回答指出了正确的方向。
Doctrine 2.2.0 似乎不喜欢多于一个级别的代理命名空间(至少在 ZF1.x 引导进程的上下文中——我在与 bastien 相同的上下文中遇到它)。
因此
会破坏代理的自动加载,但
工作得很好。 (事实上,你可以注释掉配置行,Bisna 将使用“Proxy”作为默认值)。
Andrew's answer points in the right direction.
Doctrine 2.2.0 does not seem to like more than a single level of proxy namespace (at least in the context of a ZF1.x bootstrap process -- I encountered it in the same exact context as bastien).
So
breaks autoloading of proxies, while
works just fine. (In fact, you can comment out the config line, and Bisna will use "Proxy" as the default).
我有完全相同的问题...请参阅此处:-
http:// groups.google.com/group/doctrine-user/browse_thread/thread/334c3136ccf21630
看来bisna lib不完全支持学说 2.2 :(
I have exactly the same problem... see here:-
http://groups.google.com/group/doctrine-user/browse_thread/thread/334c3136ccf21630
It seems that the bisna lib does not fully support doctrine 2.2 :(