moving bundle from vendor to src directory

陌路散爱 提交于 2020-01-16 12:19:28

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!