1
0
Fork 0

Merge branch '1.4'

pull/5653/merge
Jordi Boggiano 2017-05-21 17:16:46 +02:00
commit 221d80d1e1
4 changed files with 9 additions and 9 deletions

View File

@ -184,7 +184,7 @@ class JsonManipulator
$decoded = JsonFile::parseJson($this->contents); $decoded = JsonFile::parseJson($this->contents);
$subName = null; $subName = null;
if (in_array($mainNode, array('config', 'repositories', 'extra')) && false !== strpos($name, '.')) { if (in_array($mainNode, array('config', 'extra')) && false !== strpos($name, '.')) {
list($name, $subName) = explode('.', $name, 2); list($name, $subName) = explode('.', $name, 2);
} }
@ -304,7 +304,7 @@ class JsonManipulator
} }
$subName = null; $subName = null;
if (in_array($mainNode, array('config', 'repositories', 'extra')) && false !== strpos($name, '.')) { if (in_array($mainNode, array('config', 'extra')) && false !== strpos($name, '.')) {
list($name, $subName) = explode('.', $name, 2); list($name, $subName) = explode('.', $name, 2);
} }

View File

@ -109,7 +109,7 @@ class Bitbucket
return false; return false;
} elseif (in_array($e->getCode(), array(403, 401))) { } elseif (in_array($e->getCode(), array(403, 401))) {
$this->io->writeError('<error>Invalid OAuth consumer provided.</error>'); $this->io->writeError('<error>Invalid OAuth consumer provided.</error>');
$this->io->writeError('You can also add it manually later by using "composer config bitbucket-oauth.bitbucket.org <consumer-key> <consumer-secret>"'); $this->io->writeError('You can also add it manually later by using "composer config --global --auth bitbucket-oauth.bitbucket.org <consumer-key> <consumer-secret>"');
return false; return false;
} }
@ -144,7 +144,7 @@ class Bitbucket
if (!$consumerKey) { if (!$consumerKey) {
$this->io->writeError('<warning>No consumer key given, aborting.</warning>'); $this->io->writeError('<warning>No consumer key given, aborting.</warning>');
$this->io->writeError('You can also add it manually later by using "composer config bitbucket-oauth.bitbucket.org <consumer-key> <consumer-secret>"'); $this->io->writeError('You can also add it manually later by using "composer config --global --auth bitbucket-oauth.bitbucket.org <consumer-key> <consumer-secret>"');
return false; return false;
} }
@ -153,7 +153,7 @@ class Bitbucket
if (!$consumerSecret) { if (!$consumerSecret) {
$this->io->writeError('<warning>No consumer secret given, aborting.</warning>'); $this->io->writeError('<warning>No consumer secret given, aborting.</warning>');
$this->io->writeError('You can also add it manually later by using "composer config bitbucket-oauth.bitbucket.org <consumer-key> <consumer-secret>"'); $this->io->writeError('You can also add it manually later by using "composer config --global --auth bitbucket-oauth.bitbucket.org <consumer-key> <consumer-secret>"');
return false; return false;
} }

View File

@ -94,7 +94,7 @@ class GitHub
if (!$token) { if (!$token) {
$this->io->writeError('<warning>No token given, aborting.</warning>'); $this->io->writeError('<warning>No token given, aborting.</warning>');
$this->io->writeError('You can also add it manually later by using "composer config github-oauth.github.com <token>"'); $this->io->writeError('You can also add it manually later by using "composer config --global --auth github-oauth.github.com <token>"');
return false; return false;
} }
@ -110,7 +110,7 @@ class GitHub
} catch (TransportException $e) { } catch (TransportException $e) {
if (in_array($e->getCode(), array(403, 401))) { if (in_array($e->getCode(), array(403, 401))) {
$this->io->writeError('<error>Invalid token provided.</error>'); $this->io->writeError('<error>Invalid token provided.</error>');
$this->io->writeError('You can also add it manually later by using "composer config github-oauth.github.com <token>"'); $this->io->writeError('You can also add it manually later by using "composer config --global --auth github-oauth.github.com <token>"');
return false; return false;
} }

View File

@ -112,8 +112,8 @@ class GitLab
$this->io->writeError('Maximum number of login attempts exceeded. Please try again later.'); $this->io->writeError('Maximum number of login attempts exceeded. Please try again later.');
} }
$this->io->writeError('You can also manually create a personal token at '.$scheme.'://'.$originUrl.'/profile/applications'); $this->io->writeError('You can also manually create a personal token at '.$scheme.'://'.$originUrl.'/profile/personal_access_tokens');
$this->io->writeError('Add it using "composer config gitlab-oauth.'.$originUrl.' <token>"'); $this->io->writeError('Add it using "composer config --global --auth gitlab-token.'.$originUrl.' <token>"');
continue; continue;
} }