Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Update to the current version of CakePHP and adapt the code to work with it. #1122
Perhaps it might be a good idea to update from Version 1.3 to Version 3.2.
I know it would involve a lot of time, but in the long run, it may help save total man hours, assuming that we'll be getting more and more developers volunteering their time to help.
I think potential developers for the Tatoeba Project would likely be more interested in spending time to learn how to use the current version of CakePHP rather than an old version, since they could apply what the learn to possible other projects that they may want to develop for themselves in the future.
I know that I personally would be more interested in helping if we were working with the current version of CakePHP.
I'm not sure, but additionally very likely the newer version of CakePHP is more efficient.
There's a few things to consider:
I don't have clear answers to these questions.
I don't reject at all the idea of upgrading, but I would like not to do it for purely "marketing" reasons, because working on the latest version just sounds more attractive. We need to look at the project's needs, and choose according to that.
I'll be more than happy though, if someone wants to try plugging the newest Cake version into Tatoeba's code, and see how things run, get an overall idea of how much time it'd take to migrate, what would be better, what would be worse.
@zachleigh said to me he'd be interested to have a look at this. But he's also interested to work building an API for Tatoeba, which (to me at least) would be a higher priority. Probably he'll be focusing on that.
On my side, for the next six months or so, my focus is on the UI, on finishing #1180. So this upgrade would definitely not be a sub-project I could take on.
These are all very important questions.
I just attempted an upgrade to CakePHP 2.x, from there the upgrade path becomes easier. The upgrade will certainly require a significant amount of work but will also help structure the app more. A number of parts in the current app could be componentized and hence better testes / reused.
The usual "better performance" / "better API" are obvious arguments. The latest 1.x release was in 2011. Since then many features have been added to both PHP and Cake. CakePHP 3.x comes with a new ORM that could help with deeply nested relationships. It uses Composer to do dependency management, comes with a CLI to do most development operations (create new controller, tests, model, ...). I've certainly not yet developed a deep enough understanding of the codebase to argue for the benefits of upgrading CakePHP. One of the things that it will help with however is attract more contributors who seek to work on a modern open source project - Piwik saw a steady decline in contributions while it clung onto older PHP versions and has since gained much more popularity after migrating the codebase to PHP > 5.3 and improved its tooling.
Seeing that tatoeba seeks to apply for Google Summer of Code I can only imagine that Google isn't very keen on funding a project that is built on top of a 5 year old framework.
As a new contributor I can certainly not answer this question for you. At work I'm a Rails developer and had long abandoned PHP for its lack of good tooling, package management and weird idiosyncrasies. I however am a strong believer in refactoring existing code instead of completely abandoning it and beginning from scratch. Not only do you loose a lot of time building a project from scratch, but you also risk loosing long time contributors and their knowledge. CakePHP is a perfectly fine solution and I haven't come across an issue here that suggests it would be worth the time investment of replacing it entirely. As for PHP, the reason why I'm interested in looking at the language again is because it has in recent years played catch-up and is finally in a state where both tooling and language features have reached the state of a modern programming language.
@halfdan first, thanks for your valuable input on this issue and thanks for volunteering for this :D
To migrate to 2.x without too much merge conflict headache, we'll have obviously to merge the remaining pull requests. Should be done for this weekend, hopefully.
As for other works in progress:
In terms of planning, if we want to get this done in January, I'd see something like this:
Sounds good, or too short timing?
No, I’m not working on anything else.
@trang, I don’t think refactoring will help much migrating because it seems 2.0 is more about new namings and new API than anything else. I’m not sure if any plan is worth making because you never know the kind of problems you’re going to face. I remember I had to fix a very weird bug when we upgraded from 1.2 with the help of loolmeh, which was of course totally unexpected and took me quite some.
Note that I had to make some changes to our copy of CakePHP 1.2, but you can safely ignore them. I reported the Arabic plural problem to the CakePHP team and they solved it another way in CakePHP 2.6.
The major features have been migrated successfully from 1.3 to 2.9 so I'll be closing this issue. I'll create another one for the upgrade of CakePHP from 2.9 to 3.x when the time comes. We'll first need a couple of months to stabilize this upgrade and do some clean up before we can consider moving to the next upgrade.
Thanks again @halfdan for your work on this.
Just for the record: