3

I have a huge project written on a Yii1 framework. Now I have the task to port the whole project to Yii2. I know it's impossible to simply update the code and I have to do a lot of copy-paste-edit job.

But the Yii1 code is pretty proper and standardized, no spaghetti or something, and I wonder if people have some helpful tools to translate models, views and controllers from Yii1 to Yii2. How can I help myself to do it faster and automatize the process?

Nastya Kizza
  • 362
  • 3
  • 13
  • 1
    you just refer this link https://github.com/yiisoft/yii2/blob/master/docs/guide/intro-upgrade-from-v1.md – vishuB Dec 03 '15 at 04:15
  • 1
    And also refer this one http://www.yiiframework.com/doc-2.0/guide-tutorial-yii-integration.html#using-yii-2-with-yii-1 – vishuB Dec 03 '15 at 04:16
  • vishu, I did read these docs, ofc, but none of them refer how do I partially automatize the job. Maybe it's impossible, maybe not, I don't know. But thank you anyway. – Nastya Kizza Dec 05 '15 at 01:12

1 Answers1

3

Yii1 and Yii2 have many things in common, but at the same time they are very different. There are no tools, converters, etc. to automate this process. You have to do it manually.

Please refer to official docs links mentioned in the comments:

So, as an alternative you can try to do partial migration from Yii1 to Yii2.

Even Yii1 project code quality can be pretty high, it's not actively supported as Yii2, and its support will end at the end of 2016 year (as far as I remember).

Yii2 is so much better, so if you have possibility and time, it's better to migrate to Yii2. But if you have no plans to improve your project much (only implement small features, fix bugs, etc.), leaving it on first version seems like normal solution.

arogachev
  • 33,150
  • 7
  • 114
  • 117
  • 1
    Okay, well, so, that's impossible. But thanks anyway. By the way, I think, it's kinda possible to make a parser thing that adds external procedures instead of relations() function, converts validation rules and stuff, so, I thought someone already did it. – Nastya Kizza Dec 05 '15 at 01:14
  • @NastyaKizza There are too many details that needs to be provided and implemented. – arogachev Dec 05 '15 at 06:07