Welcome Guest, Not a member yet? Register   Sign In
Upgrading from 2.1.x to 3.1.x
#1

I am looking for some guidance with migrating 30+ websites I have written in CI 2.1.x. These sites use HMVC, Sparks and a custom developed CMS Library that is rather complex.

I have spent a few hours running through the instructions for migrating provided by CI, however I am unable to get anything to work properly with HMVC or Sparks. From what I can tell Sparks is not supported anymore and it's recommended to use Composer, however this is not really an option when these libraries are not maintained anymore and may not be available through composer with any instructions on how to install via composer.

Luckily I am only using a few sparks..

https://github.com/philsturgeon/codeigniter-template
https://github.com/darkhouse/codeigniter-message

I am contemplating even bothering with this migration, from what I can tell after CI 3.x the move to CI 4 will be a complete re-write regardless, and from the looks of it even if I am able to the HMVC working with my apps (which has been a nightmare thus far) I am still left without a solution to sparks without needing to re-write all of the code I am using for the template engine and just using something like the blade templating engine.

Does anyone have any advice on this scenario I am in? I am considering just re-doing these applications in Laravel as it appears like I am going to have to re-write a large chunk of my code anyways. Even after I upgrade i am going to be left with a framework that is essentially still dead because no one is actively coding websites in 2018 with CI. However I am worried in doing so I will be left with a much bigger task with re-writing these apps in Laravel as opposed to battling through and trying to get something working with the newest CI version & all of the custom stuff insides my apps.
Reply
#2

"Sparks" for CI is long dead. A work around avoiding composer is to copy/convert the classes you are using from previous "sparks" into your application/libraries folder. If they are used in more than one app, consider making them into a CI "package". I don't know if anyone has ported the two sparks you mention.

WireDesignz' HMVC apparently works with CI3 (I don't use it, myself). Others on the forum have either ported it or reported that it works.

For both the above, the "addins" sub-forum might have some useful threads.

As for your later contentions about CI & Laravel, there are many who would disagree. If you feel the urge to move to Laravel, I recommend giving Symfony 4 a test-drive, as it looks to be going down a similar road to CI4. My two cents worth, in any case Undecided
Reply
#3

I'm using sparks and hmvc too without any fuss... In hmvc you have to modify one of the files to use it with 3.1+
You should check this PR: https://bitbucket.org/wiredesignz/codeig...i-313/diff
Reply
#4

Thank you for the replies, I am thinking now that I just need to spend more time working through these bugs I am having with HMVC. I was able to get a brand new CI implementing HMVC but after migrating an existing demo site that I have, I run into an error with HMVC that I can't trace down. It doesn't make sense because it uses the same HMVC code as the working skeleton site that I have working.

Fatal error: Call to undefined method CI_Router::fetch_module() in /Users/corby/Desktop/Sites/project/application/third_party/MX/Config.php on line 42

@orionstar I have not run into that error yet but thank you for the link...how do you load your spark libraries? I currently have them setup in a MY_Controller file loading as such:

$this->load->spark('template/1.9.0');
$this->load->spark('message/1.2.1');
$this->load->spark('cache/2.0.0');
Reply




Theme © iAndrew 2016 - Forum software by © MyBB