Yii Framework 2.0

Hi there,

Just noticed an old post, where the creator of Yii says: We may consider rewriting Yii 2.0 on top of PHP 5.3, but this won’t happen in the near future.

But on Yii download page, one can read: Yii 2.0 is going to be a complete rewrite of the framework on top of PHP 5.3.0+. Yii 2.0 will not be compatible with previous versions.

And I must admit that this scares me a bit more than I excepted. I know that December 2011 is over a year ahead and maybe Yii 2.0 release will be delayed. But even so… How to interpret these words? Does it mean that with official release of Yii 2.0 I will have two options: stay on unsupported version of Yii or completely rewrite my whole webapps from scratch?

What is so bad and ugly in PHP 5.2 and in Yii that a complete rewrite with no backward compatibility is required?

If you unit test your code and you get the idea of how the current stable version works, migration should be easy.

PHP 5.3 is not a minor version upgrade, it is a major release in many ways.

Namespace support is one of the most exciting features, but it has more:

What’s new in PHP5.3

I would not be scared.

When Yii2.0 will be ready, we will all learn the new features and will choose wich application port to 2.0 and wich leave to 1.1.

The technologies go forward, and is not always possible to preserve BC.

I have been 100% satisfacted about how Yii moved from 1.0 to 1.1, the upgrade document was perfectly understandable and absolutely complete.

I am faithfully that the new step will be as "soft" as the previous.

Every time that technologies improves there are lot of nostalgetic of old good times, but if you want to work and live in web thechnologies, you should be more projected to the future than complaining the past.

Yes! But sometimes it is not possible to go ahead, especially if you have to rewrite application having millions or even billions of code lines. I know, what I’m talking about because right know I’m working in a company with 25 years of experience and with set of over thirty different applications, still being developed in technology having TEN years. And it will stay like this, because we estimated that rewriting it to a new technology would take one or two years of hard work of half of the dev team (over 100 developers!) and cost amounts of money not reachable by our company.

Oh, I wouldn’t compare five major chapters and ten points in total (summary of 1.0 --> 1.1 migration) to something what Qiang himself calls “complete rewrite of a framework”! If this would mean something similar to 1.1 upgrade, I wouldn’t have worries and would not post this topic!

I agree with that. But still… either words are to strong ("complete rewrite") or I will be looking a bit less optimistic to what Yii 2.0 is about to bring… Even if we still have year or more to that time…

Should be is a keyword, sumwai! :) Cheers!

I don’t see a problem here… for all current applications… you will continue to use Yii 1.1.x… without any problem… if there will be any bug found… we will fix it… but will not develop new functionality for that version…

Not having new functionalities when staying with 1.1 is a problem for me, as you are doing really good work and I would like to be up-to-date not only with bug-fixes but also with new addings. Plus - a complete support for 1.1 branch is planned to be stop about year after final release of 2.0, what - if I’m not mistaken - will also mean stop fixing bugs for it.

Yes, yes - I know - it is over two years from now on (planned for 31 December 2012 so far) and of course - progress is essential and this is something no one can avoid. By this post I was not planning to complain on any plans you have as they are natural and obvious. I rather wanted to open a discussion if right now (over a year before planned release of 2.0 branch) you are already aware of how deep these changes will be? Or maybe this is to early stage of planning to say something for sure?

At this moment, it is still too early to tell the details of our 2.0 plan. We had some scattered discussions about what 2.0 will be be within our developer team. However, they’re mainly about some big features. Since 2.0 will be a complete rewrite, we will take this chance to make our code more consistent and clean.

Although 2.0 will not be compatible with 1.x, we will still try to keep the similar concepts and usage patterns so that existing Yii developers won’t feel an abrupt change. Upgrading from 1.x to 2.0 will probably more difficult than from 1.0 to 1.1, however. In fact, we do not recommend doing such an upgrade for an existing Yii project.

The support deadline for 1.1 is temporarily set as Dec 31, 2012. This is the minimum we promise. Depending on the actual needs, we may extend (not shorten) this deadline to a further date.

Our focus currently is still 1.1, as we are all happily using it. We will bring up 2.0 discussions when we feel the time is coming.

