Welcome Guest, Not a member yet? Register   Sign In
Upgrading CI generates error
#11

[eluser]Dam1an[/eluser]
[quote author="Computerzworld" date="1243447092"]@TheFuzzy0ne

So.. the code written in older version doesn't works with newer one? That should not be the case... Because just upgrading system files should not effect my existing code.[/quote]

In most cases, old code should work fine with newer versions
But in order to add some new functionality, they may have to make some major changes to any interfacing (public) methods, although I'm sure they weigh the pro's and con's of doing so, and document them

Also, a lot of code that breaks when upgrading is when the developer 'misused' the system, such as directly accessing private variables and methods, which EL can change as and when they want, as only their internal parts should use these
#12

[eluser]TheFuzzy0ne[/eluser]
I agree, it shouldn't be the case, but sometimes the API must change to encompass new ideas. Rule of thumb is not to upgrade CodeIgniter unless you have to. If your app has been built with a particular version, and it works, you should stick to that version of CodeIgniter, unless there is a specific feature or bug fix you need for your app, in which case you need to upgrade your app too. Contrary to popular belief, CodeIgniter has not necessarily been designed to be backwards compatible, although it is in most cases.

I am quite sure that CodeIgniter will change again, to allow us to extend the base core libraries easier, such as the database library for example. You can't always get everything right first time, and sometimes making something backwards compatible is just too hacky, which is when a new version is needed.
#13

[eluser]Computerzworld[/eluser]
thanks for reply. Currently I have replaced all other system files except database in CI. And it works fine. So, is there anyway to make this thing work with newer database files?
#14

[eluser]Evil Wizard[/eluser]
Here here! Upgrading for the sake of upgrading just to have the latest version is a path to the darkside,
Quote:Unnecessary updates leads to windows
windows leads to suffering
once you start down that path
forever will it dominate your registry
Also try to future proof your code by anticipating potential changes and accounting for them in the design phase
#15

[eluser]TheFuzzy0ne[/eluser]
Yes, simply check the syntax of your existing AR calls with the syntax specified in the user guide for the current version, and change it where necessary. They are usually simple changes, like adding spaces, or combining two parameters into a single parameter and so on.

Use the force - it is strong with you!
#16

[eluser]Computerzworld[/eluser]
Actually there are thousands of queries in the project and changing them manually is not the solution. Is there anyway like backword compatiblility or something else so that my existing code will become compatible to the newer version.
#17

[eluser]Dam1an[/eluser]
As has been mentioned before, is there anything that needs to be upgraded in the database class? Any new functionality you need, any major security fixes?
#18

[eluser]TheFuzzy0ne[/eluser]
I don't think so. It's doable, but there's so much that could go wrong. The best way is to just stick with the old CodeIgniter version.

EDIT: Eating that crumpet whilst I was typing must have slowed me down.
#19

[eluser]Computerzworld[/eluser]
the main reason behind upgrading CI for me is to use new functionality and the fixes that have been implemented in the new version.
#20

[eluser]cpp643[/eluser]
@ Computerzworld : if you are right then, CI definitely doesn't follow the standards.because if you are changing the core files of CI then it won't effect on older coding syntax.i have also face the same problem like you, but i am not suppose to go for upgrading my CI, because i have 100 lines of queries for more then 50 reports.Can any one help??




Theme © iAndrew 2016 - Forum software by © MyBB