From 935677ccdf8351e896877f10c4ed2e13bf95f116 Mon Sep 17 00:00:00 2001 From: Freek Van der Herten Date: Mon, 25 Nov 2024 10:06:11 +0100 Subject: [PATCH] update to newer deps --- composer.json | 6 +++--- configure.php | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 37b0f95c..051d74da 100644 --- a/composer.json +++ b/composer.json @@ -25,9 +25,9 @@ "nunomaduro/collision": "^8.1.1||^7.10.0", "larastan/larastan": "^2.9", "orchestra/testbench": "^9.0.0||^8.22.0", - "pestphp/pest": "^2.34", - "pestphp/pest-plugin-arch": "^2.7", - "pestphp/pest-plugin-laravel": "^2.3", + "pestphp/pest": "^3.0", + "pestphp/pest-plugin-arch": "^3.0", + "pestphp/pest-plugin-laravel": "^3.0", "phpstan/extension-installer": "^1.3", "phpstan/phpstan-deprecation-rules": "^1.1", "phpstan/phpstan-phpunit": "^1.3", diff --git a/configure.php b/configure.php index 085b8780..f0a21d34 100644 --- a/configure.php +++ b/configure.php @@ -221,7 +221,7 @@ function guessGitHubUsername(): string } // fall back to using the username from the git remote - $remoteUrl = shell_exec('git config remote.origin.url'); + $remoteUrl = shell_exec('git config remote.origin.url') ?? ''; $remoteUrlParts = explode('/', str_replace(':', '/', trim($remoteUrl))); return $remoteUrlParts[1] ?? ''; @@ -229,9 +229,13 @@ function guessGitHubUsername(): string function guessGitHubVendorInfo($authorName, $username): array { - $remoteUrl = shell_exec('git config remote.origin.url'); + $remoteUrl = shell_exec('git config remote.origin.url') ?? ''; $remoteUrlParts = explode('/', str_replace(':', '/', trim($remoteUrl))); + if (! isset($remoteUrlParts[1])) { + return [$authorName, $username]; + } + $response = getGitHubApiEndpoint("orgs/{$remoteUrlParts[1]}"); if ($response === null) {