Any more info on Yii 2.2?

Hi!

As a quick introduction, I’m part of a team of programmers who support a large organization with internal applications to cover departmental needs, ranging from simple data management to integrating databases and interfaces to large 3rd party apps. A lot of this was originally done in a huge monolithic Yii 1.x app in the mid 2010s, then over the last six years we’ve split up and migrated functional pieces into smaller Yii2 apps using jQuery and Bootstrap 4/5 and Docker for deployment, all while adding dozens of new apps as well. At this point, we have probably well over 150 and maybe close to 200 of these apps. Because of upcoming changes to underlying systems, and with the desire to modernize and normalize the look and feel of all these apps, we’re considering changing our base application again sometime by the end of this year.

We’re considering a lot of options here. Yii3, Laravel, Svelte, Angular, Vue, React, Flowbite, shadcn, everything is on the table including trying to keep our server side for all the apps mostly unchanged Yii2 while tearing out the front end and replacing it with something more modern.

We were particularly disappointed in the state of Yii3 – despite a lot of the promise of it from descriptions we read years ago, it seems to have none of the advantages which drew us to Yii in the first place - the learning curve is as bad, if not worse, as all the other frameworks, it completely abandons the MVC design pattern which served Yii2 so well, it doesn’t have a working Gii (and still no clue when that will actually be usable), and it offers no useful migration path we can see other than “just rewrite your code to the Yii3 design”. (The migration instructions in the guide aren’t much help for this, either – they’re pretty much incomprehensible unless you’re already deeply entrenched in how Yii3 is designed and works…) The general consensus so far on that point is that if we’re going to do that much work to migrate to Yii3, why not migrate to Laravel instead as it’s got a larger, more stable, better documented ecosystem? There’s not much in the Yii3 docs which explain what advantages (if any) it has over other modern PHP frameworks.

The other thing we were really concerned about was the support for Yii2 if we decided to somehow tear out our jQuery/Bootstrap design and retrofit a different front end code/design scheme onto it. The “Release Cycle” page talks about Yii2 reaching EOL around the end of 2027. If that’s the case, we really don’t want to be using it for the new round of application building and have to do this all over again a year later.

Which brings us to Yii 2.2. (Or is it 22?) Which is mentioned in the release cycle page and a few forum and issues posts… but with almost NO detail about it at all, especially concerning as the release cycle page lists an estimate of it being released by the end of 2026, which is fast approaching. What I could find out so far is it’s supposed to offer a migration path from Yii 2, and be at least partially built on Yii 3 packages… but that’s about it.

Can we get at least some kind of Design Goals page for this? Something maybe explaining how much effort it’s going to take to convert a Yii 2 app to 2.2? A progress page like we had for Yii3? You don’t even have a Yii 2.2 category in this forum. Anything we can use to inform our decision on which way to go from here would be helpful.

2 Likes

The frustration regarding Yii3. Bailing on the classic MVC pattern, lacking a working Gii, and offering basically zero practical migration path for legacy apps makes it a really hard sell when Laravel is sitting right there with a massive, stable ecosystem. If you’re going to do a full rewrite, it’s hard to justify sticking with Yii3 over alternatives that have way more momentum.

As for 2.2, you’re definitely not the only one feeling completely in the dark. Staring down an end-of-2026 estimate with virtually zero design goals, progress tracking, or dedicated forum space for it is super concerning, especially when you’re trying to plan a base application overhaul for later this year. Hopefully someone from the core team drops in with an update soon, because flying blind on whether 2.2 is an actual drop-in bridge or just another heavy refactor makes mapping out a 150+ app migration practically impossible right now.

2.2 is very light 2.0 cleanup. Modernizing the codebase, dropping legacy stuff, etc. It is in the making by @terabytesoftw currently. Should see the light by the end of the year. Will be either compatible or almost compatible with 2.0.

It’s availble in a separate branch of yiisoft/yii2 btw.

2 Likes

Just sharing my experience with a far less complex scenario obviously. I just rewrote a yii2 legacy app built with semantic-ui and jQuery using yii2 (2.2) with tabler admin theme and htmx. It looks and feels modern plus I like the modern app-basic template for yii2 (2.2) using vertical slices and the flexibility to organize by domain or modules as you may please. I had considered yii3, but decided against it to speed up my time to go live and preserve and re-use my existing familiarity and knowledge of the framework.

