From 1b55a4962835d16384f058baf7ae9686aa1d9bfd Mon Sep 17 00:00:00 2001 From: Janos Horvath Date: Tue, 21 May 2024 00:58:53 +0200 Subject: [PATCH 1/2] add query method to UrlGenerator interface using phpdoc so it is not a breaking change --- src/Illuminate/Contracts/Routing/UrlGenerator.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Illuminate/Contracts/Routing/UrlGenerator.php b/src/Illuminate/Contracts/Routing/UrlGenerator.php index a742862aed4d..22b167eaea17 100644 --- a/src/Illuminate/Contracts/Routing/UrlGenerator.php +++ b/src/Illuminate/Contracts/Routing/UrlGenerator.php @@ -2,6 +2,9 @@ namespace Illuminate\Contracts\Routing; +/** + * @method string query(string $path, array $query, mixed $extra, bool|null $secure) + */ interface UrlGenerator { /** From f09d4e22450c5e83faf65e53e0b111b62f8b2581 Mon Sep 17 00:00:00 2001 From: Janos Horvath Date: Tue, 21 May 2024 01:09:48 +0200 Subject: [PATCH 2/2] Use the exact line from the facade's phpdoc --- src/Illuminate/Contracts/Routing/UrlGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Contracts/Routing/UrlGenerator.php b/src/Illuminate/Contracts/Routing/UrlGenerator.php index 22b167eaea17..0e542c9b43d8 100644 --- a/src/Illuminate/Contracts/Routing/UrlGenerator.php +++ b/src/Illuminate/Contracts/Routing/UrlGenerator.php @@ -3,7 +3,7 @@ namespace Illuminate\Contracts\Routing; /** - * @method string query(string $path, array $query, mixed $extra, bool|null $secure) + * @method string query(string $path, array $query = [], mixed $extra = [], bool|null $secure = null) */ interface UrlGenerator {