0

I installed SonataMedia in the vendor/ directory of my project using composer and everything was working fine. I wanted to move the bundle to the src folder to keep everything tidy..

is there any way to move bundle from vender to src directory?

Sagar PHP
  • 13
  • 4

2 Answers2

2

Yes, copy past the namespace directories to the src directory...

But really, why do you want this? The directory structure is not important and even if it was, it is better to put the 3th party bundles in the vendor directory to seperate your bundles from 3th party bundles

Wouter J
  • 41,455
  • 15
  • 107
  • 112
  • actually i use sonata admin,media and fosuserbundel in my project, and i need to move bundle from vendor to src b'cause i have to deliver as an bundle(my bundle will configure(used) in other project) if i move bundle from vendor then what changes i need to make in namespace and how? can you help me? – Sagar PHP Oct 07 '13 at 06:19
  • no changes in the namespace and you can register bundles in the vendor dir in the AppKernel. I can't understand your problem – Wouter J Oct 07 '13 at 08:50
0

You must use Sonata easy extend and extend your bundle. This avoid breaks on bundle update.

By default easy extend create the extension in an app folder but you can tell him to put the extension in your src folder with the --dest parameter.

app/console sonata:easy-extends:generate SonataUserBundle --dest="./src"
David Jacquel
  • 51,670
  • 6
  • 121
  • 147