General Sense of Abandonment with Yii2 Support

I started this post within this thread about needing help with ActiveDataProvider, and realized it was distracting and that it needs its own post.

I write this after having waited (admittedly impatiently) for years for Yii2 to be released. I had a really bad feeling with that inevitable re-write (from Yii 1), which I felt threatened future reliability of any version of Yii. I mean lets face it, even if everything was perfect about Yii2’s launch and support, if a potential Yii3 was a complete rewrite, customers would be pretty much insane to continue adopting Yii in any fashion.

Ive also changed my views, perhaps at a "political" level, about open source software in general over the years. At the time, I diddnt think much of the fact that Yii2 was going to be a rewrite. Now, Im at a point where I will never trust any vendor that does complete rewrites, and think that Yii2 will be the last open source framework I adopt where the vendor does such a thing.

Im finding it very difficult to be convinced that there is, or ever will be, genuine support for Yii2. The Yii2 Guide is very pretty, easy to navigate, and does have a few helpful pointers here and there. In general, it doesnt reveal a whole lot more than the source code itself reveals (especially when browsed with a feature rich, modern IDE). The forums feel like tumbleweeds at times, and they feel like a large pile of noise to filter though at others.

I seriously dont mean for this to be a pointless rant; Id really like to be shown where the decryption occurs! Where can Yii2 be demystified (without having to purchase learning materials)? Where are these completed guides? Where are the examples of how to use Yii2 idiomatically? Where are some real, elaborate, well documented use cases of its most fundamental features? Everything Ive seen so far (example-wise) is honestly a fluffed up statement of the obvious, and I spend entirely too much valuable development time trying to figure out the proper idiom for doing something I can do in 2 seconds outside of Yii2’s idioms. This was released in Oct 2014, and while Ive been using it since June 2014, its basically March 2015 and Im still clueless as to how to use most of the framework properly. Sure, I can get anything done in a hacky way, even in a modularized, extensible way, but Im usually inventing my own standard idiom and forgoing the framework’s features. I just dont know how to use them!

Is the project mismanaged? Did some critical personnel quit all of the sudden? I kind of feel like Yii2 has been abandoned before it even took off. I think ill give it another month or so, and then Im afraid Im going to have to abandon Yii2 altogether if I find myself spending 4 hours figuring out how to perform a simple query that I could write in SQL in about 2 seconds.

I dont mean to insult or to offend, I know what it takes to complete a project like this, and Yii2 did (and still does) appear tantalizingly awesome. I love the package control, I love the higher level features of the framework, and as a long time Yii 1.x user, I am very biased in Yii’s favor. The team did an immense amount of work getting the software to this level, and I really believe that there is only one barrier to me writing awesome applications with it - I dont know how to use it!

Does anyone share in my frustration? Can anyone help me with a great source that I can quickly use to figure out how to best follow the framework’s idioms? I really dont wanna give up, but time, pressure, and ultimately money, might drive me to a better supported framework.

  1. What do you mean by "framework idioms"?

  2. Do you want commercial support provided by core developers?

6 years is quite reasonable life cycle for Yii 1, isn’t it? It isn’t like Laravel annual releases after all. There are numerous Yii 2 projects on github which can be helpful for learning, and there are at least one fine book on Yii 2. Yii 2 isn’t that different, you can successfully learn most ‘idioms’ from Yii 1.

Well, in short, "the Yii2 way". Basically following the conventions that you intend. For example, if I wanted all of the relational records B for model A, I would define the hasMany() relation in class A, and simply call $modelA->getBs(). If instead, I decided to not define the relation in class A, and instead just write a raw sql query to select relational records, then iteratively looped through the records to find particular data I want, I would be breaking convention. I would call that a non idiomatic approach (amongst other appropriate labels).

And any time I mention "idiom" in this case, I mean code-idioms as they pertain to Yii2. The Wikipedia definition of programming idioms suffices.

