Issues

ZF-6017: Zend_Loader_PluginLoader ignores LIFO order

Issue Type: Bug Created: 2009-03-13T03:01:45.000+0000 Last Updated: 2012-11-20T20:53:25.000+0000 Status: Closed Fix version(s): Reporter: Jan Sorgalla (jsorgalla) Assignee: None Tags: - Zend_Loader

Related issues: Attachments: - LoaderTest.rar

Description

Zend_Loader_PluginLoader ignores LIFO order while trying to overwrite classes from other namespaces with an already registered prefix.

Assuming the following structure

<pre class="literal"> 
application/
    modules/
        foo/
            views/
                helpers/
                    MyHelper.php
library/
    Zend/
        View/
            Helper/
    My/
        View/
            Helper/
                MyHelper.php

Creating the plugin loader

<pre class="highlight">
$loader = new Zend_Loader_PluginLoader();
$loader->addPrefixPath('Zend_View_Helper', 'Zend/View/Helper/')
       ->addPrefixPath('My_View_Helper', 'My/View/Helper')
       ->addPrefixPath('Zend_View_Helper', 'application/modules/foo/views/helpers');

The following

<pre class="highlight">
$myHelperClass = $loader->load('MyHelper');

now loads the class from My/View/Helper instead of application/modules/foo/views/helpers which i would expect.

Comments

Posted by Jan Sorgalla (jsorgalla) on 2009-03-13T03:03:22.000+0000

Tests

Posted by Rob Allen (rob) on 2012-11-20T20:53:25.000+0000

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.

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