Skip to content

Commit bd4f256

Browse files
committed
update: rename package name to phppkg/http-client
1 parent 75801bd commit bd4f256

40 files changed

+206
-196
lines changed

.github/workflows/php.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ on:
99

1010
jobs:
1111
test:
12-
name: Test on php ${{ matrix.php}} and ${{ matrix.os }}
13-
runs-on: ${{ matrix.os }}
12+
name: Test on php ${{ matrix.php}}
13+
runs-on: ubuntu-latest
1414
timeout-minutes: 10
1515
strategy:
1616
fail-fast: true
1717
matrix:
18-
php: [7.3, 7.4, 8.0]
19-
os: [ubuntu-latest, macOS-latest] # windows-latest,
18+
php: [7.3, 7.4, 8.0, 8.1]
19+
# os: [ubuntu-latest, macOS-latest] # windows-latest,
2020
include:
2121
- os: 'ubuntu-latest'
2222
php: '7.2'
@@ -45,4 +45,4 @@ jobs:
4545
# Docs: https://getcomposer.org/doc/articles/scripts.md
4646

4747
- name: Run test suite
48-
run: phpunit -v --debug
48+
run: phpunit --debug

.github/workflows/release.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
release:
1010
name: Test on php ${{ matrix.php}}
1111
runs-on: ubuntu-latest
12-
timeout-minutes: 10
12+
timeout-minutes: 5
1313
strategy:
1414
fail-fast: true
1515
matrix:
16-
php: [7.3]
16+
php: [8.0]
1717

1818
steps:
1919
- name: Checkout
@@ -25,10 +25,20 @@ jobs:
2525
echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV
2626
echo "RELEASE_NAME=$GITHUB_WORKFLOW" >> $GITHUB_ENV
2727
28-
- uses: meeDamian/[email protected]
28+
# more see https://github.com/inhere/kite
29+
- name: Generate changelog file
30+
id: changelog
31+
run: |
32+
wget -c -q https://github.com/inhere/kite/releases/latest/download/kite.phar
33+
php kite.phar git cl prev last --style gh-release --no-merges --fetch-tags --unshallow --file changelog.md
34+
cat changelog.md
35+
36+
# https://github.com/softprops/action-gh-release
37+
- name: Create release and upload assets
38+
uses: softprops/action-gh-release@v1
2939
with:
30-
gzip: false
31-
token: ${{ secrets.GITHUB_TOKEN }}
32-
tag: ${{ env.RELEASE_TAG }}
3340
name: ${{ env.RELEASE_TAG }}
34-
# files: kite-${{ env.RELEASE_TAG }}.phar
41+
tag_name: ${{ env.RELEASE_TAG }}
42+
body_path: changelog.md
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.php_cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

33
$header = <<<'EOF'
4-
This file is part of php-comp/http-client.
4+
This file is part of phppkg/http-client.
55
66
@author https://github.com/inhere
7-
@link https://github.com/php-comp/http-client
7+
@link https://github.com/phppkg/http-client
88
@license MIT
99
EOF;
1010

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# HTTP Client
22

