Skip to content

Commit 282c9ce

Browse files
Merge branch '2.1' into 3.0
2 parents 6efac7d + e46d796 commit 282c9ce

File tree

6 files changed

+88
-17
lines changed

6 files changed

+88
-17
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77
/.gitignore export-ignore
88
/phpunit.xml.dist export-ignore
99
/sami.php export-ignore
10+
/CHANGELOG.md export-ignore
1011
/README.md export-ignore

CHANGELOG.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
CHANGE LOG
2+
==========
3+
4+
5+
## V2.1.4 (Upcoming)
6+
7+
* Fixed repository diffstat
8+
9+
10+
## V2.1.3 (21/05/2020)
11+
12+
* Fixed pagination of PRs
13+
14+
15+
## V2.1.2 (12/04/2020)
16+
17+
* Updated funding information
18+
19+
20+
## V2.1.1 (24/01/2020)
21+
22+
* Fixes patches API
23+
24+
25+
## V2.1 (03/11/2019)
26+
27+
* Support HTTPlug v2
28+
29+
30+
## V2.0.2 (23/08/2019)
31+
32+
* Official PHP 7.4 support
33+
34+
35+
## V2.0.1 (30/06/2019)
36+
37+
* Fixed naming collisions
38+
* Removed unused dependency
39+
40+
41+
## V2.0 (29/06/2019)
42+
43+
* Update against latest API spec
44+
* Rework HTTP caching
45+
46+
47+
## V1.1.1 (29/06/2019)
48+
49+
* Fixed HTTP exception processing edge case
50+
51+
52+
## V1.1 (05/04/2018)
53+
54+
* Add way to set base URL
55+
* Fixed commit statuses
56+
57+
58+
## V1.0.1 (03/04/2018)
59+
60+
* Present the error detail if possible too
61+
* Support status keys with slashes
62+
63+
64+
## V1.0 (02/04/2018)
65+
66+
* Initial release

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,27 @@ This is strongly based on [php-github-api](https://github.com/KnpLabs/php-github
1818
* [GitLab](https://gitlab.com/) - [m4tthumphrey/php-gitlab-api](https://packagist.org/packages/m4tthumphrey/php-gitlab-api) by [Matt Humphrey](https://github.com/m4tthumphrey) et al.
1919
* [Bitbucket](https://bitbucket.org/) - [bitbucket/client](https://packagist.org/packages/bitbucket/client) which is this package!
2020

21+
Feel free to check out the [change log](CHANGELOG.md), [releases](https://github.com/BitbucketAPI/Client/releases), [security policy](https://github.com/BitbucketAPI/Client/security/policy), [license](LICENSE), [code of conduct](.github/CODE_OF_CONDUCT.md), and [contribution guidelines](.github/CONTRIBUTING.md).
22+
2123

2224
## Installation
2325

2426
This version requires [PHP](https://php.net) 7.2-7.4.
2527

26-
To get the latest version, simply require the project using [Composer](https://getcomposer.org). You will need to install any package that "provides" `php-http/client-implementation`. Most users will want:
28+
To get the latest version, simply require the project using [Composer](https://getcomposer.org). You will need to install any package that "provides" `php-http/client-implementation`. Pure PHP users will want something like:
2729

2830
```bash
2931
$ composer require bitbucket/client php-http/guzzle6-adapter:^2.0
3032
```
3133

32-
There is also a Laravel bridge for this package: [`graham-campbell/bitbucket`](https://github.com/GrahamCampbell/Laravel-Bitbucket).
34+
Laravel users will want something like:
35+
36+
```bash
37+
$ composer require graham-campbell/bitbucket php-http/guzzle6-adapter:^2.0
38+
```
39+
40+
We are decoupled from any HTTP messaging client with help by [HTTPlug](http://httplug.io). You can visit [HTTPlug for library users](https://docs.php-http.org/en/latest/httplug/users.html) to get more information about installing HTTPlug related packages. [`graham-campbell/bitbucket`](https://github.com/GrahamCampbell/Laravel-Bitbucket) is by [Graham Campbell](https://github.com/GrahamCampbell)
41+
3342

3443
## Usage
3544

composer.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@
3838
"config": {
3939
"preferred-install": "dist"
4040
},
41-
"extra": {
42-
"branch-alias": {
43-
"dev-master": "2.1-dev"
44-
}
45-
},
4641
"minimum-stability": "dev",
4742
"prefer-stable": true
4843
}

src/Api/Repositories/Users.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
use Bitbucket\Api\Repositories\Users\DeployKeys;
2323
use Bitbucket\Api\Repositories\Users\Deployments;
2424
use Bitbucket\Api\Repositories\Users\Diffs;
25-
use Bitbucket\Api\Repositories\Users\DiffStats;
25+
use Bitbucket\Api\Repositories\Users\DiffStat;
2626
use Bitbucket\Api\Repositories\Users\Downloads;
2727
use Bitbucket\Api\Repositories\Users\Environments;
2828
use Bitbucket\Api\Repositories\Users\FileHistory;
@@ -214,11 +214,11 @@ public function diffs(string $repo)
214214
/**
215215
* @param string $repo
216216
*
217-
* @return \Bitbucket\Api\Repositories\Users\DiffStats
217+
* @return \Bitbucket\Api\Repositories\Users\DiffStat
218218
*/
219-
public function diffStats(string $repo)
219+
public function diffStat(string $repo)
220220
{
221-
return new DiffStats($this->getHttpClient(), $this->username, $repo);
221+
return new DiffStat($this->getHttpClient(), $this->username, $repo);
222222
}
223223

224224
/**

src/Api/Repositories/Users/DiffStats.php renamed to src/Api/Repositories/Users/DiffStat.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
namespace Bitbucket\Api\Repositories\Users;
1515

1616
/**
17-
* The diffs stats api class.
17+
* The diffs stat api class.
1818
*
1919
* @author Graham Campbell <[email protected]>
2020
*/
21-
class DiffStats extends AbstractUsersApi
21+
class DiffStat extends AbstractUsersApi
2222
{
2323
/**
2424
* @param string $spec
@@ -30,22 +30,22 @@ class DiffStats extends AbstractUsersApi
3030
*/
3131
public function download(string $spec, array $params = [])
3232
{
33-
$path = $this->buildDiffStatssPath($spec);
33+
$path = $this->buildDiffStatPath($spec);
3434

3535
return $this->get($path, $params);
3636
}
3737

3838
/**
39-
* Build the diff stats path from the given parts.
39+
* Build the diff stat path from the given parts.
4040
*
4141
* @param string[] $parts
4242
*
4343
* @throws \Bitbucket\Exception\InvalidArgumentException
4444
*
4545
* @return string
4646
*/
47-
protected function buildDiffStatssPath(string ...$parts)
47+
protected function buildDiffStatPath(string ...$parts)
4848
{
49-
return static::buildPath('repositories', $this->username, $this->repo, 'diffstats', ...$parts);
49+
return static::buildPath('repositories', $this->username, $this->repo, 'diffstat', ...$parts);
5050
}
5151
}

0 commit comments

Comments
 (0)