1
0
Fork 0

Merge branch '2.2' into 2.3

pull/10897/head
Jordi Boggiano 2022-06-22 09:16:23 +02:00
commit 16ee2e479f
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
6 changed files with 15 additions and 6 deletions

View File

@ -12,6 +12,9 @@ env:
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist" COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
COMPOSER_UPDATE_FLAGS: "" COMPOSER_UPDATE_FLAGS: ""
permissions:
contents: read
jobs: jobs:
tests: tests:
name: "CI" name: "CI"

View File

@ -8,6 +8,9 @@ on:
paths-ignore: paths-ignore:
- 'doc/**' - 'doc/**'
permissions:
contents: read
jobs: jobs:
tests: tests:
name: "Lint" name: "Lint"

View File

@ -12,6 +12,9 @@ env:
COMPOSER_FLAGS: "--ansi --no-interaction --prefer-dist" COMPOSER_FLAGS: "--ansi --no-interaction --prefer-dist"
SYMFONY_PHPUNIT_VERSION: "" SYMFONY_PHPUNIT_VERSION: ""
permissions:
contents: read
jobs: jobs:
tests: tests:
name: "PHPStan" name: "PHPStan"

View File

@ -460,7 +460,7 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
// check whether non-commitish are branches or tags, and fetch branches with the remote name // check whether non-commitish are branches or tags, and fetch branches with the remote name
$gitRef = $reference; $gitRef = $reference;
if (!Preg::isMatch('{^[a-f0-9]{40}$}', $reference) if (!Preg::isMatch('{^[a-f0-9]{40}$}', $reference)
&& $branches && null !== $branches
&& Preg::isMatch('{^\s+composer/'.preg_quote($reference).'$}m', $branches) && Preg::isMatch('{^\s+composer/'.preg_quote($reference).'$}m', $branches)
) { ) {
$command = sprintf('git checkout '.$force.'-B %s %s -- && git reset --hard %2$s --', ProcessExecutor::escape($branch), ProcessExecutor::escape('composer/'.$reference)); $command = sprintf('git checkout '.$force.'-B %s %s -- && git reset --hard %2$s --', ProcessExecutor::escape($branch), ProcessExecutor::escape('composer/'.$reference));
@ -472,7 +472,7 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
// try to checkout branch by name and then reset it so it's on the proper branch name // try to checkout branch by name and then reset it so it's on the proper branch name
if (Preg::isMatch('{^[a-f0-9]{40}$}', $reference)) { if (Preg::isMatch('{^[a-f0-9]{40}$}', $reference)) {
// add 'v' in front of the branch if it was stripped when generating the pretty name // add 'v' in front of the branch if it was stripped when generating the pretty name
if (!Preg::isMatch('{^\s+composer/'.preg_quote($branch).'$}m', $branches) && Preg::isMatch('{^\s+composer/v'.preg_quote($branch).'$}m', $branches)) { if (null !== $branches && !Preg::isMatch('{^\s+composer/'.preg_quote($branch).'$}m', $branches) && Preg::isMatch('{^\s+composer/v'.preg_quote($branch).'$}m', $branches)) {
$branch = 'v' . $branch; $branch = 'v' . $branch;
} }

View File

@ -437,7 +437,7 @@ if [ -d /proc/cygdrive ]; then
esac esac
fi fi
export COMPOSER_RUNTIME_BIN_DIR=\$(cd "\${self%[/\\\\]*}" > /dev/null; pwd) export COMPOSER_RUNTIME_BIN_DIR="\$(cd "\${self%[/\\\\]*}" > /dev/null; pwd)"
# If bash is sourcing this file, we have to source the target as well # If bash is sourcing this file, we have to source the target as well
bashSource="\$BASH_SOURCE" bashSource="\$BASH_SOURCE"

View File

@ -192,9 +192,9 @@ class AuthHelper
// fail if the console is not interactive // fail if the console is not interactive
if (!$this->io->isInteractive()) { if (!$this->io->isInteractive()) {
if ($statusCode === 401) { if ($statusCode === 401) {
$message = "The '" . $url . "' URL required authentication.\nYou must be using the interactive console to authenticate"; $message = "The '" . $url . "' URL required authentication (HTTP 401).\nYou must be using the interactive console to authenticate";
} elseif ($statusCode === 403) { } elseif ($statusCode === 403) {
$message = "The '" . $url . "' URL could not be accessed: " . $reason; $message = "The '" . $url . "' URL could not be accessed (HTTP 403): " . $reason;
} else { } else {
$message = "Unknown error code '" . $statusCode . "', reason: " . $reason; $message = "Unknown error code '" . $statusCode . "', reason: " . $reason;
} }
@ -210,7 +210,7 @@ class AuthHelper
return array('retry' => true, 'storeAuth' => false); return array('retry' => true, 'storeAuth' => false);
} }
throw new TransportException("Invalid credentials for '" . $url . "', aborting.", $statusCode); throw new TransportException("Invalid credentials (HTTP $statusCode) for '$url', aborting.", $statusCode);
} }
$this->io->writeError(' Authentication required (<info>'.$origin.'</info>):'); $this->io->writeError(' Authentication required (<info>'.$origin.'</info>):');