diff --git a/src/Composer/Console/Application.php b/src/Composer/Console/Application.php index fe5dbaccf..d7d113492 100644 --- a/src/Composer/Console/Application.php +++ b/src/Composer/Console/Application.php @@ -373,6 +373,9 @@ class Application extends BaseApplication public function resetComposer() { $this->composer = null; + if ($this->getIO() && method_exists($this->getIO(), 'resetAuthentications')) { + $this->getIO()->resetAuthentications(); + } } /** diff --git a/src/Composer/IO/BaseIO.php b/src/Composer/IO/BaseIO.php index b327f1bbf..8f61c863d 100644 --- a/src/Composer/IO/BaseIO.php +++ b/src/Composer/IO/BaseIO.php @@ -29,6 +29,14 @@ abstract class BaseIO implements IOInterface, LoggerInterface return $this->authentications; } + /** + * {@inheritDoc} + */ + public function resetAuthentications() + { + $this->authentications = array(); + } + /** * {@inheritDoc} */