I don't have this problem so much anymore, but I've been using Symfony 2 for quite some time now.
I do however completely agree with you. Not only is the code completion this a problem, but having the argument to Controller->get be a string gives absolutely no guidance to what the possible values could be. If there were actual getters and setters it would be fare more structured. That being said, I understand why they did it this way. The Symfony 2 framework is supposed to be completely modular and extendable, so it's not possible to know to the valid values for get() until runtime. It all depends on what Bundles you're using. I think your current workaround is the best option at the moment. It will allow you as a developer to specify more clearly to your team what facilities *your* controllers will have available to them, while not imposing a rigid structure on the Framework for other teams. On Sat, May 7, 2011 at 9:55 AM, Tony Piper <tpi...@tpiper.com> wrote: > > I've already considered extending the Controller class to add some of > > those functions and having my own Controllers extend that class > > But changing my code (specially on this level) to help my editor feels > > really stupid ... > > > > Am I really the only developer out there who sucks at memorizing > > APIs ? or do you guys have some other ways of helping yourself in the > > process of working with sf2? > > You are not alone, Ruben and I'd be interested to hear what others > have to say about this. > > I have found myself implementing my own Base Controller which > provides, amongst other things, easy access to the Entity Manager > which is going to be needed in pretty much every controller. > > I watched Fabien's keynote at Symfony Live and was absolutely amazed > to see that he uses good 'ol TextMate which doesn't support > autocompletion so I wonder if he's ever considered it necessary. I > certainly wouldn't be very productive if it were not for PhpStorm's > autocomplete goodness. > > cheers, > > Tony. > > -- > 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 users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?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 users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en