I need help to migrate one app from 3.4.7 to 4.x. I need a step by step procedure; I have wamp 64 bits installed and running application under PHP 7.1.33 , no error; Need help for model new structure
What you can do is install cakephp 4 bake some models and controllers. Then you can see the difference. Also when turn debug to true it will throw deprecated errors.
Almost every file needs minor changes. Since in models need to add : void, :RulesChecker, Then things use Slightly different named classes that do the same thing. Like Email->send becomes Mailer->deliver
newEntity() becomes newEmptyEntity
Kind of annoying have to make all these small changes. I hope in the future they will not keep doing things like that. Because as an end user it doesnt add much value apart having to update every file with a few words here and there.
Good point @thomasg, since I saw all this set/get changes in 3 version I still use 3.1 as I started and frankly only a few times I saw something that may be interesting for me in v > 3.1 and it is easy to do “manually”
I am available to help you migrate on ver. 4.4.5
Please let me know, If you have something
Locally using wamp server;
Application is working properly on cake 3.4.7 (warning off)
Installed in wamp64/www/jmv
Cakephp 4.4.5 is installed in wamp64/www/jmv445 … I see first page Welcome to CakePHP 4.4.5 Strawberry
“Pages/home.php with your own version.” not done and no access to database yet.
I am now ready to receive your advice or first step.
I can give you access to any module, maybe the whole application or prefer do whatever steps you want me to do first.
… waiting for your order
P.S. Skype is possible
Hello Sir Thomas
I am not a guru of PHP or Cake PHP but retired from IT career and helping an ONG to maintain a Cake PHP application and now trying to migrate from 3.4.7 to 4.x;
I first step up PHP to 7.4, installed 4.4.5 and realized so many changes in authentication or Authorization; We do authenticate by using an additional table (GroupTable) containing 4 level or importance i.e. Super Admin, Admin, Secretary ,);
However, after baking a few Models and being unable to Connect or access the database, I opted for using migration avenue in order to have at least a step toward a smooth switch to version CakePHP 4.x
What is your best advise in that matter; Our app is working error-free on PHP 7.1.3; I am testing locally “Localhost” using Wamp to ease transition;
Hoping some idea from an expert
P.S. I could give you access to the code
@bengatoh The best approach would be to first go from 3.4 to 3.5, then 3.6, then 3.7 etc. till you are at 3.10 Then you can go to 4.0, 4.1, 4.2, 4.3 and then finally to 4.4
With that you are not overwhelmed with all the deprecations all at once.
Regarding the authentication changes: If your app is built upon the old AuthComponent I have to tell you that it has been deprecated and will be removed in CakePHP 5.0
So I don’t know how much time you should invest getting that to work with later CakePHP versions if instead you can also migrate the functionalities over into a new CakePHP 4.4 app with the new authentication or authorizatin plugins. But be aware, it is quite the undertaking because the new auth plugins are built very differently. See my workshop to see how the new auth plugins are meant to be used: WORKSHOP - Authentication & Authorization by Kevin Pfeifer - YouTube
If you instead want to have a “ready-made” role based authorization system I can definitely recommend cakedc/users to get something running rather quickly.
It all depends on how much functionality and custom code you have in your current CakePHP 3.4 app if its faster to upgrade step by step or start over a new project and migrate stuff over.
Hello Sir Kevin,
Thanks for that quick and clear reply; Our Cake PHP APP (started in 2017) is used by (Senior Citizen Organization); It is effectively based on “AuthComponent”; model table name is “Utilisateurs” and not “Users” which seems to be hooked in Middleware stuff.
Definitely we need Authentication based on a table named “Groupes”; Not so easy to find around a Cake PHP specialist who is willing to guide us. Application is coded French language; We already contacted Cakedc/users for a quote but still no positive feedback;
If any of your acquaintance can help, I could provide a ftp user account to the whole folder and database;
Again, merci for your professionalism
Contact Dubuc Marketing they are based on cakephp agency and in french