Diego
Diego

Reputation: 21

update Yii 1.1 to Yii 2.0

I have an application that was made on Yii 1.1 that is already working. However, I created a new project with Yii 2.0 with new things. I would like to put in this new project the things that have already been implemented in Yii 1.1 to run. I looked at the Yii 2.0 site, which shows how to run both simultaneously, however, I did not understand where I should make the modifications that were quoted in the site example. Can you help me?

Link -> https://www.yiiframework.com/doc/guide/2.0/en/tutorial-yii-integration#using-both-yii2-yii1

Upvotes: 1

Views: 290

Answers (1)

Vikramjeet Singh
Vikramjeet Singh

Reputation: 21

Somehow you can do this through your own efforts. Yii1 is different than Yii2 so you cannot just do this by using some kind of upgrade tool such as in CMS. It will cause conflictions and unnecessary problems into code. So, as per my opinion take a full backup of the project and then you need to install the new setup of yii2. Now, yii2 comes with 2 variants: basic app and advanced app. If you have admin panel you can download yii2 advanced app maybe you know about it. Then the only way you can do is you need to copy and paste your view files into the Yii2 directory and your models and controllers need to be rewritten. Models are having different query styles in Yii2. For fast integration, you can use gii. It will automatically generate CRUD for you in a few seconds. Hope this will help you. Thanks.

Upvotes: 2

Related Questions