Welcome Guest, Not a member yet? Register   Sign In
V1.7.1 to current v3 upgrade
#1

(This post was last modified: 11-11-2016, 09:45 PM by enlivenapp.)

Hi all,  I've looked and I haven't see any solid info on upgrading multiple versions.

Essentially, I have a project that was originally built on CI 1.7. I'm looking to bring it up to CI 3.1.x.

So, my question is, Do I need to do each upgrade step, Major versions (1 to 2 then 2 to 3), or can I jump straight to v3?

Thanks for any input.
Reply
#2

step by step.
Reply
#3

(This post was last modified: 11-12-2016, 03:07 AM by sv3tli0.)

If your project is small sized direct push to 3.1 and full debug is an option..

But the best way (and recommend) is step by step.
Best VPS Hosting : Digital Ocean
Reply
#4

(11-12-2016, 03:07 AM)sv3tli0 Wrote: If your project is small sized direct push to 3.1 and full debug is an option..

But the best way (and recommend) is step by step.

Agree with you
Reply
#5

Take a brand new version of CI 3 and install it on your server and get that welcome page. Connect it to the database and make sure that works.
Figure out the new sessions and which version you want to use and get that working. Set up a form with some validation. In other words really really make sure that everything is working on your server first.

Next read all of the upgrade instructions very carefully. Read the relevant sections of the manual. Make notes for your application. Next look at this board for some of the issues that people have recently been having with file upload, images conversion, etc. These are mostly edge cases that might not apply to your application but its good to be aware of.

Then take a section or piece of your application - and upgrade that to CI 3. Make notes on what is failing, etc. Come up with a search / replace list. Then upgrade your application in sections, using a decent editor where you can do search / replace over all the files at once. After you do the first section, the rest will go very quickly. I am not clear on why anyone would encourage you to upgrade to version 2 first - maybe they want you to experience the full codeigniter journey? Otherwise I don't think its necessary.
Reply
#6

Cartalot,

Thanks, I'm more or less going to start from scratch since the original project is GPLv3 and that's not 100% what I'm looking to do for some parts of it (selling themes, plugins, widgets, etc). The base project will be open source though.

Funnily enough, I've been using CI since 2007 (the v1.7 days), so I've been through the update as updates come out process. I know my question is an edge case for bringing *really* old software up to some semblance of modern code and I couldn't find anything that really talked about v1 to v3 (except one you talked about on SO).

Thanks for the input from everyone.
Reply
#7
Brick 

Just started this same process and thought I'd share what I did and found so far.

I started with a clean copy of 3.1.2 on PHP 7 and copied my application files in, excluding config.  I manually configured based on the old config file's data.  Surprisingly, very little changed over the years, so this was straight-forward.

In the 1.7.1 implementation, all files were lowercase.  I had to rename all my controllers and models to begin with uppercase.

All references to "extends Controller" become "extends CI_Controller".
All references to "extends Model" become "extends CI_Model".

Since this was originally PHP 5.2, there were no __construct() methods, so I would find a function of the same name as the class acting as the controller.  For example class Blah would contain a function called Blah(), which I changed to __construct().

Inside your constructors, all references to "parent::Controller" or "parent::Model" become "parent::__construct()".  This ensures inheritance occurs.

This resolved all my initial framework related issues.  I am now able to run the application and focus on resolving non-framework issues, such as calls to deprecated functions.

Hope this helps,

Kris
Reply
#8

Well,

I can be a little more open about it now. The owner just transferred the software and domains to me.

So, I'll be taking Open Blog up to CI 3.1.x (or latest) and then on to CI4 when it's released. It'll be a couple weeks before I get started as I'm covered up with a client's website right now.

https://github.com/enlivenapp/Open-Blog/tree/master
Reply




Theme © iAndrew 2016 - Forum software by © MyBB