From bd4f256d5c1c8761699bba3c3d2bddf64ab2d63c Mon Sep 17 00:00:00 2001 From: Inhere Date: Tue, 7 Dec 2021 10:04:03 +0800 Subject: [PATCH] update: rename package name to phppkg/http-client --- .github/workflows/php.yml | 10 +++++----- .github/workflows/release.yml | 24 +++++++++++++++++------- .php_cs | 4 ++-- README.md | 16 ++++++++-------- composer.json | 10 +++++----- example/coreq.php | 6 +++--- example/demo.php | 4 ++-- phpunit.xml | 2 +- src/AbstractClient.php | 8 ++++---- src/Client.php | 14 +++++++------- src/ClientConst.php | 4 ++-- src/ClientInterface.php | 8 ++++---- src/ClientUtil.php | 10 +++++----- src/Curl/CurlClient.php | 20 ++++++++++---------- src/Curl/CurlClientInterface.php | 8 ++++---- src/Curl/CurlMulti.php | 10 +++++----- src/Curl/CurlUtil.php | 2 +- src/Exception/ClientException.php | 8 ++++---- src/Exception/NetworkException.php | 8 ++++---- src/Exception/RequestException.php | 8 ++++---- src/FOpenClient.php | 14 +++++++------- src/FSockClient.php | 16 ++++++++-------- src/FileClient.php | 14 +++++++------- src/Middleware/DemoMiddleware.php | 4 ++-- src/Middleware/MiddlewareInterface.php | 4 ++-- src/StreamClient.php | 16 ++++++++-------- src/StreamContext.php | 8 ++++---- src/Swoole/CoClient.php | 16 ++++++++-------- src/Swoole/CoClient2.php | 14 +++++++------- src/Traits/BuildRawHttpRequestTrait.php | 10 +++++----- src/Traits/ParseRawResponseTrait.php | 8 ++++---- src/Traits/StreamContextBuildTrait.php | 12 ++++++------ test/ClientTest.php | 10 +++++----- test/CurlClientTest.php | 12 ++++++------ test/FOpenClientTest.php | 10 +++++----- test/FSockClientTest.php | 10 +++++----- test/FileClientTest.php | 10 +++++----- test/StreamClientTest.php | 10 +++++----- test/Swoole/CoClientTest.php | 12 ++++++------ test/bootstrap.php | 8 ++++---- 40 files changed, 206 insertions(+), 196 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index b24b8bd..969bddb 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -9,14 +9,14 @@ on: jobs: test: - name: Test on php ${{ matrix.php}} and ${{ matrix.os }} - runs-on: ${{ matrix.os }} + name: Test on php ${{ matrix.php}} + runs-on: ubuntu-latest timeout-minutes: 10 strategy: fail-fast: true matrix: - php: [7.3, 7.4, 8.0] - os: [ubuntu-latest, macOS-latest] # windows-latest, + php: [7.3, 7.4, 8.0, 8.1] +# os: [ubuntu-latest, macOS-latest] # windows-latest, include: - os: 'ubuntu-latest' php: '7.2' @@ -45,4 +45,4 @@ jobs: # Docs: https://getcomposer.org/doc/articles/scripts.md - name: Run test suite - run: phpunit -v --debug + run: phpunit --debug diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d38e675..21de28c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,11 +9,11 @@ jobs: release: name: Test on php ${{ matrix.php}} runs-on: ubuntu-latest - timeout-minutes: 10 + timeout-minutes: 5 strategy: fail-fast: true matrix: - php: [7.3] + php: [8.0] steps: - name: Checkout @@ -25,10 +25,20 @@ jobs: echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV echo "RELEASE_NAME=$GITHUB_WORKFLOW" >> $GITHUB_ENV - - uses: meeDamian/github-release@2.0 + # more see https://github.com/inhere/kite + - name: Generate changelog file + id: changelog + run: | + wget -c -q https://github.com/inhere/kite/releases/latest/download/kite.phar + php kite.phar git cl prev last --style gh-release --no-merges --fetch-tags --unshallow --file changelog.md + cat changelog.md + + # https://github.com/softprops/action-gh-release + - name: Create release and upload assets + uses: softprops/action-gh-release@v1 with: - gzip: false - token: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ env.RELEASE_TAG }} name: ${{ env.RELEASE_TAG }} -# files: kite-${{ env.RELEASE_TAG }}.phar + tag_name: ${{ env.RELEASE_TAG }} + body_path: changelog.md + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.php_cs b/.php_cs index 0eb4481..de644b0 100644 --- a/.php_cs +++ b/.php_cs @@ -1,10 +1,10 @@ - + test diff --git a/src/AbstractClient.php b/src/AbstractClient.php index e3891e3..1158731 100644 --- a/src/AbstractClient.php +++ b/src/AbstractClient.php @@ -1,13 +1,13 @@ download($url, $file); diff --git a/test/FOpenClientTest.php b/test/FOpenClientTest.php index caf9edb..2128129 100644 --- a/test/FOpenClientTest.php +++ b/test/FOpenClientTest.php @@ -1,21 +1,21 @@ __DIR__, - 'PhpComp\Http\Client\\' => dirname(__DIR__) . '/src', + 'PhpPkg\Http\ClientTest\\' => __DIR__, + 'PhpPkg\Http\Client\\' => dirname(__DIR__) . '/src', ]; spl_autoload_register(static function ($class) use ($namespaces): void {