[composer] composer.json 中require和require-dev 的区别

在composer install 参数中 --no-dev

 

当加上这个参数  

composer.json文件中

require-dev中的包就不会安装了

 

这个在线上的时候,可以使用,这样就不会把开发中需要的包按到线上

 

require中所引用的包在线上和开发环境均会使用

require-dev中的包只在本地开发的时候使用,线上运行不会使用的包

 

 

同样 --no-dev也会忽略

autoload-dev指定的命名空间

 

posted @ 2021-07-09 16:34  唯一客服系统开发笔记  阅读(258)  评论(0编辑  收藏  举报