Anyone who’s followed the progress (or lack thereof) with the Kohana framework probably wasn’t surprised by yesterday’s announcement of its End of Life. As someone who was a loud proponent of Kohana (see my GitHub if you don’t believe me), I wanted to put down some reflections on the passing of my “weapon of choice” framework.
Kohana is the reason I’m a good developer today, I have absolutely no doubt about that. I did some of my very best work using this framework, and it remains the only one that really felt aligned to how I wanted to build things.
It taught me important lessons. It taught that writing PHPDoc comments will always be a good thing by rewarding those that did with dynamically generated API docs for my classes as well as it’s own; see userguide module. It taught me that PHPs autoloader (long considered a weakness of the language) could be turned into something innovative and insanely powerful (see cascading file system). It taught me that speed and real world uses trump over-abstraction every time. It taught me to write full APIs; getter and setters on everything, array or single values for setters etc, and that trying to force developers to use your class “your way” is counterproductive. Kohana’s use of single functions to do get and set (pass a value = set, no values passed = get) still feels insanely clean to me, and I wish more people would use it as it makes APIs vastly more “fluent”.
But I’ll tell the other side too. Unit testing was never a pleasant experience, with new versions of phpunit often breaking your tests for weeks until the core team fixed it. And Kohana’s use of statics is seen by some as a weakness. Personally I always felt there were very few cases where statics are used without merit, but that’s just my opinion. Also it’s lack of documentation for newbies (step by step user guides, cookbooks et al) was a running joke amongst its users.
The attitude of the core development team needs to be called out too. Whilst the project was at its height, the strong and focussed leadership, with a clearly defined roadmap and vision was a godsent. When the team abandoned it almost overnight, that exclusionary attitude to development became a millstone, with those wanting to contribute (myself included) having no idea where to begin, or even knowing if such contributions would be welcomed.
All that being as it is, I always felt this was a framework for “real PHP engineers”. It embraced what made PHP strong (fast, auto loader etc) rather than trying to force it into a Java-esque soup of subclasses, or an amateurish mess of PHP3 and magic.
Judging a framework by its docs (as so many did with Kohana) is simply the worst way of evaluating a framework. And yet we still see people do it today, with “prettiest website and baby’s first steps guides” often winning over genuine exploration of a projects philosophy and architecture to see if it’s the right tool for the job.
But I digress.
There’s one more reason why I think the passing of Kohana is particularly significant. In my opinion, the cascading auto loader will never happen again. Now we live in a world of PSR-0 and the FIG, frameworks that pursue different avenues of core behaviours are either shunned directly by the bleating masses (“lol y u no PSR n00b?”) or indirectly by not being compatible with Composer, therefore effectively dead in the eyes of the community. It worries me that we’re moving away from a blank canvas (albeit wild west) and into a very tunnelled world.
Consider that three of the most popular frameworks are based on the Symfony HTTP Kernel (Silex, Laravel and Symfony itself). All require PSR-0 and all require composer. Fine, that’s absolutely their choice, and I’m not suggesting that being based on the Kernel is a bad thing, far from it. I just want us as a community to make sure there is room for innovation outside of this set menu. Judging by the downright poisonous attitude that is displayed towards other component libs (Aura for instance), I do worry about the future of the PHP space.
But I won’t go into more of that here. This is a tribute to Kohana. I’m sure it’ll live on as Ohanzee in some guise, but the framework I have known and loved has reached the clearing at the end of the path.
I, for one, will miss it. So long old friend.