I know that this topic has been discussed here and there with a small pieces of information and sorry if I make a duplicate - I haven’t found suitable topic with my question.
To be short: I have a big Yii1 based app and I want to migrate it to Yii2. Is there any way to have a hybrid app like described in migration guidelines?
Under hybrid app I understand an app, where some components ( Model, View, Controller ) are Yii1 and some are Yii2. As per migration guide and discussion from here: https: //github.com/yiisoft/yii2/issues/10028#issuecomment-187115996 ( remove the space after "https:", sorry limitation of newbies for posting links ). I cannot have any component written in hybrid manner. In fact migration guideline leads me an instance of Yii2 app, which have a very limited application. I still need to continue coding in Yii1 style since request processing is Yii1 driven.
So what is the best practice in migrating app in this case? How big apps are migrating? Complete rewrite is the only option?
You’re right and clean code base is a very strong argument. However in case code base is big and changed frequently ( my case ), parallel development is getting really hard as almost everything will need to be backported. I.e. development will become appox 2 times slower.
Also, when I say "Nobody wants to stall" I mean from business prospective. Developers are completely fine with stalling, refactoring, polishing, refactoring again, etc.
We’re looking now either at developing a bridge between Yii1 and Yii2, so for instance I call Yii2 controller and model, but model in fact will be a proxy to a Yii1 model, until it’s migrated. And other way is not rewrite by module, i.e. module 1 is routed to Yii1 app, module 2 to Yii2 app. This causes issues with models interaction though and will require some number of modules to be migrated in one shot.
samdark`s case is fine: if it’s working, don’t fix it.