Subject
I am targeting this branch, because without this fix it is imposible to use this feature.
I am trying to use this bundle to generate dynamic mapping here: https://github.com/Runroom/RunroomSamplesBundle/blob/master/src/DependencyInjection/RunroomSamplesExtension.php#L43
I had to stop using it and return to the EasyExtendsBundle way. Why? Because I keep getting an error similar to this: https://stackoverflow.com/questions/44323315/symfony-compiler-pass-i-want-to-add-method-call-to-logger-service
I think the problem is trying to use the compiler pass to add calls with objects without using definitions: https://github.com/sonata-project/sonata-doctrine-extensions/blob/1.x/src/Bridge/Symfony/DependencyInjection/Compiler/MapperCompilerPass.php#L41
That $options
without this patch is an array containing an object, for some reason, Symfony does not like it.
I do not fully understand the problem, but I found this solution. I open the PR to discuss if it is the best approach or not. I know it is a BC break, but we should consider that actually this feature is imposible to use without an error. Of course, if the fix is accepted and test need fixing, I can do it.
Changelog
### Fixed
- Fix modifying entities (associations, discriminator columns and overrides) with DoctrineCollector
patch