CodeIgniter 1.7.0 - A Step in the Right Direction
It’s been quite some time since CodeIgniter has seen a major update, and this week we’ve finally got one! I actually got the news via twitter, which shows just how much of a mainstream communication platform it’s becoming!
CodeIgniter 1.7.0 has plenty of new features and bug fixes, but I’m not going to list them all. You can check out the changelog to see them all.
But I would like to point out some of the more interesting updates.
First of all, there’s a new form validation class (finally!) as long as a year ago I’ve been wanting to see a fresh validation class, and this one is much much better.
It’s far less complicated, take, for example, setting validation rules.
$this->form_validation->set_rules('username', 'Username', 'required');
One line of code sets the post name, the display name, and the rules for the field. Much better than having to declare them individually.
Form validations rules can also be saved in config files, removing them from the controller code, and making them much more flexible. They are auto-loaded too.
This, is one of the best improvements CodeIgniter has seen for a long time, and I’m looking forward to getting my hands dirty and really pushing the limits of this one.
The session class has also had a little modification:
Updated the Sessions class so that any custom data being saved gets stored to a database rather than the session cookie (assuming you are using a database to store session data), permitting much more data to be saved.
So when you’re using code like:
$this->session->set_userdata($my_basket);
The ‘custom’ data is saved in the database, which means you can use more than the standard 4KB which cookies allow. Lovely
Another nice little addition is the PHP Style Guide, which gives developers a nice set of coding standards which PHP adheres to. So, now you know exactly how to write you code so it feels right at home with CI’s native code.
I’m really happy with this update, and I’m looking forward to using it more.
What’s your favourite new/updated/fixed feature?


















October 25th, 2008 at 6:46 pm
It’s great to see that CodeIgniter is progressing - however slowely. After a period of stagnation an update is just what we need.
What I’m concerned about is that EllisLabs will focus on smaller bug fixes rather then push forward development of EE2 and the CodeIgniter release it will be based on.
October 26th, 2008 at 12:36 am
I love the new release, and like yourself, first saw it via Twitter. I’ve already started to get my hands dirty. Only thing bugging me is that you can’t set primary keys with the Forge without throwing some nasty errors and SQL errors. Hopefully EL will patch stuff up and keep moving toward EE 2 and the version of CI that’s built off of.
October 27th, 2008 at 9:37 pm
Thanks for the update Elliot … hope this means EE 2.0 will be out soon!
Your new blog design rocks, btw!
October 30th, 2008 at 2:36 pm
I think, that is a good step. I like new version so much. Thanks Elliot for great news
November 5th, 2008 at 3:38 am
Great step. Thanks for sharing that with us.
November 19th, 2008 at 1:49 am
I am with Jamie Rumbelow. I hope EllisLabs focuses on the bugs first. With the new release, I believe my app was hit by a bug in session class which forced me to create an authentication library using $_SESSION rather than CI sessions.
November 19th, 2008 at 10:52 pm
With all of these features, there are some vital lacks in codeigniter:
1)framework standard Authentication system
2)you can not define modules without hacking the core
November 24th, 2008 at 11:49 pm
@Ghassem,
You can easily ad modules and helpers and plugins to application folder without the need to hack core.
Also you can add functionalityies to core classes by extending them, just in your application folder.
November 25th, 2008 at 3:29 am
One major problem is they have broken the AR class as far as I can tell, there has been a lot of talk in #codeigniter about all the errors the AR class is throwing up now.
November 30th, 2008 at 12:29 am
I haven’t ’seen’ any problems on my site when I upgraded to 1.7.0 from 1.6.3.
Maybe I should get in #codeigniter some of these days.
November 30th, 2008 at 12:29 am
Btw, that was a response to Joshua with regards to AR.