So basically, what Im trying to do is learn Yii2 without breaking convention. I set out last summer to learn Yii2 according to its conventions/idioms, and in a lot of ways Ive got it figured out. There are still some lingering areas where the guide hasnt been completed, and Im clueless as to the proper convention or idiom. Thus I can write DRY, testable, extensible code for my app, but I have no idea if Im breaking conventions particular to Yii2, and thus Im wondering if I am wasting my time trying to learn this.

Believe me, I really, really, really want to, and thats why 5 months after the first RC version of Yii2, Im still hanging on, though I feel its a huge time suck to figure out what should be really elementary.

(Assuming "commercial support" = paid)

No? Id like the guides to guide me (Im not trying to be cocky, I have a lot of respect for you samdark!).

For example, If I dont know the English word "existential" and I look up a definition in some English dictionary, and the definition reads, "pertaining to existentialism", Im just as lost as when I started. So then I try to look up "existentialism" and the definition says, "pertaining to existing", and Im still just as lost, so I look up "existing" and then I see "TBD". The Yii2 Definitive Guide feels like that. It kind of states the obvious and in the cases where examples are shown, there often not very contextual, and often dont cover the case I need (which usually isnt complex or advanced, just also not the most base example either).

Ultimately, just about everything Ive learned about Yii2 resulted from reading through a guide, feeling like Im not finding an answer to my question, then plowing through source code for a few hours. That has basically turned Yii2 away from being my framework of choice for new projects, to some hobby that someday I might actually figure out how to use.

For the record, Id never pay a vendor to explain to me the basics of using their open source framework (in case youre polling for a general opinion on this). If that were my only option, Id find a new open source framework.

YEs, you can successfully learn most of them from Yii1, and my knowledge of Yii1 is how Ive found a lot of success with Yii2. However, you cant learn all, and Ive spent entire working days trying to figure out a proper idiom to no avail when I could just break conventions and come up with my own solution in a few minutes.

What Im discussing is essentially the "INNER JOIN" of lack of complete guides and knowledge gaps for Yii conventions.

I suppose its my fault for being so attached to the "right way" that I devalue my own development time.

Given the two responses to my post, I have to reassert this question: doesnt anyone find it odd that a few critical sections of the Yii2 Definitive Guide have been "TBD" or "This section is under development" for 5-6 months after release?

Can anyone blame me for feeling very uncertain about basing a new client’s project on a framework with a guide thats “TBD” ?

Sure, as all of us. It isn’t really different in any other framework I’ve dealt with. Btw, the guide is being improved constantly.

