ZF-7696: Bug: 'include(FrontController.php) [function.include]: failed to open stream: No such file or directory' error message

Description

Hi, Even though I saw that this bug fixed, I still get this error message:

'Warning: include(FrontController.php) [function.include]: failed to open stream: No such file or directory in /xxx/library/Zend/Loader.php on line 83'

The workaround of adding 'false' at class_exists() in BootstrapAbstract.php (line 354) still solves this.

Comments

The false parameter was removed from the get_class() call in r17801. Simply adding it back causes the test case Zend_Application_Bootstrap_BootstrapAbstractTest::testRequestingPluginsByAutoloadableClassNameShouldNotRaiseFatalErrors.

I'm going to try and see if I can't find out a way for this to work in both cases.

I'm stumped. Any ideas Matthew?

I get this error as soon as I enable the fallback autoloader. Any ideas?

Yes, if you want to remove this warning, you need to disable fallback autoloader and rewrite your code for an properly namespace based loading. Using false in get_class isn't solution, because it produces other problems as Matthew said.

I think module bootstraping need to be deeply revised, but I don't have currenty any idea.

What if you're using a library (or application classes) that aren't namespaced?

I created a patch that prevents this warning from occurring.

http://gist.github.com/353288

It doesn't break any unit tests. However, I tried but couldn't duplicate the warning in a unit test context.

I can duplicate it in an application at will though by doing the following:

  1. Enable fallback autoloader
  2. Use module bootstraps resources.modules[] =

This will result in 1 warning per module bootstrap.

Fixed in r22124