Yes, but the thing (in my case) is that being A = ModuleManagerBundle, each of my module bundles (B and C in this example) has to depend on it. The problem is that each module could be mandatory or optional. So, having: C extends B extends A, and B being an optional module, removing it would break the app, because C extends B.
My current solution is handling dependencies on my module manager bundle. I just needed to access the ModuleManagerBundle's services (which thanks to the CompilerPass class I can handle it now), control module's dependencies and the order in which JS are loaded, based on this dependency tree. I don't use templates so with a little tweak in my ModuleManagerBundle made the trick for now. Thanks a lot for your help guys! On Wed, Feb 2, 2011 at 3:27 PM, Benjamin Eberlei <[email protected]>wrote: > this was actually discussed in one of the IRC meetings, afaik there will > never be support multiple inheritance in bundles. You can chain the > inheritance hierachy with C extends B extends A. > > On Wed, 2 Feb 2011 15:21:50 -0300 > Gustavo Adrian <[email protected]> wrote: > > > I didn't know that. Thanks for the information! Then I'll use the > > CompilerPass class to configure services that depend on another bundle's > > services. In the meantime I'm handling module's dependencies with my > module > > manager bundle. > > > > > > Regards. > > > > On Wed, Feb 2, 2011 at 3:08 PM, Christophe COEVOET <[email protected]> > wrote: > > > > > Le 02/02/2011 18:25, Gustavo Adrian a écrit : > > > > > > If there are multiple childs, maybe it could take into account the > order > > >> in which they were added in the "registerBundles" method? Maybe I > still > > >> don't know the real purpose of the inheritance. This feature was > included to > > >> give child's services access to the services of its parent bundle?. If > > >> that's so, it would be nice to have a 1:n relation between bundles. > > >> > > >> And thinking about it, this feature could also be used to establish > the > > >> order in which the assets are included. In my case, having this tree: > > >> > > >> ModuleManagerBundle > > >> |_ BusinessPartnerBundle > > >> |_ CustomerBundle > > >> |_ SupplierBundle > > >> > > >> Their JS's could be included in this order: > > >> > > >> module_manager.js > > >> business_partner.js > > >> customer_bundle.js > > >> supplier_bundle.js > > >> > > >> I don't know. I'm just sharing my thoughts. Maybe this feature could > break > > >> something I'm not aware of. > > >> > > >> > > >> the inheritance is meant to be able to override templates of a > bundle. So > > > when you request ModuleManagerBundle:Main:index.html.twig, it will > first > > > search in the child bundle for a Main/index.html.twig template to let > you > > > change the template. > > > This is not a way to handle dependencies. Accessing to services is done > > > through the DIC which is and so accessing to a service defined in > another > > > bundle only means you have a dependency, not that you overwrite it. > > > > > > -- > > > Christophe | Stof > > > > > > -- > > > 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]<symfony-devs%[email protected]> > <symfony-devs%[email protected]<symfony-devs%[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]<symfony-devs%[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]<symfony-devs%[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
