Hi all, I have two services: "module_manager" and "module_user". My "module_manager" has a method "addModule" so I can call:
$moduleManager->addModule( $userModule ); And it adds the module to the manager. Now, from the "module_user"'s config.xml I want to call this method so it adds itself to the manager. I have already defined my "module_manager" service and it's working. But when I try to do this in the "module_user"'s config.xml: <services> <service id="module_user" class="%module_user.class%" /> <service id="module_manager"> <call method="addModule"> <argument type="service" id="module_user" /> </call> </service> </services> It throws an error: Fatal error: Class 'UL' not found... in appDevDebugProjectContainer.php If I remove the "addModule" call from the config, the error is not thrown. The thing is I don't want to call the "addModule" from the module_manager's config.xml, because I could have a variable number of modules, and I don't want to edit this file each time I change the list of modules of my app. So I want each module to add itself to the manager. Is it possible to call a method from another service in a service config? Thanks! -- 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
