Yii2 advance for Multi version app

I have 2 versions of the app. v1 and v2. Currently, both apps use Yii2 basic template and different servers. Now we need to merge all apps. So users can move from v1 to v2 or vice versa seamlessly. How to achieve this? and what concerns we must todo?

This question is heavily embedded in context, and it will be difficult for you to advise something.

2 Likes

无缝衔接的话,要对上路由,如果路由不多,可以做路由映射, 如果是v1合并到v2 ,那么就把v1的代码重写到v2,然后在v2的路由配置中把v1的路由映射过去;比如:v1 api: /user/member/, 可以在v2中映射
/user/member/ => /v1/user/member/, 反之依然。主要还是要看项目的关联度,来确定怎么处理。