maker-bundle
maker-bundle copied to clipboard
Add possibility to override Message and MessageHandler namespace
The make command that generates Message and MessageHandler doesn't provide a way to customize the namespace, by default Message are under $rootNamespace.'\Message'
and MessageHandler under $rootNamespace.'\MessageHandler'
It could be nice to give to user the ability to customize those namespaces like:
$rootNamespace.'\Messenger\Message'
and $rootNamespace.'\Messenger\Handler'
I see it as a new config option:
messenger_namespaces:
message: 'Messenger\Message'
handler: 'Messenger\Handler'
It also lets user organize all Messenger related classes under an unique namespace:
messenger_namespaces:
message: 'Messenger'
handler: 'Messenger'
We've typically shyed away from making things configurable to avoid become the monster that SensioGeneratorBundle was (monster in that it was SO customizable, that it was difficult to add new features). This seems harmless, but unless more people are asking for this, I'd like to avoid doing it. If we make these configurable, we could/should make all namespaces configurable.
Cheers!
Totally understabable 👍 At least could we let users specifying complete namespace in command argument?
Yes - I think we would just need to ask a new question: “what do you want to call the handler class” (I think we don’t ask that now) and this would accept a short name or a fully qualified class name :)