From 4e8cb0a2fd768062dd5af21c7adf6b8eea1d5418 Mon Sep 17 00:00:00 2001 From: jihtsan <15151999611@163.com> Date: Fri, 23 Oct 2026 15:23:44 +0800 Subject: [PATCH] Use the Search API in the issue search example Closes #1118. Replace the removed Issue::find call and extract issues from the search response items, with an is:issue filter and first-page semantics. --- doc/issues.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/issues.md b/doc/issues.md index 317f4babebe..e9ad23a653c 100644 --- a/doc/issues.md +++ b/doc/issues.md @@ -20,10 +20,11 @@ Returns an array of issues. ### Search issues in a project ```php -$issues = $client->api('issue')->find('KnpLabs', 'php-github-api', 'closed', 'bug'); +$result = $client->api('search')->issues('repo:KnpLabs/php-github-api is:issue is:closed bug'); +$issues = $result['items']; ``` -Returns an array of closed issues matching the "bug" term. For more complex searches, use the [search api](search.md) which supports the advanced GitHub search syntax. +Uses the [Search API](search.md) to find closed issues in this repository matching the "bug" term. The search response contains `total_count`, `incomplete_results`, and `items`; `$issues` contains the issues from the returned page. The `is:issue` qualifier excludes pull requests. ### Get information about an issue