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

Updated ModuleManager to EventManager v3 #12

Merged

Conversation

weierophinney
Copy link
Member

Principal issues:

  • Aggregate listeners needed to define the $priority = 1 argument in attach().
  • attachAggregate() calls needed to be updated to instead use $aggregate->attach().
  • trigger() statements needed updating. In most cases, we were using actual event instances, which meant:
    • Updating the code to add the event name just before triggering.
    • Updating the trigger statements to either triggerEvent() or triggerEventUntil().
    • Triggers with callbacks needed the new argument order.
  • EventManager instances during testing needed to be injected with the SharedEventManager instance during instantiation. Any that set identifiers during instantiation needed to change argument order.

Principal issues:

- Aggregate listeners needed to define the `$priority = 1` argument in
  `attach()`.
- `attachAggregate()` calls needed to be updated to instead use
  `$aggregate->attach()`.
- `trigger()` statements needed updating. In most cases, we were using actual
  event instances, which meant:
  - Updating the code to add the event name just before triggering.
  - Updating the trigger statements to either `triggerEvent()` or
    `triggerEventUntil()`.
  - Triggers with callbacks needed the new argument order.
- `EventManager` instances during testing needed to be injected with the
  `SharedEventManager` instance during instantiation. Any that set identifiers
  during instantiation needed to change argument order.
@weierophinney weierophinney added this to the 3.0.0 milestone Sep 30, 2015
Extracted common methods for introspecting event manager listeners to a new
trait, EventManagerIntrospectionTrait, and updated all test cases that consumed
one or more of them to use the trait instead.
@weierophinney weierophinney merged commit 0ba2b89 into zendframework:develop Sep 30, 2015
weierophinney added a commit that referenced this pull request Sep 30, 2015
Also updated branch alias, as this targets 3.0 (which the CHANGELOG notes)
weierophinney added a commit that referenced this pull request Sep 30, 2015
weierophinney added a commit that referenced this pull request Feb 25, 2016
Combined with entries for #12 and #13, and revised them based on the final
changes in #28.
@Xerkus Xerkus modified the milestones: 2.7.0, 3.0.0 Mar 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants