1
0
Fork 0

Add BC for Script\Event instances, fixes #3811

pull/3474/head
Jordi Boggiano 2015-03-02 17:02:20 +00:00
parent b098a2fdde
commit 82b7fdf4c1
1 changed files with 6 additions and 0 deletions

View File

@ -236,6 +236,12 @@ class EventDispatcher
$event->getOperations(), $event->getOperation()
);
}
if (!$event instanceof $expected && $expected === 'Composer\Script\Event') {
$event = new \Composer\Script\Event(
$event->getName(), $event->getComposer(), $event->getIO(), $event->isDevMode(),
$event->getArguments(), $event->getFlags()
);
}
return $event;
}