Issues

ZF-8200: Zend_Loader cannot handle PHP 5.3 namespaces

Issue Type: Improvement Created: 2009-11-01T08:32:43.000+0000 Last Updated: 2010-01-12T12:45:30.000+0000 Status: Resolved Fix version(s): - 1.10.0 (27/Jan/10)

Reporter: Benjamin Eberlei (beberlei) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Loader

Related issues: - ZF-2802

Attachments:

Description

Follow-Up to a postponed issue ZF-2802.

Zend_Loader cannot handle php 5.3 namespaces, it just replaces underscores to directories but should also do this with namespace separator.

Afaik this is also what the PHP Standards Group already discussed and Doctrine2 is already using it this way.

Comments

Posted by Keith Pope (mute) on 2009-12-24T08:13:41.000+0000

This needs to consider these use cases:

The user is using 5.3 with no 5.2 classes

Probably would not happen until 2.0 anyway

Would need to turn off the normal autoloader and replace with the 5.3 autoloader

The user is using both 5.3 and 5.2 classes

Most likely use case?

Register the 5.3 autoloader alongside the standard one - $loader->enable53(); ? Performance?

Posted by Matthew Weier O'Phinney (matthew) on 2009-12-31T07:35:08.000+0000

Actually, the autoloader proposed by the PHP Framework Interop Group will work with both our current naming schema as well as namespaces; I will be updating the ZF autoloader for 1.10 to utilize it.

Posted by Matthew Weier O'Phinney (matthew) on 2010-01-12T12:45:30.000+0000

Updated Zend_Loader::loadClass() with the framework interop group's implementation; will release with 1.10.

Have you found an issue?

See the Overview section for more details.

Copyright

© 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.

Contacts