Zend_Loader autoload deprecated in Zend Framework 1.8

Zend Framework 1.8.2

I found this notice after upgrade Zend Framework to 1.8 Notice: Zend_Loader::Zend_Loader::registerAutoload is deprecated as of 1.8.0 and will be removed with 2.0.0; use Zend_Loader_Autoloader instead in C:\AppServ\www\league\library\Zend\Loader.php on line 207 Because Zend_Loader's autoloader has been deprecated in Zend Framework version 1.8 and I use this line in bootstrap.

  1. require_once 'Zend/Loader.php';
  2. Zend_Loader::registerAutoload();
The solution is change them to
  1. require_once 'Zend/Loader/Autoloader.php';
  2. $loader = Zend_Loader_Autoloader::getInstance();
  3. $loader->registerNamespace('../application');
  4.  
  5. $loader->setFallbackAutoloader(true);
  6. $loader->suppressNotFoundWarnings(false);