I've inherited a CakePHP application and it uses the LazyModel plugin.
Though I'm attempting to upgrade from 1.3.10 to 1.3.11 and I get the following error:
Fatal error: Cannot redeclare class AppModel in app_model.php
Same issue in 1.3.12 and 1.3.13
Also in app_model.php is the Sanitize library is being imported, right under the LazyModel App::import().
I believe the core change in question is evident in the below commit. When removing App::import('Model', 'ConnectionManager'); from cake/libs/santize.php I don't have a problem.
Do you have any suggestion why this is, and if possible a best practice around this problem?
Ah i see how that might be a problem. I'd say change it to: App::import('Core', 'ConnectionManager'); and make a pull request for the cakephp core. That should fix it. I think it is a bug in the CakePHP core.
I don't really understand the issue, so I've logged a ticket (rather then a pull request): http://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/2261-wrong-appimport-type-in-santize-library
Cheers, this has being fixed in CakePHP core: cakephp/cakephp@2ac00f0
Ah good news and fast too. Good job :)