Each extension gets a fresh container with the parameters from your config_xxx.yml, the order does not matter you can never access the services another extension defines from your extension. All services you define in your config_xxx.yml (and its imports) will overwrite services defined by an extension.
Kind regards, Johannes On 26 Jan., 19:05, Christophe COEVOET <[email protected]> wrote: > Le 26/01/2011 18:57, Venzon a crit : > > >> It is possible in a DI extension by calling > >> $container->getDefinition('my.service.id')->addMethodCall(...) > >> But this implies that your extension is called after the service is > >> registered (and this relies of the order of the bundles in the kernel) > > >> the safe and good solution is to use a CompilerPass but this is more > >> complex. > > >> -- > >> Christophe | Stof > > That sounds good, thx > > For sure my HelloExtension is loaded before every core extensions > > because it overrides core parameters. In kernel HelloBundle is added > > at the end of registered bundles array. Atm I cannot getDefinition() > > of any service from my HelloBundle extension - no core services are > > being registered. > > Any solution for that beside extending Compiler class? > > It is not extending the Compiler class (which does not exist) but > defining a CompilerPass. Look at the core bundles to see examples of > CompilerPasses (no doc has been written about that at the moment) > > Btw, if your extension *overrides* core parameters, it is executed after > the core extensions (the latest executed overrides the other). > > -- > 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] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
