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

Reproduce issue #100 without mvc and modulemanager dependencies #117

Merged
merged 1 commit into from Sep 14, 2016

Conversation

Slamdunk
Copy link
Contributor

@Slamdunk
Copy link
Contributor Author

DEPS=lowest (zendframework/zend-servicemanager = 2.7.5) https://travis-ci.org/zendframework/zend-form/jobs/159520887#L445 passing

DEPS=latest (zendframework/zend-servicemanager = 3.1.1) https://travis-ci.org/zendframework/zend-form/jobs/159520889#L459 failing

@Slamdunk Slamdunk changed the title Reproduce issue #100 without mvc and modulemanager dependancies Reproduce issue #100 without mvc and modulemanager dependencies Sep 13, 2016
@weierophinney
Copy link
Member

Finally figured out the issue. It's an order of operations thing.

FormElementManager is adding the default initializers during instantiation. The problem is: the factory instantiates it without any configuration. Zend\ModuleManager\Listener\ServiceListener takes configuration and uses it to configure the existing instance, similar to how you setup the integration test. By this time, the damage is already done.

As such, the original patch was correct, but made an invalid assumption, which was that the configuration was passed at initialization.

I'll try and find a solution to this; not entirely certain how to manage it, to be honest.

@weierophinney weierophinney self-assigned this Sep 13, 2016
weierophinney added a commit to weierophinney/zend-form that referenced this pull request Sep 13, 2016
Reproduce issue zendframework#100 without mvc and modulemanager dependencies
weierophinney added a commit to weierophinney/zend-form that referenced this pull request Sep 13, 2016
Uses the test from zendframework#117 to find a solution for zendframework#100 by overriding `configure()`
to first remove the default initializers from the initializer stack if present,
and then push them on in the appropriate positions once configuration is
complete.
@weierophinney weierophinney added this to the 2.9.1 milestone Sep 13, 2016
@weierophinney weierophinney merged commit a9724df into zendframework:master Sep 14, 2016
weierophinney added a commit that referenced this pull request Sep 14, 2016
@Slamdunk Slamdunk deleted the testcase/issue-100 branch September 14, 2016 19:21
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.

None yet

2 participants