Skip to content

Commit c172e4a

Browse files
committed
use v3 API for github
The previously used beta API has become stable and declared as v3. Using beta will return unexpected results that are not in sync with the API documentation.
1 parent 8efbaf4 commit c172e4a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/OAuth/OAuth2/Service/GitHub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ protected function getExtraOAuthHeaders()
203203
*/
204204
protected function getExtraApiHeaders()
205205
{
206-
return ['Accept' => 'application/vnd.github.beta+json'];
206+
return ['Accept' => 'application/vnd.github.v3+json'];
207207
}
208208

209209
/**

tests/Unit/OAuth2/Service/GitHubTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,6 @@ public function testGetExtraApiHeaders(): void
216216
$headers = $service->request('https://pieterhordijk.com/my/awesome/path');
217217

218218
self::assertArrayHasKey('Accept', $headers);
219-
self::assertSame('application/vnd.github.beta+json', $headers['Accept']);
219+
self::assertSame('application/vnd.github.v3+json', $headers['Accept']);
220220
}
221221
}

0 commit comments

Comments
 (0)