I do share your frustration and my sentiments are the same. I have found things that made yii 1.1 very easy and flexible not available in yii 2 for example the usage of unlimited get parameters within the context of enabled pretty urls (<pattern>/*).

There are also other urlmanagement issues I have come across and i honestly refuse to state rules for each pattern.



[size="2"]This is an incredibly accurate description of what is wrong with most technical writing. I understand your frustration and I feel it too. But I would keep some things in mind:[/size]

[size=“2”]1. The core team is probably consumed by supporting the launch with bug fixes, etc. and that is slowing down progress on docs. Obviously the core team can correct me if I’m wrong about this assumption. Yii 2 is still relatively new and it’s probably best to manage expectations around that.[/size]

[size=“2”]2. PHP itself evolved, making a complete rewrite necessary. In my opinion, they not only modernized the code base, but took the framework to a new level. Like you, I don’t understand how I’m supposed to do everything, I’m still learning. But when I do understand something, what I see is just awesome. [/size]

[size=“2”]Personally, I feel it’s the best framework out there, even with the slow progress on docs. At the moment, I’m doing a deep comparison to its chief rival, which has decent documentaion, an amazing level of paid video support, but as a framework still seems to me to be far inferior to Yii 2. That is a subjective opinion and is subject to change, but that’s what my analysis is currently telling me. I don’t like to be negative about other people’s hard work, and this is not the focus of this thread, so I will leave it at that.[/size]

[size=“2”]3. I’ve always assumed that at the enterprise level, complex queries would require raw sql because you will probably have to coax performance from the DB in the way you write the query and you can’t rely on Yii 2 for that. So I’m not sure that your 2 mintue workaround is necessarily a bad thing, it’s probably necessary in certain cases. My assumption could of course be wrong, but in the past that is what I have witnessed. I say witness because although I was involved in the projects, I did not write the actual queries, so I cannot give you an actual example.[/size]

[size=“2”]4. Maybe we can take all this frustration and turn it into something constructive. Let’s make suggestions on how things can be improved.[/size]

[size=“2”]I quoted you at the top of my post and I think you made a great point. I find some of the docs incredibly clear and others not so much. I always assume it’s because I’m not a good enough programmer to understand everything, which may be true. But I also find that when specific and clear examples are given, I do much better. [/size]

[size=“2”]At the same time, I understand the challenge that advanced programmers face when they write the docs because obviously everything is crystal clear to them without explanation. So it must be hard for them to know when clarity breaks down for those of us who can’t pick it all up instantly. The more succesful they are at bridging that gap, the more accessible the framework will be to all levels of programmers, and this will greatly impact the rate of adoption. [/size]

[size=“2”]So how can we improve the clarity of the docs, assuming the core team is interested in doing so, and I think they probably are. Personally, I’m going to make 2 general suggestions.[/size]

[size="2"]1. Documentation is most clear when it address what, how, and why. The what and how are easy to document. The why is often overlooked and is one of the most important components of understanding code. I felt like a universe opened up to me when I understood why the widget method of the base widget class took an empty array into its signature as a default. That was a great day for me [/size]

[size="2"]2. The other suggestion I had was using a data structure that tied the guide topics to user contributed content. Currently as it sits, if you look in the guide for information about eager-loaded relationships for example, it has no inline navigation to related tutorials or related extensions. I think that by linking to related content, users could search the guide, then follow up with articles, tutorials, and extensions.[/size]

[size="2"]Even though I think that is possibly the worst guide I have ever seen, the one thing they do is allow user contributed examples, which are sometimes helpful. [/size]

[size=“2”]Perhaps the new Yii 2 site could incorporate that with some kind of approval system, so the topics don’t get spammed up with disinformation.[/size]

[size="2"]There are a number of advanced programmers who take the time to contribute to the forum and I would love to see some of their implementations and examples.[/size]

[size="2"]Ok, so those are just some suggestions, I hope they are helpful. [/size]

In conclusion to my ridiculously long post, let’s keep perspective on the fact that building a framework like Yii 2 is an enourmous project and we should respect the work of those involved. I think your frustration is valid, but at the same time, I’m happy with the work the team has done and the product they have made available to us. The docs will follow in time. They will grow and evolve and all will be well.


  1. We don’t really want to impose limitations. Query builder is much better than 1.1 but still there are valid cases for SQL. You can use it if it’s appropriate in your case i.e. when SQL is more performant, too complex, uses DB-specific stuff a lot etc.

  2. There are about 6 TBDs left and we’re fixing it as we have time. We’ve covered the rest and yes, there were many and it was bad. If guide lacks an example, ask us and we’ll add it if it’s common enough.

  3. I’ve mentioned commercial support because it wasn’t clear what “better supported framework” means to you. Of course, teaching OpenSource framework basics charging for it is total nonsense.

  4. I guess we’re missing something about 2.0 docs if comparing with 1.1 docs. It seems 1.1 was much better to you in terms of idioms. Would you please name this difference?

Just to share my sensation…

Contrary to you I would avoid framework which do not refactor, rewrite and change in order to adapt to new language feature, new technology and cover new need that ariase from the web evolution.

PHP itself was born as a kind of framework, a series of cgi script to help programmers.

If frameworks do not evolve, now we are going to use still function based framework without mvc support, just to give the idea.

YII2 documentation still lack of advanced usage example and you must go a bit by yourself (I never needed to look at the code), but usually the forum is a good place to find support. Sometime answer come quickly some other take a day or two, in rare cases no one has an answer.

I think the forum time by time will be faster to answer as more people faces and solve different situation.

I think some solution and usage example should be taken from the forum, a bit revised and included in the documentation.

The wiki as it is now is a mess, much better search on google.

The extension repository mix yii1 and yii2 extensions so any search is difficult, in fact I never use it for yii2.

I experienced frustration for one reason or another on every framework I tried, periodically I look around and try something new when I’ve time.

For instance when I tried symfony2 I took a look the doc (many says that is well documented and explained) and the got in to the tutorials

Well I got frustrated because in every section they took you by hand in doing something showing to you ho to do a task but at the end they say you "But this is not the correct way, you must do in this other way". So I lost a lot of time in doing the wrong way.

Another thing is the huge flexibility in the usage they give you, people find this a big advantage.

I think in a programming team is a problem, this leave too many room in doing something (which are all the correct way according to the framework) so in the end 5 developer 5 different way to use the framework which are all correct…

You risk to learn to use a framework in a way and then when you change company you must adapt to another way to use it.

Now if you give this post to other programmer you will see that some agree, some other completely disagree, and other stuck in the middle.

Every framework has good point and bad point and in many cases is matter of opinion, you must chose the one you think better fit for you and your needs.

For me the choice is still yii

Knowing "Yii way" is result of years of experience, etc. This is way of thinking. This distinguishes juniors from ninjas. You want too much from Guide.

Ok, fine. Maybe you know ANY framework with better Guide? Lets look at Laravel for example. Primitive Guide with horrible facades examples. It contains 10% of fw features if compare with Yii1/Yii2 guide. But there is some funny part. Want to know more? Pay money and go to So i highly interested where you go when "turned Yii2 away".

I worry a little about the future of this framework but only because Yii2 requires a higher level of understanding to get started in vs. 1.1. I can’t really articulate why, but i think it has a lot to do with language features… you need to wrap your head around traits, namespaces, short array syntax, etc.

I feel very comfortable with 1.1 at this point and marginally so with 2.0. Much of what I’ve learned in 2.0 is essentially ‘converting’ my knowledge base from 1.1 to version 2.0, overwriting that where changes were made. I banged my head against the wall briefly with form events, until I realized that they were moved outside of the form definition and into js events. There is much collective knowledge that has to be relearned.

At first, I hated using composer. One more PITA thing to deal with and master. Now, I love using it to pull in 3rd party code with ease and try some new things in 2 minutes that it would formerly take 30 minutes to accomplish.

I think Yii’s docs are an excellent starting point and getting better with time.

I know Sam has a github documentation project cookbook going - would this be a place to capture some of those ‘best practice’ ideas?

PHP 5.4 definitely has more concepts than 5.2 had but we can’t really do anything about it. And yes, 2.0 has very significant architecture changes so sometimes 1.1 ideas could not be applied at all.

Cookbook project is a good place to accumulate best practices. I’m currently kinda busy with other things but everyone is free to participate. I promise to edit contributed content till it becomes perfect… or at least very close.

I noticed that is registered… maybe someone is already on to something…

I bet someone experienced with yii and making videos could do rather well offering paid tutorials at the right price.

Probably. I can say that it’s not mine.

We’ve put together though.

Thanks for the responses, I suppose Im a bit naive, though honestly, just pointing out the obvious to me is reassuring. As for someone’s “ninja” reference above - I suppose I fear training myself into patterns of ineffective and unconventional techniques.

Thanks for the link to When I google search for Yii2 concepts, I constantly sift through tons of "facade" blog posts where someone with very poor communication skills basically copies examples out of the guide and discusses them as though the reader is encountering something new. Lots of noise, and its time consuming. Im sure there are some "yii2casts" like sites out there, I just havent found any yet.

I guess this is my invitation to make one, right?

Thanks again, and I am sincerely glad to hear that the guides will be worked on soon.


If you have any places in the guide that are unclear, confusing or need more examples, please report to

Thanks - im getting the sense that the forums arent frequented by the Yii authors and contributors. Should I stop posting most of my questions here, and instead find relevant source files on your github and ask you there?

Nope :) There are forums, IRC channel and many other places where you could ask questions. GitHub is for code issues and feature requests only.