ZF-10024: Autoloader doesn not make use of PHP5.3 closures as callbacks

Issue Type: Bug Created: 2010-06-21T08:34:40.000+0000 Last Updated: 2010-06-21T10:38:45.000+0000 Status: Resolved Fix version(s): - 1.10.6 (22/Jun/10)

Reporter: julien PAULI (doctorrock83) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Loader

Related issues: Attachments: - autoloader.diff


Zend_Loader_Autoloader::pushAutoloader() and sisters don't actually make use of anonymous functions. They accept them, but the code trying to execute the callback simply ignores closures.

Use case :

require_once 'Zend/Loader/Autoloader.php'; $autoload = Zend_Loader_Autoloader::getInstance(); $autoload->pushAutoloader(function ($class) { require str_replace('_','-',$class) . '.php'; });

$f = new Foo_Bar; // class not found (and should be)


Posted by julien PAULI (doctorrock83) on 2010-06-21T08:35:38.000+0000

Attached a patch

Posted by julien PAULI (doctorrock83) on 2010-06-21T10:03:28.000+0000

Attached a testcase

Posted by Matthew Weier O'Phinney (matthew) on 2010-06-21T10:38:32.000+0000

Patch applied (with edits) to trunk and 1.10 release branch.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.