简体   繁体   English

symfony2 doctrine2:如何调试为什么不调用集合设置器

[英]symfony2 doctrine2 : how to debug why a collection setter is not called

I am having an issue described here : Can't persist symfony collection with double embedded form https://stackoverflow.com/questions/27188337/symfony-setter-not-called-on-form-collection-type-even-with-by-reference-fals 我在这里描述了一个问题: 无法以双重嵌入形式持续使用symfony集合 https://stackoverflow.com/questions/27188337/symfony-setter-not-call-on-form-collection-type-even-with-通过引用,FALS

I can't get a setter collection to get called even with the property by_reference set to true. 即使属性by_reference设置为true,我也无法调用setter集合。

Here my question is how can follow the chain of commands conducting symfony/doctrine to call this setUserIngredients of a userIngredients collection ? 在这里,我的问题是如何遵循执行symfony / doctrine的命令链来调用userIngredients集合的setUserIngredients?

Which functions from the vendors files are called to identify the by_reference => false and call the appropriate setter ? 供应商文件中的哪些函数被调用以标识by_reference => false并调用适当的setter?

Thanks a lot ! 非常感谢 !

To follow the chain of calls you can hook up a debugger. 要遵循调用链,您可以连接调试器。 For example http://phpdbg.com/ or http://xdebug.org/ alternatively if you already know a specific function that gets called then you can temporarily put var_dump(debug_backtrace()) in your vendor code to see how it gets to that point 例如, http var_dump(debug_backtrace())http://xdebug.org/或者,如果您已经知道要调用的特定函数,则可以暂时将var_dump(debug_backtrace())放入供应商代码中以查看其获取方式到那一点

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM