K
K
khodos_dmitry2018-12-16 13:28:31
Yii
khodos_dmitry, 2018-12-16 13:28:31

Will it be difficult to migrate a site from yii2 to yii3?

Now I want to make a site on yii2 (I still doubt the choice of a framework). I took a course on this framework.
Recently released yii3. I think it can wait until yii3 stable is released and implement it on it or transfer it later from yii2, if necessary.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Maxim, 2018-12-16
@khodos_dmitry

Yii 3 is in the demo version, but a lot of things have not been done there, the code is constantly changing with the structure. Definitely not worth developing. In the end, the demo version can be very different from the release. It is not worth waiting for the release of yii3. There is no exact date. Only the year is known - 2019.
If you choose the yii2 framework, then implement the project thoughtfully. Porting a project to yii3 will not be difficult, using design patterns and separating the business logic from the rest of the framework, which is responsible for the framework. It is written in detail here: Application architecture. How to make independent modules (services)?
You can also see the progress in the GitHub repositories. What's new in UPGRADE , and see the package structure. Yes, packages, not modules. Itself will no longer be a monolith, it will be assembled by parts.
There are many design changes, but the team will try to keep some familiar things. For example, if you used before Yii::t(), then in yii3 you will need to use $this->app->t()
Replace via IDE for the project is not difficult! However, there are also coordinating solutions related to Active Record. This pattern is more likely to disappear in version 3.0. This is discussed here . Therefore, you should pay attention to the use of third-party packages. In your project, you can change something under Yii3, but third-party extensions may never rewrite the third version at all.
Information about yii3 can be tracked here . A new section has also been created.Russian-language FORUM . Try Yii3 Demo

D
Decadal, 2018-12-16
@Decadal

First you will wait for stable yii3, then php 8, and then the AI ​​will write programs for us. Do what you have now. It is working.

M
Maxim Timofeev, 2019-01-25
@webinar

According to Makarov, there is a lot that will need to be redone, but not as much as when moving from 1st to 2nd. Initially, 3.0 was conceived as 2.1 and was supposed to be backwards compatible. But in the process they drank so much that, with compatibility, they would have to add crutch. Therefore, without breaking sementik, we decided to make versioning 3.0. However, much remains untouched. So the transition will be possible, but obviously not going to be easy.
Here Makarov spoke about php and frameworks, and at the end he spoke about yii2 and yii3 errors:
https://youtu.be/WzLXWI2rD3Y?t=33m26s
It is necessary to decide "wait" or "do on 2.x" proceeding from the project. What will it be? What stack will be used? etc. You probably don't need 3.0 at all. Given that 1.x is still supported and commits are not uncommon, you can expect the same with 2.x. So I would say it's probably not worth sitting around and waiting. And most likely it's not even worth making plans to switch to 3.0. What does the current one not suit you?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question