Ashish
Ashish

Reputation: 207

migration cakephp application from 2.x to 3.x

There is a large application which developed in cakephp version 2.0. Now I would like to migrate it 3.x. When I have tried to start migrate then got a lot of obstacle

like in 2.x used

App::import('Controller', str_replace('Controller', '', $controller)); 

Now in 3.x how can handle it? Actually i need to know is there any good option to migrate? Is there any reference?

Upvotes: 1

Views: 2034

Answers (1)

gmponos
gmponos

Reputation: 2277

You don't have to use the App::import() anymore as CakePHP 3 Follows PSR-4 and you can load your classes using use like this use App\Controller\AppController;. Search more for PSR-4 autoloading.

In the official site says that there is a tool but on github it mentions that it is still under development.

Upvotes: 1

Related Questions