I just upgraded from ZF 1.7 to ZF 1.9, and almost everything works fine... except for Autoloader.
Old:
require_once('Zend/Loader.php');
Zend_Loader::registerAutoload();
New:
require_once 'Zend/Loader/Autoloader.php';
$loader = Zend_Loader_Autoloader::getInstance();
$loader->registerNamespace('MySiteName_');
$loader->setFallbackAutoloader(true);
The files I need to auto-load are mostly not namespaced (because it's a large project from pre-namespacing). They are in the following directories:
- /application/controllers
- /common/models
- /library
- /vendor
The site seems to work fine EXCEPT that it can't find /library/Form.php
It used to be able to, but not anymore. It works if I add a require_once 'library/Form.php', but that shouldn't be necessary, and I'm worried that if I start doing that in some places, I'll need to abandon the autoloader and hard-code all includes. I thought adding "setFallbackAutoloader(true)", combined with having "library" in my include path would fix it, but it didn't.
My include path is:
.:/Users/lofye/Documents/htdocs/mysitename/vendor
:/Users/lofye/Documents/htdocs/mysitename/common
:/Users/lofye/Documents/htdocs/mysitename/common/models
:/Users/lofye/Documents/htdocs/mysitename/library
:/Users/lofye/Documents/htdocs/mysitename
Any help greatly appreciated!