From 62126e1a402c2f5252a1e6026c20765ceae49252 Mon Sep 17 00:00:00 2001 From: Ayesh Karunaratne Date: Fri, 15 Mar 2024 19:55:25 +0700 Subject: [PATCH] [PHP 8.4] Fix for implicit nullability deprecation (#11888) Fixes a issue that emits a deprecation notice on PHP 8.4. See: - [RFC](https://wiki.php.net/rfc/deprecate-implicitly-nullable-types) - [PHP 8.4: Implicitly nullable parameter declarations deprecated](https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated) --- src/Composer/Util/Git.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Util/Git.php b/src/Composer/Util/Git.php index 67af22e8d..64b643216 100644 --- a/src/Composer/Util/Git.php +++ b/src/Composer/Util/Git.php @@ -298,7 +298,7 @@ class Git return true; } - public function fetchRefOrSyncMirror(string $url, string $dir, string $ref, string $prettyVersion = null): bool + public function fetchRefOrSyncMirror(string $url, string $dir, string $ref, ?string $prettyVersion = null): bool { if ($this->checkRefIsInMirror($dir, $ref)) { if (Preg::isMatch('{^[a-f0-9]{40}$}', $ref) && $prettyVersion !== null) {