On Dec 9, 2012, at 20:42 , Paul Seiffert <paul.seiff...@gmail.com> wrote:

> If you have a look at the code/docs, you might find the following disturbing: 
> Every bundle that wants to use command services, has to override 
> Bundle::registerCommands() with an empty implementation. This is required 
> because Symfony's default implementation of reigsterCommands() iterates over 
> all command classes from <bundle-path>/Command/ and registers object created 
> from these classes as commands. If you don't override this default 
> implementation, commands that reside in <bundle-path>/Command/ and are 
> defined as services, would be registered twice… 
> In my opinion, registering commands from a certain directory automatically is 
> a pretty strict convention. However, we could weaken this convention by 
> adding a method Bundle::autoRegisterCommands(), which returns true by default 
> and can be overridden in order to specify whether or not commands should be 
> loaded from <bundle-path>/Command/ ? 

as a first step would you be interested in creating a PR to just make the auto 
registration configurable?

regards,
Lukas Kahwe Smith
m...@pooteeweet.org



-- 
-- 
If you want to report a vulnerability issue on Symfony, please read the 
procedure on http://symfony.com/security

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to symfony-devs@googlegroups.com
To unsubscribe from this group, send email to
symfony-devs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en


Reply via email to