fixes composer/composer#3546
Merge pull request #3547 from alcohol/fix-reflection

fix reflection implementation in EventDispatcher