Development version of CodeIgniter 2.0 is now available in BitBucket (no stable or RC yet!). Last week, I tested all my apps and found out what are changes to be done for your app to work in CI 2.0
New CodeIgiter’s new code
Hooray! At last, CodeIgniter supports PHP5 and all Object Oriented stuff supported like __get(), __set() (read more).
Download the code from BitBucket or if you have hg repository,
hg clone http://bitbucket.org/ellislab/codeigniter
Ok So what are the changes!
- All deprecated are gone! If you know meaning of deprecated, then I hope you have already stopped using those.
- Validation class no more!
- DB methods removed. These were deprecated since 1.6 (orwhere, orlike, groupby, orhaving, orderby and getwhere)
Making your app do its in CI 2.0
- Change CI class names with prefix CI_
class projb_model extends ModelTo
class projb_model extends CI_Model
- If you are not following strict PHP5 and using constructors in your controllers & models, then change parent::Controller() or parent::Model() to parent::__construct()
- Move your plugins to helpers folder and rename with suffix _helper
- Replace index.php in your app with new code and update any changes
- Extended Libs or MY_Controller goes to system/core folder.
- If you are using old deprecated validation lib and really (really!) want to use that, then only way to make it work is to copy from your old ci system and place it in your app libraries folder. But, try to be smart enough to use the new smart form_validation lib.
- Check $config[‘enable_query_string’] in config.php Because, if enabled in ci 2.0, it will generate urls like /index.php?/controller, or /?/controller.
- Finally check your code for deprecated DB methods (orwhere, orlike, groupby, orhaving, orderby and getwhere)
I hope that wraps up. If anything I find more, I ll update. 🙂