On 01/16/2011 04:01 PM, Fabien Potencier wrote:
On 1/16/11 3:52 PM, Thomas wrote:
By settings the vendor namespace at first is pretty good as it will
allow to have a structure like this :
* Sonata/Bundle : namespace with all bundles
* Sonata/Component : shared library across the same namespace (and
related bundles)
(Note: this current structure works just by adding a few lines in the
autoload.php file and the AppKernel.php file.)
Now, let's say the Sonata/Bundle/NewsBundle bundle need to be extended
(for instance the templates)
what should be the correct namespace structure for overwriting this
bundle ?
* Application/Sonata/Bundle/NewsBundle
* Application/Sonata/NewsBundle
* Application/SonataNewsBundle
* Application/NewsBundle
It depends on how you configured the AppKernel and specifically the
registerBundleDirs() method.
I can see your point though as each time you add a new vendor, you will
have to register it in registerBundleDirs(), but I don't think this is
really a problem.
I think moving bundles to /vendor/ would make a lot of sense. To avoid
having to register every individual Bundle vendor one could modify the
UniversalClassLoader to look for a default folder in case a class does
not use any of the registered namespaces. This would allow loading all
Bundles directly from /vendor/ if they follow the correct structure.
Nils
--
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