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

151 views Asked by At

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 !

1

There are 1 answers

0
Flip On

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