I need to upgrade cakephp 2.7.5 to cakephp 3.5

I need to upgrade cakephp 2.7.5 to cakephp 3.5. Please let me know the steps or guide from where I can follow the steps.

As Cake 3 broke backward compatibility there is no easy way. It can be relatively easy or really hard depending on your codebase.

Thanks! can you please help me out. what I have to take care while migrating?

Well there are a lot of things and they are different for each and every projects. If you are using fat models it is easier, if not it is harder.
Just use the upgrade tool, and than start to debug your application. And prepare for a lot of rewrite.

I am in the process upgradeing one of my big applications. A lot of rewrite but the code is significantly smaller and better.

Yes true, Its also time consuming. I have taken around 2 days just to display the login screen. As I am new in cakephp.
But can you please help me in models? How can we make or call models in cakephp 3.6. I have tried alot on internet but not getting a proper content.
I have already done upgrade tool, resolving the errors now.
I am facing below error:
Error: Class ‘App\Model’ not found
File C:\xampp\htdocs\cakphp\src\Model\AppModel.php
Line: 41
Any suggestions?
Thanks!

As in CakePHP 3 Models divided into entities and tables, there is no model class. So you can just delete your AppModel.php

If you have some custom functionality there you should move it to table or entity classes.

Thanks! If possible can you please share any link for reference?

Reference for what? The whole process? I do not think there is something like this as it is different foor each projects. You can just follow the error messages first, try to fix them, and you can start refactor your codebase.

ok. Thanks! I will surely follow this process and will let you know if I face any hurdle.

Check the migration guides in the book. They explain what was changed.

Hi,
Does anyone have any clue related to below error.
Fatal error : Cannot make non static method Cake\ORM\Table::get() static in class App\Model\Table\UsersTable in C:\xampp722\htdocs\cakphp36\src\Model\Table\UsersTable.php on line 9

Thanks

Regards
Anuj

Sure.

Just let us know what is in C:\xampp722\htdocs\cakphp36\src\Model\Table\UsersTable.php on line 9

Issue resolved… Thanks!

You can share your soultion, it can help others also

ok! sure…
From now onwards, I will also share the solution.

Right now I am working on authentication process, changing it from 2.7.5 to 3.6.

I have change from auth login to this->Auth->identify() but it is giving boolean (false).

getting below output on debugging:

\src\Controller\UsersController.php (line 36 )

[ ‘User’ => [ ‘username’ => ‘leon’, ‘password’ => ‘anuj’ ], ‘btnSubmit’ => ‘’ ]

\src\Controller\UsersController.php (line 37 )

false

Any suggestions?

Regards
Anuj

Please open a new thread for this and share your UsersController code for handling login

ok.

Sure.

Thanks…!!