Skip to content

Commit 197daa9

Browse files
committed
Prepare 3.0 release and remove remaining deprecated code
1 parent 9b0a7c3 commit 197daa9

File tree

5 files changed

+21
-253
lines changed

5 files changed

+21
-253
lines changed

UPGRADE-3.0.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## UPGRADE from 2.x to 3.0
2+
3+
### General
4+
5+
* The `php-http/httplug` dependency requires is bumped to minimum ^2.1.
6+
* A client implementing `psr/http-client-implementation` is required.
7+
To upgrade your application (default install) switch from guzzle 6 to guzzle 7 (or replace `php-http/guzzle6-adapter` with any `psr/http-client-implementation`), see the install instructions in the [README file](README.md)
8+
* All previous deprecated code in version 2 is removed.
9+
* The following classes are now final
10+
* `Github\HttpClient\Message\ResponseMediator`
11+
* `Github\HttpClient\Plugin\Authentication`
12+
* `Github\HttpClient\Plugin\GithubExceptionThrower`
13+
* `Github\HttpClient\Plugin\History`
14+
* `Github\HttpClient\Plugin\PathPrepend`
15+
16+
### Authetication methods
17+
18+
* `Github\Client::AUTH_URL_TOKEN` use `Github\Client::AUTH_ACCESS_TOKEN` instead.
19+
* `Github\Client::AUTH_URL_CLIENT_ID` use `Github\Client::AUTH_CLIENT_ID` instead.
20+
* `Github\Client::AUTH_HTTP_TOKEN` use `Github\Client::AUTH_ACCESS_TOKEN` instead.
21+
* `Github\Client::AUTH_HTTP_PASSWORD` use `Github\Client::AUTH_ACCESS_TOKEN` instead.

lib/Github/Api/Repo.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Github\Api;
44

5-
use Github\Api\Repository\Checks;
65
use Github\Api\Repository\Checks\CheckRuns;
76
use Github\Api\Repository\Checks\CheckSuites;
87
use Github\Api\Repository\Collaborators;
@@ -317,21 +316,6 @@ public function commits()
317316
return new Commits($this->getClient());
318317
}
319318

320-
/**
321-
* Manage checks on a repository.
322-
*
323-
* @link https://developer.github.com/v3/checks/
324-
* @deprecated since 2.17 and will be removed in 3.0. Use the "checkRuns" or "checkSuites" api's instead.
325-
*
326-
* @return Checks
327-
*/
328-
public function checks()
329-
{
330-
@trigger_error(sprintf('The "%s" is deprecated since knp-labs/php-github-api 2.17 and will be removed in knp-labs/php-github-api 3.0. Use the "checkRuns" or "checkSuites" api\'s instead.', __METHOD__), E_USER_DEPRECATED);
331-
332-
return new Checks($this->getClient());
333-
}
334-
335319
/**
336320
* @link https://docs.github.com/en/free-pro-team@latest/rest/reference/checks#check-runs
337321
*/

lib/Github/Api/Repository/Checks.php

Lines changed: 0 additions & 107 deletions
This file was deleted.

test/Github/Tests/Api/RepoTest.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -585,16 +585,6 @@ public function shouldTransferRepository()
585585
$this->assertEquals($expectedArray, $api->transfer('KnpLabs', 'php-github-api', 'github', [1234, 1235]));
586586
}
587587

588-
/**
589-
* @test
590-
*/
591-
public function shouldGetChecksApiObject()
592-
{
593-
$api = $this->getApiMock();
594-
595-
$this->assertInstanceOf(\Github\Api\Repository\Checks::class, $api->checks());
596-
}
597-
598588
/**
599589
* @return string
600590
*/

test/Github/Tests/Api/Repository/ChecksTest.php

Lines changed: 0 additions & 120 deletions
This file was deleted.

0 commit comments

Comments
 (0)