From cd9193bc7fa35aa081c993410e53d78435510ced Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sat, 25 Jan 2025 09:56:18 +0800 Subject: [PATCH] Convert interfaces (introduced in after 11.0.0) from docblock to method For backward compatibility, we typically add new method to Interface using docblock on minor/patch releases. This should be a good time to declare them as actual method. Signed-off-by: Mior Muhammad Zaki --- src/Illuminate/Contracts/Routing/UrlGenerator.php | 14 +++++++++++--- .../Queue/Failed/FailedJobProviderInterface.php | 11 ++++++++--- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/Illuminate/Contracts/Routing/UrlGenerator.php b/src/Illuminate/Contracts/Routing/UrlGenerator.php index 0e542c9b43d8..ed159066c9d1 100644 --- a/src/Illuminate/Contracts/Routing/UrlGenerator.php +++ b/src/Illuminate/Contracts/Routing/UrlGenerator.php @@ -2,9 +2,6 @@ namespace Illuminate\Contracts\Routing; -/** - * @method string query(string $path, array $query = [], mixed $extra = [], bool|null $secure = null) - */ interface UrlGenerator { /** @@ -86,6 +83,17 @@ public function signedRoute($name, $parameters = [], $expiration = null, $absolu */ public function temporarySignedRoute($name, $expiration, $parameters = [], $absolute = true); + /** + * Generate an absolute URL with the given query parameters. + * + * @param string $path + * @param array $query + * @param mixed $extra + * @param bool|null $secure + * @return string + */ + public function query($path, $query = [], $extra = [], $secure = null); + /** * Get the URL to a controller action. * diff --git a/src/Illuminate/Queue/Failed/FailedJobProviderInterface.php b/src/Illuminate/Queue/Failed/FailedJobProviderInterface.php index bb52d1749ada..b7ce69fca8b4 100644 --- a/src/Illuminate/Queue/Failed/FailedJobProviderInterface.php +++ b/src/Illuminate/Queue/Failed/FailedJobProviderInterface.php @@ -2,9 +2,6 @@ namespace Illuminate\Queue\Failed; -/** - * @method array ids(string $queue = null) - */ interface FailedJobProviderInterface { /** @@ -18,6 +15,14 @@ interface FailedJobProviderInterface */ public function log($connection, $queue, $payload, $exception); + /** + * Get the IDs of all of the failed jobs. + * + * @param string|null $queue + * @return array + */ + public function ids($queue = null); + /** * Get a list of all of the failed jobs. *