简体   繁体   中英

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

I can't get a setter collection to get called even with the property by_reference set to true.

Here my question is how can follow the chain of commands conducting symfony/doctrine to call this setUserIngredients of a userIngredients collection ?

Which functions from the vendors files are called to identify the by_reference => false and call the appropriate 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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