From 1e458072cf533f3099bf2ba2a5df019594a4391a Mon Sep 17 00:00:00 2001 From: Mateusz Heleniak Date: Thu, 6 Sep 2012 17:56:14 +0200 Subject: [PATCH] scripts in pre-*-cmd which are not found (yet) no longer halt composer --- src/Composer/Script/EventDispatcher.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Composer/Script/EventDispatcher.php b/src/Composer/Script/EventDispatcher.php index 1e8eaa58b..b4537ed62 100644 --- a/src/Composer/Script/EventDispatcher.php +++ b/src/Composer/Script/EventDispatcher.php @@ -82,10 +82,12 @@ class EventDispatcher $methodName = substr($callable, strpos($callable, '::') + 2); if (!class_exists($className)) { - throw new \UnexpectedValueException('Class '.$className.' is not autoloadable, can not call '.$event->getName().' script'); + $this->io->write('Class '.$className.' is not autoloadable, can not call '.$event->getName().' script'); + continue; } if (!is_callable($callable)) { - throw new \UnexpectedValueException('Method '.$callable.' is not callable, can not call '.$event->getName().' script'); + $this->io->write('Method '.$callable.' is not callable, can not call '.$event->getName().' script'); + continue; } try {