I was very sceptical of Yii3 because it broke backward compatibility. You cannot just throw away the legacy, start from scratch, and hope to attract new users simply by claiming that Yii3 has a better architecture. Nobody cares about architecture for its own sake. A framework is a tool that should deliver productivity, and Yii2 delivered outstanding productivity.

There were actually very few flaws, but some people kept complaining online about Yii2’s architectural decisions. The Yii development team started listening to them without recognising that the loudest voices do not necessarily represent the majority. Everyone else was simply getting their work done and did not have time to argue on the internet.

One of the main criticisms of Yii was its use of the global static Yii object. Meanwhile, Laravel encourages the use of facades, which serve a very similar purpose from a developer’s perspective.

I have already moved to Laravel, and for me, Yii is dead. That is sad, because Yii2 offered great productivity.

1 Like

I’ve been using yii2 and I’m looking forward to yii3, but I can’t use yii3 to enter the project logic. I don’t have a complete set of project solutions, and many of them need to be explored by myself. Maybe yii3’ s discrete scheme is reasonable, but it lacks a set of solutions or documents, which increases the cost of learning and using; Now I use symfony, which has a complete solution. The key is that the complete document can land on the project when I look at it; In a word, the learning cost is very high, so it is necessary to reduce the learning cost if the beginners are discouraged;

I’ve been using yii2 and I’m looking forward to yii3, but I can’t use yii3 to enter the project logic. I don’t have a complete set of project solutions, and many of them need to be explored by myself. Maybe yii3’ s discrete scheme is reasonable, but it lacks a set of solutions or documents, which increases the cost of learning and using; Now I use symfony, which has a complete solution. The key is that the complete document can land on the project when I look at it; In a word, the learning cost is very high, so it is necessary to reduce the learning cost if the beginners are discouraged;

1 Like

@wangzhoubin What information are you missing? Any specific topics? I can add these to the guide.

From my perspective, the biggest omission from the Yii3 docs is Gii. Without a working Gii and docs on using it, Yii3 just isn’t ready for use yet, IMHO. We’ve written probably close to 200 Yii2 apps for our agency over the years… and almost all of them started with Gii.

It could also really benefit from an MVC demo in the Demo Applications section – Yii3 was supposed to be architecture agnostic according to the roadmap but it’s hard to see how a classic MVC pattern works in it and the Guide as currently written appears fairly hostile to using that pattern, by emphasizing a move to behaviors instead of controllers. I’m not entirely against using a different pattern… but having it forced on us makes us less inclined to move to Yii3.

I do notice the Migrating from Yii 2.0 section has had updates in recent months that cover it in more detail, but it’s still currently a massive learning curve just to get started – you pretty much have to have a full working knowledge of how to make a Yii3 application to have the understanding needed to migrate a Yii2 application. A working Gii would do a lot to help with this, but maybe restructuring this into a tutorial of some kind starting with a complete but relatively simple Yii2 app and walking people through it step by step to turn it into a Yii3 app would be much more helpful and ease the learning curve somewhat.

Gii is way less relevant in the AI era when you can do customized CRUDs easily by generating with an agent. The Gii tool itself is ready, but the templates are kind of missing because Yii3 is flexible and apps could be done in many ways.

As for MVC, it’s not moving to behaviors; it’s moving to actions. If you prefer actions in a single controller, that’s easy to do; you just put the actions there and reference it from the router.

Hmmn… so are you suggesting Yii2 users should be using AI to convert all their apps to Yii3? I’d be even less inclined towards using Yii3 if the only usable mechanism for converting our apps was AI. (At that point, why Yii3? Why not Laravel or some other more seasoned framework?)

Yes, AI can be useful for occasional CRUDs… but I’ve found the output to be inconsistent and hard to match to our established standards. Gii produced consistent, predictable output, and was easily customized to match our needs. Even if you assume that everyone out there has access to the AI resources required to port a Yii2 app to Yii3 (and a lot of them do not…), there’s still a good strong use case for Gii. A single precision screwdriver is often much more useful than hauling out the 93 function swiss army knife.

1 Like