Thanks for your explanations. I think this closes the discussion. Thanks again to all for participation.

To be honest, I would be more afraid if 2.0 WAS 100% compatible with 1.1. One of the reasons I decided to choose Yii was that it seems to be a medium between heavy frameworks and micro frameworks, at worst a good learning experience. It appears to be pretty fast in comparison to others (I’m sure like any statistic, it depends on what specifically you are doing).

Anyway, if 2.0 stayed backwards compatible, that would pretty much guarantee the inclusion of an abundant amount of extra code (overhead) to accomplish this. Personally, its great to have an easy transition, but I’d rather jump through hoops in a transition than have a web application that could be running with half the overhead. (obviously just theoretical numbers here, but I’m sure you can get the point).

Of course I agree with you. But looking on what was already said in this topic I would be far from using "jumping through hoops in a transition". If, after taking part in this discussion, I imagine changes between 2.0 and 1.1 correctly there will be no hoops in transition. You will have to throw your whole 1.1 code to trash and start writing your app in 2.0 from scratch.

Progress is unavoidable and even more - it is required. But sometimes price to be paid for it might be to high. I was close to this when in Delphi we were migrating from FastReport 2 to FastReport 3, which also was a complete rewrite from scratch leaving absolutely no classes from previous version. After endless, and most of the time pointless discussion we had to face the truth that we can delete whole sources and rewrite FastReport related part of our app from scratch. The only difference is that here we are talking about rewriting whole application not one of its modules.

But then again, even if price is very high, progress is truly unavoidable…

That’s exactly what a Major update is all about: big changes.

It’s going from Yii 1.x to Yii 2.x - that’s a big step.

Otherwise it would have been Yii 1.2, right?

I hope we will have enough time to stay with Yii 1.x for our existing projects, and then start using Yii 2.x for our new projects.

There is really no hoop jumping in that.

Well, if you want to jump, go ahead: jump. :lol:

Have you got projects that can stay as they are after finishing development stage? No support? Most of my project are living from day to day, and of course - if Yii 2.0 will be finally released I start writing new projects in it. But still wondering about all old projects.

But then again - it still at least over a year to think it over! :)

Yii Team Should be responsible to take care of older versions. As every new release should be compatible with older version and donot expire like that or Yii going to be worst framework for Yii 2.0 Version. We hope Qiang and Yii Dev team will take care to migrate users from Yii 1.1.x to Yii 2.0.x

Dude: A major version does not have to be compatible with previous versions.

Hence it’s name: major.

You can expect a smooth ride between minor versions - some work required.

Revisions, on the other hand, should be smooth.

I would be weary of Yii if the next major wasn’t going to be, well … major. :)

Be worry free regarding the support for 1.1. As I said, the current support deadline for 1.1 may be changed to a later date depending on the actual need.

We totally understand the importance of keeping BC (that’s why you see the almost smooth upgrading process within 1.1.x versions).

We ourselves also have live projects running on 1.1 which needs to be continuously maintained. And we will not upgrade these projects from 1.1 to 2.0 when it is ready.

With more popular frameworks like zend and symfony making major changes in their 2.0 version to leverage what the latest stable version of php has to offer, I believe that if Yii does not take this chance to do the same it will be left behind.

As far as I’m concern, Yii is doing exactly what you are writing about. The whole 2.0 rewrite idea is to make Yii able to use latest additions to newest version of PHP - that is 5.3. The only difference is that Yii core team is indeed small and all major changes needs more time. But even so I believe that this guys are doing really, really good work!

What seems to be the problem? If you already think that Yii will stay behind, without even waiting for what 2.0 release may bring, I believe the best idea would be to come back to Zend or Symphony! :)

Many of us followed Qiang from Prado to Yii, that was not a minor change, was really a completely different framework.

I theese crazy days in October 2008 me and my colleague arrived both at the conclusion that change framework just because the main developer wrote another one is a really crazy decision, and was so crazy that we took.

After more than 2 years of work, we realized that follow Qiang in the new adventure was a great decision, we are 100% satisfacted about that.

In my humble opinion, whatever will be Yii 2.0, it will worth to be learnt and to be used.