Add BC for Script\Event instances, fixes #3811
parent
b098a2fdde
commit
82b7fdf4c1
|
@ -236,6 +236,12 @@ class EventDispatcher
|
||||||
$event->getOperations(), $event->getOperation()
|
$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;
|
return $event;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue