Knowledge base for Yii 1 to 3 migration

Hi!

We have a bigger web app in Yii 1.1, and need to migrate it to Yii 3 when it’s stable enough. Would it make sense to create a knowledge base or page about this info, similar to the one for Yii 1 to 2? It could list “shortest path”, maybe including some helping wrappers, as well as a more fundamental “proper” rewrite.

Yes but, to be honest, I’m not sure what to write there yet. We have such page for Yii 2 (still not complete): docs/upgrade-from-v2.md at master · yiisoft/docs · GitHub

At the top of my head, maybe

  • How to convert a controller from Yii 1.1 to Yii 3
  • What’s needed to port ActiveRecord classes from 1 to 3
  • What changed in the rendering engine/view files
  • What changed in the configuration files

Would it make more sense to make use of the migrating 1.1 to 2.0 article and complement that with a 2.0 to 3.0 article? Or would such a migration path cause too much redundant work?

Well, for our case, we will skip Yii 2 entirely and go directly to Yii 3 (with or without helping wrapper classes to make the transition smooth or step-by-step).

I understand that’s the way you want to do it. I’m just saying that from a guide perspective if most of the 1.1 → 2.0 things has to be done anyway it might make more sense to just make a guide for 2.0 → 3.0 instead of a guide that has a lot of redundancy by covering 1.1 → 3.0 directly.

If that’s the case, yes.

Good list.

1 Like

Seems like I can’t create a new topic in the Yii 3 forum…?

Anyway. Would it be possible to use the Yii 3 ActiveRecord module inside Yii 1.1? Since the former is namespaced. Could be a first step for a migration, while keeping the system running.

I know, it’s a properly a huge challenge but are there plans to build a converting tool, which make it possible to convert a existing yii2 application into a yii3? I would start to build this, but I have not enough experience in programming

No, there is no such plan.