Upgrading to 3 from... 1.7.1 :( |
The following is a basic summary of the changes for each version, with most changes which occur in multiple versions moved down to the later change. For this reason, it is not a good idea to follow this to change to any version earlier than 2.2.1 or 3.0.
If anything is not clear, you should check the user guide for the upgrade in question (which is one of the reasons I linked each page of the upgrade guide next to the version). If I were performing this upgrade, I would probably want to take the more careful approach of going version to version. If nothing is listed here for a particular version, it means all changes in that version are superseded by a later version (in most cases the update instructions were, to paraphrase: "Update your "system" folder and user guide"). Anyway, {insert 2 million legal disclaimers here if necessary}, here's the summary for upgrading from 1.7.1 to 3.0: 1.7.1 to 1.7.2 http://www.codeigniter.com/user_guide/in...e_172.html - Remove header() from 404 error template (note that 404 error templates move to a new location/format in 3.0) 1.7.2 to 2.0.0 http://www.codeigniter.com/user_guide/in...e_200.html - Adjust get_dir_file_info(): make the second parameter FALSE if you need a recursive result (in other words, to get, more or less, the result you would have received in a previous version of CI) - Convert Plugins to Helpers: - Rename files from filename_pi.php to filename_helper.php - Move them to your helpers folder - Change all instances of $this->load->plugin('filename'); to $this->load->helper('filename'); - Data encrypted with the 1.7.2 Encrypt library must be migrated, the encode_from_legacy() method was added to help with this process. See http://www.codeigniter.com/user_guide/li...rom_legacy - The compatibility helper has been removed (remove any attempts to load it) - Update models and controllers which extend the CodeIgniter Model and Controller to extend CI_Model and CI_Controller, respectively. - Update extended libraries to call parent::__construct(); instead of the PHP4-style constructors. - Move any core extensions to application/core 2.0.0 to 2.0.1 http://www.codeigniter.com/user_guide/in...e_201.html - Change empty form_open() calls to form_open('/'); or form_open(base_url()); if they are expected to submit to the default controller. 2.0.1 to 2.0.2 http://www.codeigniter.com/user_guide/in...e_202.html - Remove loading calls for the Security library - Move MY_Security to application/core - Use security->get_csrf_hash() and security->get_csrf_token_name() in place of the properties csrf_token_name and csrf_hash 2.0.2 to 2.0.3 http://www.codeigniter.com/user_guide/in...e_203.html - Change references to the EXT constant with ".php" - Remove APPPATH.'third_party' from application/config/autoload.php 2.0.3 to 2.1.0 http://www.codeigniter.com/user_guide/in...e_210.html - Replace application/config/user_agents.php (you may want to combine this with 3.0 upgrade) - Update Sessions Database Tables (you may wish to combine this with 2.1.1 or even 3.0 upgrades): CREATE INDEX last_activity_idx ON ci_sessions(last_activity); ALTER TABLE ci_sessions MODIFY user_agent VARCHAR(120); 2.1.0 to 2.1.1 http://www.codeigniter.com/user_guide/in...e_211.html - Replace application/config/mimes.php (you may want to combine this with 3.0 upgrade) - Update your IP address fields in database tables (enlarge ip_address columns to 45 characters), including sessions: ALTER TABLE ci_sessions CHANGE ip_address ip_address varchar(45) default '0' NOT NULL (you may want to combine altering the sessions table with 3.0 upgrade) 2.1.1 to 2.1.2 http://www.codeigniter.com/user_guide/in...e_212.html 2.1.2 to 2.1.3 http://www.codeigniter.com/user_guide/in...e_213.html 2.1.3 to 2.1.4 http://www.codeigniter.com/user_guide/in...e_214.html 2.1.4 to 2.2.0 http://www.codeigniter.com/user_guide/in...e_220.html - The Encrypt library requires the Mcrypt extension 2.2.0 to 2.2.1 http://www.codeigniter.com/user_guide/in...e_221.html The following changes are included in most of the above version changes (but will only be mentioned in this summary here), but you may want to combine them with the 3.0 upgrade - Update CodeIgniter files (replace all files in the "system" folder and replace your index.php file; any changes made to index.php will need to be migrated over to the new one) - Confirm $system_path is set to application's system folder (in your updated index.php file) - Update your user guide 2.2.1 to 3.0.0 http://www.codeigniter.com/user_guide/in...e_300.html This one really should be followed directly from the user guide. I will not summarize it here. |
Messages In This Thread |
Upgrading to 3 from... 1.7.1 :( - by jww062 - 04-07-2015, 05:48 PM
RE: Upgrading to 3 from... 1.7.1 :( - by GrigoreMihai - 04-08-2015, 01:32 AM
RE: Upgrading to 3 from... 1.7.1 :( - by mwhitney - 04-08-2015, 09:38 AM
RE: Upgrading to 3 from... 1.7.1 :( - by jww062 - 04-08-2015, 09:41 AM
RE: Upgrading to 3 from... 1.7.1 :( - by alkarim - 04-21-2015, 07:21 AM
|