General plan about Yii2

— Minimum PHP version required: 5.3

— Backwards compatibility: no

— 5.3 features that will be used heavily: namespaces, anonymous functions

— Version control: Git (most probably GitHub)

+1 for git.

+1 for php 5.3

Namespaces is a powerful thing, but I hope it won’t make additional difficulties when accessing classes. I prefer to write less code, e.g. simply CHtml instead of long Yii\Helpers\CHtml. I don’t use namespaces in any of my projects and feel fine. But I believe Yii developers will make things easier and not more complicated :)

Namespaces will only make things easier as it gives end-users more freedom, which can only be a good thing.

I believe that PHP allow you to ‘use’ / ‘import’ a namespace ?

If so, it would be just as easy as it is now.

The benefit is that it won’t clash if we use classes from other libraries or our own code prefixed with ‘C’.

Anonymous functions sounds exciting. Can’t wait to see what you come up with. :)

Good choices!

Agree with anonymous function. Somewhat, I don’t like using “PHP expression” in CDataColumn::value.

I prefer something like below, or if you have better one :P

'columns' => array(


      'value' => function($data){

                    return strtoupper($data->attribute);





Actually it works in current Yii 1.1 ;)

oh my…

it actually works… my bad :(

Closures. Rawk :slight_smile:

How about 5.4 instead of 5.3? traits are good … and looks like the scalar type hinting is back again

Good choices. I can’t wait to see what Yii2 brings. :)

Why not Mercurial on Google Code?

Because Git and Github is the l33t webdev way - apparently. ;)

Personally, I use NetBeans, Mercurial, Google.code / Bitbucket for everything. ;D


But that’s probably due to me not only being a php programmer, but also a C++ coder.

Web development these days is still all about Git/Github.


I think it all boils down to what Samdark and the rest of the Yii team really wants to use.

It would be refreshing to see Yii go Mercurial/Bitbucket - but Git/Github is the expected (conservative?) move for a PHP framework. And that’s great. :)

In my opinion, on the Windows platform, Mercurial is easier to setup than Git. Just install TortoiseHG. TortoiseGIT is trickier and it requires things like msysgit. Moreover, I don’t see any reason to use Git over Mercurial. Mercurial is just as powerful, easier to setup and easier to use.

The main reasons are GitHub infrastructure and community. btw., you can use Mercurial to work with Git repos if you prefer it.

Personally, I really prefer the Bitbucket community:

And the features. :)

(And since it was bought by Atlassian, it has some strong backing)

Well, as I’ve said: it matters what you - the Yii team - likes.

  1. There are less than 1000 PHP-related repositories at BitBucket while at GitHub there are more than 15000 of these.

  2. BitBucket community largest PHP projects were all CodeIgniter-related. And CodeIgniter recently moved to GitHub.

  3. Majority of PHP frameworks are hosted at GitHub: CodeIgiter, Symfony2, Zend Framework 2, CakePHP, Kohana so it will be easier to migrate to Yii from any of these.

Personally, I think that git and GitHub are excellent selections.

I think that selecting DCVS just because more projects are hosted on it is wrong. Select what suits you more, not what is popular.

Popularity can be a valuable metric when you consider that there are solid functionality related reasons that so many people choose to use certain systems over others. There’s definite value in enabling people to work within systems that they’re already accustomed to, all else being equal.