I agree with Lukas here, You wouldn't want some extension to decide how the routes will look like, and maybe even hijack your own routes, depending on the order of extensions. This should be explicitly enabled by the end user.
On Tue, Jan 18, 2011 at 5:40 PM, Lukas Kahwe Smith <[email protected]>wrote: > > On 18.01.2011, at 18:32, Victor Berchet wrote: > > > Whenever you add a Bundle to your project, you may have to alter your > > routing file in order to import the routes from your new Bundle. > > > > Wouldn't it be good to offer a way to automatically register routes in > > extensions ? > > > > I have a quick proto available here: > > https://github.com/vicb/symfony/compare/vicb:master...vicb:router > > > > The first commit is about adding the support. > > > > The second commit is an example with the WebProfilerBundle. It is a > > very basic example, as simple as adding a method to the extension: > > public function getRouterResources() { > > return array('/_profiler' => 'WebProfilerBundle/Resources/ > > config/routing/profiler.xml'); > > } > > > > The example should use a 'route.register' [true/false] and a > > 'route.prefix' [/_profiler] parameters rather than having all hard- > > coded. > > > > Any thought on that topic ? > > > Well right now you just have to add the routing yml file(s) from the Bundle > manually. I think this is a good idea to keep this manual. Exposing > functionality to site users automatically is quite dangerous. > > regards, > Lukas Kahwe Smith > [email protected] > > > > -- > 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 > -- *Bulat Shakirzyanov* | Software Alchemist *a: *about.me/avalanche123 *e:* [email protected] -- 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
