diff --git a/doc/04-schema.md b/doc/04-schema.md index d36e90eaf..393020777 100644 --- a/doc/04-schema.md +++ b/doc/04-schema.md @@ -308,7 +308,9 @@ releases for the `doctrine/data-fixtures` package : `require` and `require-dev` additionally support explicit references (i.e. commit) for dev versions to make sure they are locked to a given state, even when you run update. These only work if you explicitly require a dev version -and append the reference with `#`. +and append the reference with `#`. This is also a +[root-only](04-schema.md#root-package) feature and will be ignored in +dependencies. Example: diff --git a/src/Composer/Command/ShowCommand.php b/src/Composer/Command/ShowCommand.php index ae2307e5c..ec0261acc 100644 --- a/src/Composer/Command/ShowCommand.php +++ b/src/Composer/Command/ShowCommand.php @@ -467,7 +467,7 @@ EOT } $io->write(''); if (isset($package['warning'])) { - $io->write('' . $package['warning'] . ''); + $io->writeError('' . $package['warning'] . ''); } } diff --git a/src/Composer/EventDispatcher/EventDispatcher.php b/src/Composer/EventDispatcher/EventDispatcher.php index 4a5656d9f..2a180614c 100644 --- a/src/Composer/EventDispatcher/EventDispatcher.php +++ b/src/Composer/EventDispatcher/EventDispatcher.php @@ -186,7 +186,12 @@ class EventDispatcher $this->io->writeError(sprintf('You made a reference to a non-existent script %s', $callable), true, IOInterface::QUIET); } - $return = $this->dispatch($scriptName, new Script\Event($scriptName, $event->getComposer(), $event->getIO(), $event->isDevMode(), $args, $flags)); + try { + $return = $this->dispatch($scriptName, new Script\Event($scriptName, $event->getComposer(), $event->getIO(), $event->isDevMode(), $args, $flags)); + } catch (ScriptExecutionException $e) { + $this->io->writeError(sprintf('Script %s was called via %s', $callable, $event->getName()), true, IOInterface::QUIET); + throw $e; + } } } elseif ($this->isPhpScript($callable)) { $className = substr($callable, 0, strpos($callable, '::'));