Can't we have a custom merge method (like mergeXXXConfiguration) on the XXXExtension for merging multiple configurations, and then only call xxxLoad() once with a merged configuration? Handling different configurations in xxxLoad() is not straightforward, especially if you load conditional configuration files or create service definitions programmatically depending on the configuration.
Johannes On Dec 30, 12:35 pm, Fabien Potencier <fabien.potenc...@symfony- project.com> wrote: > On 12/30/10 10:21 AM, Benjamin Eberlei wrote: > > > ok it seems this is a feature. Other extensions and the DoctrineExtension > > itself do try to handle multiple calls. > > Right, this is indeed a feature. Default usage: define the "default" > configuration in one file (config.yml), and override in another one > (config_dev.yml) -- useful for instance if you want to change the > database password depending on the environement. > > Fabien > > > I have to extend the 264 patch in this regard then. > > > On Thu, 30 Dec 2010 10:03:13 +0100 > > Benjamin Eberlei<[email protected]> wrote: > > >> Hello everyone, > > >> while writing my Doctrine Bundles Mapping patch Lukas came across a nasty > >> behavior while testing this branch: > > >> If I define a section "doctrine.orm" in both config.yml and config_dev.yml > >> then the DoctrineExtension::ormLoad() method is called twice for both > >> configuration options. > > >> Is this the desired effect? Because then we'd have to rewrite the whole > >> extension, because multiple calls lead to overwriting the previous > >> definitions and parameters. > > >> greetings, > >> Benjamin > > >> -- > >> If you want to report a vulnerability issue on symfony, please send it to > >> security at symfony-project.com > > >> You received this message because you are subscribed to the Google > >> Groups "symfony developers" group. > >> To post to this group, send email to [email protected] > >> To unsubscribe from this group, send email to > >> [email protected] > >> For more options, visit this group at > >>http://groups.google.com/group/symfony-devs?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
