Kohana 3.0.7 is here!

Earlier today, I was informed via Twitter that Kohana 3.0.7 had been released.

“Great,” I thought. “Time to figure out what’s broken.”

See, one of the strengths of Kohana is that the maintainers are totally willing to break backwards compatibility in order to refactor something a better way. However, one of the weaknesses of Kohana is that the maintainers sneak in and break shit when they update.

It’s entirely the same thing, depending on how you look at it. Thankfully, the devs rarely change anything sufficiently large enough to warrant more than a couple hours of bringing things up-to-code, and when I’m done that task, I generally end up with happier, nicer-looking code as a result. So I can’t be too upset.

To boot, there’s usually some sweet ups along the way. New functionality, enhanced functionality, broken stuff fixed, that kind of thing. And while only a point-release, there’s some stuff in here this time that you very well may want to have.

Two Whole New Modules!

  • The OAuth module lets you do neat things like integrate with Twitter without writing a lot of cruft code.
  • The UnitTest module integrates PHPUnit directly into Kohana! This is so cool! I played around a few times before with trying to do this myself before giving up on it in favour of writing actual domain code. Now that someone more dedicated than myself has actually integrated it, who knows? I might even start writing test cases.

Better XSS Protection!

In all kinds of little places, characters are being escaped where they weren’t before, meaning that the XSS vulnerabilities that are in your project don’t creep in at the framework level.

A Whole Bunch Of little Fixes!

There seems to be generally better code documentation all over the place (example: the database config file), and a lot more flexibility opened up (example: final constructors removed all over the joint, the UTF8 file is now extensible). As well, there’s a bunch of little bugs fixed everywhere, meaning that all those little edge cases I haven’t run up against? I never will.

So What Broke?


Seriously, it just worked. I copied 3.0.7’s system directly over 3.0.6’s. Ditto for the auth and database modules. This is perhaps one of the worst ways you can do an upgrade because so many things can go wrong, but nothing did. I’m seriously impressed.

So there’s a couple of neat new things to play around with, a whole host of sweet little fixes – looks like a very solid update.

Kudos to the Kohana team!

Rage-quit support for fish shell
Gulp.js – an AMAZING build system!
Code faster with simple Sublime Text improvements
  • Dan Robertson

    Dan RobertsonDan Robertson


    This is perhaps one of the worst ways you can do an upgrade because so many things can go wrong
    This is true. I recommend renaming your old system directory. Alternatively, you could use directories with version numbers, e.g. system-3.0.6 & system-3.0.7, and change the one you point to in your index.php file.

  • Dan Hulton

    Dan HultonDan Hulton


    Indeed, I was really just looking for a worst-case “naive-upgrade” situation and seeing what would break.

    Immediately after, I replaced that system those module folders entirely. The whole thing is in SVN, so I have change history semi-preserved.

    At work, we even go one step better: All versions of Kohana and all the modules we use are in their own separate SVN repositories, and we just use SVN externals for the system folder and for each module folder. When Kohana upgrades, we just update the main Kohana repository and change our externals.

  • Jeremy Lindblom

    Well, they did do a lot of unit testing throughout the framework (via the new module), so that might explain why it turned out a pretty good release. They’ve been working hard recently, and since Zombor has been helping out with Ko3 now, things have been moving along quite nicely.

  • Jeremy Bush

    Jeremy BushJeremy Bush


    Part of the reason “no shit broke” is that we now enforce and use unit tests on as much code as we can. They were introduced to fix “shit broke” upgrades (among other things) ;)

  • Dan Hulton

    Dan HultonDan Hulton


    Honestly, I never noticed any new bugs creeping in. When I say things broke, I was referring to interfaces actually changing. I don’t remember quite what it was, but when I upgraded from 3.0.5, a couple things started being done differently between the two, so I had to go back and change a couple things.

  • cacovsky



    I like to do my upgrades using a software like Kompare or Meld. I want to see what changed so, if any shit is broken, I can guess where it is.

  • Dan Hulton

    Dan HultonDan Hulton


    This was kind of another reason I just copied directly over my other code at first – I use SmartSVN as my Subversion client, so it’s easy to get a list of all files that have changed, and you can one-click diff each file.