From 6d1e8ebf90542a7c65ac6661f6c47b1d655641d9 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 2 Mar 2016 14:10:21 +0000 Subject: [PATCH] Avoid warnings due to duplicate loading of auth files, fixes #4971 --- src/Composer/IO/BaseIO.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Composer/IO/BaseIO.php b/src/Composer/IO/BaseIO.php index f391f8968..0a787029c 100644 --- a/src/Composer/IO/BaseIO.php +++ b/src/Composer/IO/BaseIO.php @@ -65,6 +65,11 @@ abstract class BaseIO implements IOInterface protected function checkAndSetAuthentication($repositoryName, $username, $password = null) { if ($this->hasAuthentication($repositoryName)) { + $auth = $this->getAuthentication($repositoryName); + if ($auth['username'] === $username && $auth['password'] === $password) { + return; + } + $this->writeError( sprintf( "Warning: You should avoid overwriting already defined auth settings for %s.",