3-
[![License](https://img.shields.io/packagist/l/php-comp/http-client.svg?style=flat-square)](LICENSE)
4-
[![Php Version](https://img.shields.io/badge/php-%3E=7.1-brightgreen.svg?maxAge=2592000)](https://packagist.org/packages/php-comp/http-client)
5-
[![Latest Stable Version](http://img.shields.io/packagist/v/php-comp/http-client.svg)](https://packagist.org/packages/php-comp/http-client)
6-
[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/php-comp/http-client)](https://github.com/php-comp/http-client)
7-
[![Github Actions Status](https://github.com/php-comp/http-client/workflows/Unit-tests/badge.svg)](https://github.com/php-comp/http-client/actions)
3+
[![License](https://img.shields.io/packagist/l/phppkg/http-client.svg?style=flat-square)](LICENSE)
4+
[![Php Version](https://img.shields.io/badge/php-%3E=7.2-brightgreen.svg?maxAge=2592000)](https://packagist.org/packages/phppkg/http-client)
5+
[![Latest Stable Version](http://img.shields.io/packagist/v/phppkg/http-client.svg)](https://packagist.org/packages/phppkg/http-client)
6+
[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/phppkg/http-client)](https://github.com/phppkg/http-client)
7+
[![Github Actions Status](https://github.com/phppkg/http-client/workflows/Unit-tests/badge.svg)](https://github.com/phppkg/http-client/actions)
88

99
PHP HTTP client library.
1010

@@ -16,15 +16,15 @@ PHP HTTP client library.
1616
## 安装
1717

1818
```bash
19-
composer require php-comp/http-client
19+
composer require phppkg/http-client
2020
```
2121

2222
## 使用
2323

2424
### 创建客户端实例
2525

2626
```php
27-
use PhpComp\Http\Client\Client;
27+
use PhpPkg\Http\Client\Client;
2828

2929
// use factory
3030
$client = Client::factory([
@@ -48,7 +48,7 @@ $client = CoClient::create($options);
4848
### 基本使用
4949

5050
```php
51-
use PhpComp\Http\Client\Client;
51+
use PhpPkg\Http\Client\Client;
5252

5353
$client = Client::factory([]);
5454

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "php-comp/http-client",
2+
"name": "phppkg/http-client",
33
"type": "library",
44
"description": "simple http client library of the php",
55
"keywords": [
@@ -9,13 +9,13 @@
99
"fopen",
1010
"curl"
1111
],
12-
"homepage": "https://github.com/php-comp/http-client",
12+
"homepage": "https://github.com/phppkg/http-client",
1313
"license": "MIT",
1414
"authors": [
1515
{
1616
"name": "inhere",
1717
"email": "[email protected]",
18-
"homepage": "http://www.yzone.net/"
18+
"homepage": "https://github.com/inhere"
1919
}
2020
],
2121
"require": {
@@ -25,10 +25,10 @@
2525
},
2626
"autoload": {
2727
"psr-4": {
28-
"PhpComp\\Http\\Client\\": "src/"
28+
"PhpPkg\\Http\\Client\\": "src/"
2929
}
3030
},
3131
"suggest": {
32-
"php-comp/http-message": "Very lightweight PSR-7 implements http message component"
32+
"phppkg/http-message": "Very lightweight PSR-7 implements http message component"
3333
}
3434
}

example/coreq.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22

3-
use PhpComp\Http\Client\Client;
4-
use PhpComp\Http\Client\ClientConst;
5-
use PhpComp\Http\Client\Swoole\CoClient;
3+
use PhpPkg\Http\Client\Client;
4+
use PhpPkg\Http\Client\ClientConst;
5+
use PhpPkg\Http\Client\Swoole\CoClient;
66

77
require dirname(__DIR__) . '/test/bootstrap.php';
88

example/demo.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

3-
use PhpComp\Http\Client\Client;
4-
use PhpComp\Http\Client\ClientConst;
3+
use PhpPkg\Http\Client\Client;
4+
use PhpPkg\Http\Client\ClientConst;
55

66
require dirname(__DIR__) . '/test/bootstrap.php';
77

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
stopOnFailure="false"
1111
>
1212
<testsuites>
13-
<testsuite name="php-comp http-client Test Suite">
13+
<testsuite name="phppkg http-client Test Suite">
1414
<directory>test</directory>
1515
</testsuite>
1616
</testsuites>

src/AbstractClient.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php declare(strict_types=1);
22
/**
3-
* This file is part of php-comp/http-client.
3+
* This file is part of phppkg/http-client.
44
*
55
* @author https://github.com/inhere
6-
* @link https://github.com/php-comp/http-client
6+
* @link https://github.com/phppkg/http-client
77
* @license MIT
88
*/
99

10-
namespace PhpComp\Http\Client;
10+
namespace PhpPkg\Http\Client;
1111

1212
use Closure;
1313
use InvalidArgumentException;
@@ -35,7 +35,7 @@
3535
/**
3636
* Class AbstractClient
3737
*
38-
* @package PhpComp\Http\Client
38+
* @package PhpPkg\Http\Client
3939
*/
4040
abstract class AbstractClient implements ClientInterface
4141
{

src/Client.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
<?php declare(strict_types=1);
22
/**
3-
* This file is part of php-comp/http-client.
3+
* This file is part of phppkg/http-client.
44
*
55
* @author https://github.com/inhere
6-
* @link https://github.com/php-comp/http-client
6+
* @link https://github.com/phppkg/http-client
77
* @license MIT
88
*/
99

10-
namespace PhpComp\Http\Client;
10+
namespace PhpPkg\Http\Client;
1111

1212
use InvalidArgumentException;
13-
use PhpComp\Http\Client\Curl\CurlClient;
14-
use PhpComp\Http\Client\Swoole\CoClient;
15-
use PhpComp\Http\Client\Swoole\CoClient2;
13+
use PhpPkg\Http\Client\Curl\CurlClient;
14+
use PhpPkg\Http\Client\Swoole\CoClient;
15+
use PhpPkg\Http\Client\Swoole\CoClient2;
1616
use RuntimeException;
1717
use function method_exists;
1818

1919
/**
2020
* Class Client
2121
*
22-
* @package PhpComp\Http\Client
22+
* @package PhpPkg\Http\Client
2323
*
2424
* @method static ClientInterface get(string $url, $params = null, array $headers = [], array $options = [])
2525
* @method static ClientInterface delete(string $url, $params = null, array $headers = [], array $options = [])

0 commit comments

Comments
 (0)