I recently had the opportunity to take a look Karinderia and apply it to our new PHP7 server.
is a multi-restaurant ordering system built in Yii 1.1.9. It’s very very comprehensive.
Tips to Convert to PHP7.
Since the code is commercial, tips and coding advice is pretty difficult to come by. Bastikikang the chap who made the system is very responsive, so kudos but for us developers, I find it so much easier to read online documentation. In terms of the api and documentation… it’s none existent. That’s bad news.
1.Update your framework to Yii 1.1.17
2.Turn on PHP Debug Mode. It’s missing somewhere!
3.Fix indirect referencing
Off the Bat, Admin login, Merchant Login and Cart Add are going to break. You’ll see this error
method_exists Uncaught Error: Function name must be a string
This is a reference Error that PHP7 does not allow poor naming of functions.
Follow this reference to clean up your code.
4. AJAX Errors (1/5)
Here’s another tough point. There’s almost 15,000 lines of JS code. I personally do not like JS as it is pretty fickle. But 15K is a big number. Lots of Ajax calls here and there. You’re going to have to debug each call separately. The usually problem is adding ‘static’ to non-static functions now that PHP7 requires you to explicitly declare these functions.
5. That should be about it!