ZF-6602: Using Loader_Autoloader is not working on application with modules with similar names.
Description
Hi,
I'm not sure if the problem is with Zend_Loader or Zend_Application (maybe other compoment), the problem is:
I use a modular application layout like this:
application/ config/ data/ ../ modules/ admin/ controllers/ models/ views/ ../ adminservices/ controllers/ models/ views/ ../ admintest/ adminxxx/ somename/ somenameetc/ module1/ module2/ module3/
As you can see I use modules with similar names, all modules use their Bootstrap so autoload works fine.. I can use models from any module BUT if found a problem for example:
If I try to load a model of module named "admin" from module "module1" or any other module it work OK. if I try to load a model of module named "adminservices" from any module it do not works, autoloader it not loading the class so I get a:
Fatal error: Class 'Adminservices_Model_XXXX' not found
I try with other modules and I can see that any modules that start with similar names autoloader only register the first one, so I can only call clases from admin, somename, etc, any other clases that start with this name it not working with autoloader..
Anyone can confirm this??? or I'm doing something wrong??
Thanks
Lyle
Comments
Posted by Lyle Arnot (larnot) on 2009-05-11T07:14:13.000+0000
This is a test project with the problem, from the quickstart zend project.
Posted by Matthew Weier O'Phinney (matthew) on 2009-05-11T08:35:09.000+0000
I created a testcase in the zip you provided:
This passes. (If the autoloader had been unable to load either class, PHPUnit would have reported the error.)
So, basically, I'm unable to reproduce the error using the code you provided, and running off of current trunk.
Posted by Lyle Arnot (larnot) on 2009-05-11T08:41:52.000+0000
Please give a try on this: after install the test application check the url:
public/default/index/index
It will execute this code:
echo 'TEST START HERE: ' . '
';
<<<< This will fail to load <<<
Anyone else can reproduce the problem???