MtMail icon indicating copy to clipboard operation
MtMail copied to clipboard

Remove setEventManager from class Composer

Open Erikvv opened this issue 7 years ago • 2 comments

Prevent bugs caused by swapping out the eventmanager Fixes issues #41 and #36 Technically this is a breaking change but I think removing setEventManager is fine because:

  • the behavior it fixes was introduced by accident at some point (by the ServiceManager?)
  • probably nobody calls setEventManager because they would be hit by those bugs and not be able to use the plugins
  • I don't see a reason why you'd want to attach the global EventManager, this is also discouraged.

I wrote a test but it was rather circular. You'd need a pretty big end-to-end test of the real ServiceManager + real Composer + a mocked plugin to test this case.

Erikvv avatar Jun 01 '18 22:06 Erikvv

@mtymek Can you consider this change?

Erikvv avatar Jun 12 '18 15:06 Erikvv

@mtymek If you have some time, that would be awesome. I'm having the exact same issue at the moment.

waltertamboer avatar Aug 22 '18 19:08 waltertamboer