Skip to content

Commit

Permalink
Prepare 3.0 release and remove remaining deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
acrobat committed Dec 11, 2020
1 parent 9b0a7c3 commit 60c8b49
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 253 deletions.
15 changes: 15 additions & 0 deletions UPGRADE-3.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## UPGRADE from 2.x to 3.0

### General

* The `php-http/httplug` dependency requires is bumped to minimum ^2.1.
* A client implementing `psr/http-client-implementation` is required.
To upgrade your application (default install) switch from guzzle 6 to guzzle 7, see the install instructions in the [README file](README.md)
* All previous deprecated code in version 2 is removed.

### Authetication methods

* `Github\Client::AUTH_URL_TOKEN` use `Github\Client::AUTH_ACCESS_TOKEN` instead.
* `Github\Client::AUTH_URL_CLIENT_ID` use `Github\Client::AUTH_CLIENT_ID` instead.
* `Github\Client::AUTH_HTTP_TOKEN` use `Github\Client::AUTH_ACCESS_TOKEN` instead.
* `Github\Client::AUTH_HTTP_PASSWORD` use `Github\Client::AUTH_ACCESS_TOKEN` instead.
16 changes: 0 additions & 16 deletions lib/Github/Api/Repo.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Github\Api;

use Github\Api\Repository\Checks;
use Github\Api\Repository\Checks\CheckRuns;
use Github\Api\Repository\Checks\CheckSuites;
use Github\Api\Repository\Collaborators;
Expand Down Expand Up @@ -317,21 +316,6 @@ public function commits()
return new Commits($this->getClient());
}

/**
* Manage checks on a repository.
*
* @link https://developer.github.com/v3/checks/
* @deprecated since 2.17 and will be removed in 3.0. Use the "checkRuns" or "checkSuites" api's instead.
*
* @return Checks
*/
public function checks()
{
@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);

return new Checks($this->getClient());
}

/**
* @link https://docs.github.com/en/free-pro-team@latest/rest/reference/checks#check-runs
*/
Expand Down
107 changes: 0 additions & 107 deletions lib/Github/Api/Repository/Checks.php

This file was deleted.

10 changes: 0 additions & 10 deletions test/Github/Tests/Api/RepoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -585,16 +585,6 @@ public function shouldTransferRepository()
$this->assertEquals($expectedArray, $api->transfer('KnpLabs', 'php-github-api', 'github', [1234, 1235]));
}

/**
* @test
*/
public function shouldGetChecksApiObject()
{
$api = $this->getApiMock();

$this->assertInstanceOf(\Github\Api\Repository\Checks::class, $api->checks());
}

/**
* @return string
*/
Expand Down
120 changes: 0 additions & 120 deletions test/Github/Tests/Api/Repository/ChecksTest.php

This file was deleted.

0 comments on commit 60c8b49

Please sign in to comment.