Is a migation to Yii2 worth the pain

I have a large, mission critical application written in Yii 1. To migrate this amount of code is going to require a considerable amount of effort while ensuring the current Yii 1 application is stable and has minimal development done to it. As I mentioned this is a mission critical application.

Is the move to Yii 2 worth the effort? What am I going to gain?

NOTE: I have done some smaller applications using Yii 2 so I am familiar with it.

I would say yes.

If you are able to port it in parallel, then definitely!

The difference between Yii 1 and Yii 2 is night and day, winter and summer.

The biggest advantage of Yii 2 is IMO the fact that it is powered by Composer and thus uses namespaces, meaning that extensions, etc. are much easier to manage than the old mess.

Porting the application is a pain, of course, but my experience has been that it is not as difficult as I thought it would be, because Yii 2 code is more intuitive, more modular and more flexible.

It depends on what the life expectancy of your mission critical application is going to be. You still have time until Yii 1 reaches end of life.

Which also means that you can take your time porting it. :)

Thanks, that helps.

This application is here to stay so it sounds like I need to start planning a migration.

One of the tricky parts is trying to maintain a uniform UI while running sections of code from different Yii versions. Do you have any suggestions on which Yii version should be ‘running the show’? The Yii 2 guide suggests using Yii2 code in a Yii 1 application, however, it would seem to me that Yii 2 should be running Yii 1 code since Yii 2 is the ultimate destination.

I liked a start from scratch approach. Yes, it would ALOT OF WORK, but also a change to clean up code base. I’ve tried the Yii1 code in Yii2 app method and tended to just fix what didn’t run (add use statements, CHtml:: to Html::, etc), but left the old logic in place and not changing to what Yii2 offered.

Just my two cents.