Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Test for a Module class before testing for a class named after the module #73

Conversation

weierophinney
Copy link
Member

@weierophinney weierophinney commented Nov 1, 2017

Per #72, non-namespaced classes can create issues within applications if
they conflict with a module. In particular, Generator is one (as the
class is non-instantiable via new), but this can also happen in legacy
applications where a new module may exist under the same name as a
defined class.

This patch adds tests to ensure that the resolver prefers Module
classes if they exist, and never loads known uninstantiable classes that
always exist (specifically, Generator).

Fixes #72

…module

Per zendframework#5, non-namespaced classes can create issues within applications if
they conflict with a module. In particular, `Generator` is one (as the
class is non-instantiable via `new`), but this can also happen in legacy
applications where a new module may exist under the same name as a
defined class.

This patch adds tests to ensure that the resolver prefers `Module`
classes if they exist, and never loads known uninstantiable classes that
always exist (specifically, `Generator`).
@weierophinney weierophinney added this to the 2.8.1 milestone Nov 1, 2017
@weierophinney weierophinney merged commit d6ae1b4 into zendframework:master Nov 1, 2017
weierophinney added a commit that referenced this pull request Nov 1, 2017
weierophinney added a commit that referenced this pull request Nov 1, 2017
@weierophinney weierophinney deleted the hotfix/72-change-order-of-resolver-lookups branch November 1, 2017 18:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Module "Generator" causes fatal error after update to zend-module-manager 2.8.0
1 participant