How to let Yii1 go?


I’ve been using Yii1 for many projects. I’ve build so many functions and tools, did a lot of Gii customizing. Build extensive modules, CMS and so on. Years of programming. It does everything it needs to do and in a great way.

But when I see that it is in maintenance fase for so long already and Yii3.0 is so far developed yet (I could skip 2.0 maybe altogether :sweat_smile:), I’m getting nervous. It only is getting harder to switch to the new version.

It’s just that I have to do so much work to upgrade and get to the same level, but only with a recent Yii version under the hood.
Any advice from people who are in the same boat? As long as there are no big security issues, should I just go on with it? Will it break in a few years?

Maybe it’s the curse of Yii1 being such a good product actually. I know the developers that build it think different probably, but for me it was the best thing that has come on my path of a developer.

Any thoughts are appreciated.

1 Like

Hello I am facing the same situation.
I am happy to stick with version 1 as it does the trick.
It is also easy to customize Yii and add missing features by yourself.
Besides starting from version 2 you have to deal with namespaces that makes the code heavier to write as you constantly have to add some “use …” directives when we did everything to get rid of require or include in the first place. I confess that this refrained me to switching from version 1. But just a personal feeling…
My only very small issue is that I have one page (wizard based) that does not work with php 7 (it crashes apache, maybe some infinite loop?) and I keep one of my production server php version to 5.6.

Thanks for sharing.

PHP 5.6, wow you are even worse than I am :wink:

I agree on the namespace thing. Also the Composer idea still does not stick with me. I like a lightweight application, when I see what all those Composer dependencies drag into your project, it does not makes me feel comfortable. I’m getting old (programming wise spoken) probably, as everybody seems to have jumped on that train already.

1 Like

Well, I’m using Yii1 Application with PHP 7.x, Composer and Namespaces. This is doable. Takes time but is doable,

Ah yes I agree also on Composer, not really helpful…

I see BTW still a lot of commits and pull requests. I think because the project is in maintenance phase, or else it would be still an active development :smile:

I’ve installed Yii2 and will start building a new project with it. Just to see if I can switch and let Yii1 behind. I will not rebuild the old projects, it is too time consuming. I will just create my own branch when the time comes and apply fixes as long as I can. The projects will probably live only 5 to 8 years from now. I hope this will last.

I also have a couple of sites still running on Yii 1.1.
They’ve been quite stable with PHP 7.x for a long time, and yesterday I upgraded it to 8.0 without any problem.

It’s only my personal opinion, not an official statement from the dev team, but I believe that many of the existing sites on Yii 1.1 will stay healthy for the next 5 years or so with the latest versions of PHP as long as you don’t want a large scale enhancement to the sites.

1 Like

Stiking to Yii 1.x eventually will be your project’s demise.
Eventually at some point its suport will stop or new PHP release will make it impossible to run Yii 1.x.

In order to prepare your project for framework migration, you should make adjusments towards “framework agnostic” approach, extracting standalone classes and flows.

Also you should consider to utilize PSR standards and PSR-compatible libraries.

You can find several useful packages here:

In particular: