The New Myth family: SprintPHP Bonfire Practical CodeIgniter 3

New Myth Media Blog

Serving the New Myth Media Family.

Practical CodeIgniter 3 Released

My new book about making the most of CodeIgniter 3 is out!

Posts Filed Under “Releases”

First, I've released another round of bug fixes for Bonfire:

  • 0.7.6 includes CodeIgniter 2.2.3, but allows you to use CI 3.x; this release is intended primarily to support sites built on CI v2.x which are being migrated to CI3.
  • 0.8.2 includes CodeIgniter 3.0, but allows you to use CI 2.x; this release is intended primarily for new sites or those which have already been migrated to CI3.

Other than the default version of CodeIgniter included, there are only a small number of differences between the two versions of Bonfire.

Notes on Bonfire's Branches on GitHub

This may be confusing for some users, but, in order to continue supporting 0.7.x and 0.8.x while developing future versions of Bonfire, I've added some branches in GitHub:

  • Development branches:
    • 0.7-dev - The development branch for 0.7.x
    • 0.8-dev - The development branch for 0.8.x
    • develop - The development branch for v0.9+
  • Release branches:
    • 0.7.6 - The current 0.7.x release
    • master - The current 0.8.x release (0.8.2)

This leads to a couple more announcements...

Bonfire Plans

Minimum PHP Version

As previously requested, a few users have provided feedback regarding the minimum version of PHP used in Bonfire. Given the current feedback, I've moved the develop (v0.9+) branch to a minimum PHP version of 5.4. Moving to 5.5 is currently planned for Summer 2016.

The 0.7.x and 0.8.x branches will remain at a minimum PHP version of 5.3.

Feature Freeze on 0.7.x and 0.8.x

The 0.7-dev and 0.8-dev branches are now bugfix-only branches. While this is not quite as strict as CodeIgniter's status on the 2.x branch (which currently receives only security fixes), there will be no new features or major code changes in the 0.7.x and 0.8.x lines.

Versions 0.7.x and 0.8.x will continue receiving bug fixes until October 31, 2015 (the EOL date for CI2). After that, 0.8.x will continue receiving bug fixes, but 0.7.x will end. If there's no demand for continued support of PHP 5.3, I'll probably close out 0.8.x by the end of the year.


The develop branch (0.9+) will start removing support for CI2 and code deprecated before 0.7.4/0.8.0. I'm also hoping that we can start making it easier to replace Bootstrap v2.x on the admin pages, eventually allowing the bootstrap3 branch to be merged and/or go away.

As usual, I have a lot of plans for Bonfire's future, and I'm happy to see that people continue to try it out and come forward with new bug reports and ideas for new features.

Sprint was just updated to use ZendFramework's escaper for the auto-escaping of data in ThemedController. This now supports different contexts to ramp the XSS protection up to 11.

This IS intended as a replacement for CI's xss_clean function. You should definitely upgrade, read up on the Escaper, and modify your code to ensure your security is kept working well.

Documentation has been updated in the repo to reflect this change.

Thanks to the help of some issue reports on GitHub and a focused effort on testing the Bonfire core with CodeIgniter v3.0, I'm announcing the release of Bonfire v0.7.3. This release drastically improves the functionality of Bonfire when used with CodeIgniter v3.x.

At this point, I believe Bonfire is ready for real-world use with CI3. Since I intend to start testing integration of my own site with CI3 using this release, fixes for any bugs I find or which are reported for this release will go into v0.7.4.

At this time, I intend for the future v0.7.4 release to be the last release which ships with CI2 installed and running by default. While I intend to support using CI2 in the v0.8.x line, it will require some extra steps to get things working, similar to those currently required for CI3.

I'd like to thank everyone for their patience regarding the lack of progress in other areas of Bonfire during this period of transition to CI3.

With the recent release of CodeIgniter v3.0, it was only a matter of time before we could announce the release of Bonfire v0.7.2. While this version includes CI v2.2.1, it also supports v3.0, even on the same installation of Bonfire (though you must modify the $system_path in public/index.php to switch CodeIgniter versions). The documentation includes full details for installing CI3 in Bonfire and configuring your Bonfire application to work with CI3.

Please note that CI3 support is in the early stages. Everything appears to be working fine, but it has not been through extensive testing, yet.

In addition to CI3 support and the v2.2.1 upgrade, we have included:

  • a number of bug fixes
  • more/improved documentation
  • a driver system for the library which converts the docs
  • minor Profiler improvements
  • updated jwerty.js to v0.3.2
  • improved offline mode
  • improved HTTPS support
  • support for using language files from the official CI translations repository

I started coding up Sprint on September 11, 2014, at least that's the date of the first commit. Here we are, just barely over 3 months later, and I thrilled to announce that the project has reached ALPHA state!

I know, it's kinda strange to be excited about an Alpha release, but there it is, still. It's been a lot of work to get here but I'm mostly thrilled with the systems that are in place and feel it's a huge boost in productivity for anyone that might use it.

What's New?

Since the last time that I mentioned Sprint I've managed to get everything on this short list at the bottom in place, and then some. Here's the big updates.


A new Authorization system is in place that allows for very flexible group/permissions and allows users to be in more than one group (finally!). We don't call them roles, since the groups are flexible enough you could create one for a group of beta testers, or a secret place on your blog to organize your kids birthday party. And still manage the admins, moderators, editors, etc.

To make it easy to protect your controllers, I've introduced the AuthTrait that provides convenient methods to restrict current user's access, and can be attached to any controller or library you might need it in.

System Events

An Events system is available that allows you to easily tap into existing events that Sprint publishes, or publish your own. All without modifying any core files.

Cron System

A cron system is in place that allows you to easily schedule actions to happen, whether those actions are in a library or some other fully-namespaced file. You still need to setup a cronjob on your server to hit your application, but then this will take care of the rest. It even has a CLI-based interface for when you're app is acting up and you need to ssh into the server and suspend one or more cronjobs until you get things fixed up.

The Forge

Speaking of the command-line, an all new code generator, the forge is now ready. It's CLI-only in Sprint, but very flexible and simple to use. Takes full advantage of the upgraded CLI tools to ask you for details if you don't remember the right parameters, and will even build out migrations and models from existing database tables. Designed to encourage you to create your own custom collections with generators specific to your workflow or company standards.

Flexible Email System

I couldn't leave well enough alone, and added an email system and queue to project. It works great with the system events, is fully themeable (and ships with a generic theme based on Zurb Ink, and mega-flexible.


A good beginning on UIKits is in place that allows you to create views that will work no matter what front-end CSS framework you're using. This is best used inside of Forge generators or views in packages that you will reuse. Currently ships with UIKits for Bootstrap 3 and Foundation 5. Since I'm looking into use it for Bonfire Next, there's a strong possibility that support for Semantic-UI will show up in the near future.

What's Next?

So what does Alpha mean, anyway? It means that all of the features that I intend on having in the first release are in place, but they may have bugs, documentation errors, etc. Before the Beta release I will be adding additional tests to the system, additional docs, and trying to verify that docs are correct, and possibly streamlining some code or implementing some todos in the code I missed. If you use the project and find changes to the code or docs, pull requests are accepted :) Preferably with tests in place, though I won't be enforcing that at this point.

Oh, yeah, and creating a site for it. Know any designers that want to work for free? :)

Get Started Today

Download it and start exploring. I'm sure you'll find plenty of power for your next project, but if you have any ideas, suggestions or issues, please report them.

P.S. There's Docs Oh - I almost forgot. Once you download it, just visit /docs on your site to view the current docs. They're always included with your downloads.