问题
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?
回答1:
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
回答2:
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"
来源:https://stackoverflow.com/questions/19217321/moving-bundle-from-vendor-to-src-directory