It is using the Kernel::getBundleDirs method to load each extension ( initiated with registerBundles method ), so you can change the loading order in your Kernel. But each ContainerBuilder is independent from the other extensions, so an extension isn't aware of others extensions services.
By the way, Kris Wallsmith committed something that fit to my needs in this case: https://github.com/fabpot/symfony/commit/9ab33e4ae4463f51e8bf26f9415531647448bb9b On Nov 17, 7:43 pm, Thomas Rabaix <[email protected]> wrote: > The ContainerBuilder has a method to remove a service by id. so you can > rewrite the service you want to change. > > something I am not sure is the loading order of each bundle's DI. > > On 15 nov. 2010, at 15:54, Florian wrote: > > > > > > > > > Ok, it seems we can't access other Extensions services during > > configLoad. > > > I will try with this solution:https://gist.github.com/700426 > > > On 13 nov, 18:48, Florian <[email protected]> wrote: > >> Hi, > > >> Is it possible to define method calls on an already defined service ? > > >> Example: I have the DoctrineExtenstion that set the > >> "doctrine.dbal.default_connection.event_manager" service definintion. > > >> I want to add method calls on the definition from antoher bundle dic > >> extension ( aka DoctrineExtensionsExtension) > > >> So what I wrote is this: > > >> public function configLoad($config, ContainerBuilder $container) > >> { > >> $loader = new XmlFileLoader($container, __DIR__.'/../Resources/ > >> config'); > >> $loader->load('doctrine_extensions.xml'); > >> if(array_key_exists('orm.listener.sluggable', $config)) > >> { > >> > >> $container->getDefinition('doctrine.dbal.default_connection.event_manager') > > >> ->addMethodCall('addEventSubscriber', > >> array($container->getParameter('doctrine_extensions.orm.listener.sluggable' > >> ))); > > >> } > >> } > > >> The problem is that the $container throws an excpetion: 'The service > >> definition "doctrine.dbal.default_connection.event_manager" does not > >> exist.' > > >> var_dump($container->getDefinitions()) returns an empty array. > > >> Do you have any idea ? > > >> Here is my config: > > >> doctrine_extensions.config: > >> orm.listener.sluggable: ~ > > >> doctrine.dbal: > >> connections: > >> default: > >> dbname: symfony2_ecommerce > >> user: root > >> password: ~ > > >> Thanks, > >> Florian. > > > -- > > 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
