From 6e28f90733e76fdebaa5131be6f704402b8702ec Mon Sep 17 00:00:00 2001 From: SmetDenis Date: Sun, 19 Jul 2026 20:03:44 +0400 Subject: [PATCH 1/2] build: PHP 8.3 floor, major 8.0, jbzoo/* ^8.0, toolchain 8.0 --- .github/workflows/main.yml | 28 +++++++++++++++++----------- README.md | 16 ++++++++++++---- composer.json | 12 ++++++------ phpunit.xml.dist | 22 +++++++++------------- src/HttpClient.php | 3 --- src/Response.php | 1 - 6 files changed, 44 insertions(+), 38 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1020898..79d0220 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,12 +15,15 @@ permissions: contents: read on: + schedule: + - cron: '0 4 * * *' # daily 04:00 UTC canary keepalive pull_request: branches: - "*" push: branches: - 'master' + workflow_dispatch: {} env: COLUMNS: 120 @@ -34,12 +37,12 @@ jobs: JBZOO_COMPOSER_UPDATE_FLAGS: ${{ matrix.composer_flags }} strategy: matrix: - php-version: [ 8.2, 8.3, 8.4 ] + php-version: [ 8.3, 8.4, 8.5 ] coverage: [ xdebug, none ] composer_flags: [ "--prefer-lowest", "" ] steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v7 with: fetch-depth: 0 @@ -61,18 +64,19 @@ jobs: run: make test --no-print-directory - name: Uploading coverage to coveralls - if: ${{ matrix.coverage == 'xdebug' }} + if: '${{ matrix.coverage == ''xdebug'' }}' continue-on-error: true env: - COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: make report-coveralls --no-print-directory || true - name: Upload Artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 continue-on-error: true with: name: PHPUnit - ${{ matrix.php-version }} - ${{ matrix.coverage }} path: build/ + overwrite: true linters: @@ -80,10 +84,10 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: [ 8.2, 8.3, 8.4 ] + php-version: [ 8.3, 8.4, 8.5 ] steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v7 with: fetch-depth: 0 @@ -102,11 +106,12 @@ jobs: run: make codestyle --no-print-directory - name: Upload Artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 continue-on-error: true with: name: Linters - ${{ matrix.php-version }} path: build/ + overwrite: true report: @@ -114,10 +119,10 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: [ 8.2, 8.3, 8.4 ] + php-version: [ 8.3, 8.4, 8.5 ] steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v7 with: fetch-depth: 0 @@ -136,8 +141,9 @@ jobs: run: make report-all --no-print-directory - name: Upload Artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 continue-on-error: true with: name: Reports - ${{ matrix.php-version }} path: build/ + overwrite: true diff --git a/README.md b/README.md index bf07d7d..53f0dc5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,15 @@ # JBZoo / Http-Client -[![CI](https://github.com/JBZoo/Http-Client/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/JBZoo/Http-Client/actions/workflows/main.yml?query=branch%3Amaster) [![Coverage Status](https://coveralls.io/repos/github/JBZoo/Http-Client/badge.svg?branch=master)](https://coveralls.io/github/JBZoo/Http-Client?branch=master) [![Psalm Coverage](https://shepherd.dev/github/JBZoo/Http-Client/coverage.svg)](https://shepherd.dev/github/JBZoo/Http-Client) [![Psalm Level](https://shepherd.dev/github/JBZoo/Http-Client/level.svg)](https://shepherd.dev/github/JBZoo/Http-Client) [![CodeFactor](https://www.codefactor.io/repository/github/jbzoo/http-client/badge)](https://www.codefactor.io/repository/github/jbzoo/http-client/issues) -[![Stable Version](https://poser.pugx.org/jbzoo/http-client/version)](https://packagist.org/packages/jbzoo/http-client/) [![Total Downloads](https://poser.pugx.org/jbzoo/http-client/downloads)](https://packagist.org/packages/jbzoo/http-client/stats) [![Dependents](https://poser.pugx.org/jbzoo/http-client/dependents)](https://packagist.org/packages/jbzoo/http-client/dependents?order_by=downloads) [![GitHub License](https://img.shields.io/github/license/jbzoo/http-client)](https://github.com/JBZoo/Http-Client/blob/master/LICENSE) +[![CI](https://github.com/JBZoo/Http-Client/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/JBZoo/Http-Client/actions/workflows/main.yml?query=branch%3Amaster) +[![Coverage Status](https://coveralls.io/repos/github/JBZoo/Http-Client/badge.svg?branch=master)](https://coveralls.io/github/JBZoo/Http-Client?branch=master) +[![Psalm Coverage](https://shepherd.dev/github/JBZoo/Http-Client/coverage.svg)](https://shepherd.dev/github/JBZoo/Http-Client) +[![Psalm Level](https://shepherd.dev/github/JBZoo/Http-Client/level.svg)](https://shepherd.dev/github/JBZoo/Http-Client) +[![CodeFactor](https://www.codefactor.io/repository/github/jbzoo/http-client/badge)](https://www.codefactor.io/repository/github/jbzoo/http-client/issues) + +[![Stable Version](https://poser.pugx.org/jbzoo/http-client/version)](https://packagist.org/packages/jbzoo/http-client/) +[![Total Downloads](https://poser.pugx.org/jbzoo/http-client/downloads)](https://packagist.org/packages/jbzoo/http-client/stats) +[![Dependents](https://poser.pugx.org/jbzoo/http-client/dependents)](https://packagist.org/packages/jbzoo/http-client/dependents?order_by=downloads) +[![GitHub License](https://img.shields.io/github/license/jbzoo/http-client)](https://github.com/JBZoo/Http-Client/blob/master/LICENSE) A simple, intuitive PHP HTTP client that provides a clean wrapper around popular HTTP libraries like Guzzle and rmccue/requests. Make HTTP requests with minimal code and maximum flexibility. @@ -13,12 +21,12 @@ A simple, intuitive PHP HTTP client that provides a clean wrapper around popular - **Flexible Response Handling**: Access response data via methods, properties, or array syntax - **JSON Support**: Built-in JSON parsing with JBZoo/Data integration - **Event System**: Hook into request lifecycle with event listeners -- **PHP 8.2+ Ready**: Modern PHP with strict typing and best practices +- **PHP 8.3+ Ready**: Modern PHP with strict typing and best practices ## Requirements -- PHP 8.2 or higher +- PHP 8.3 or higher - ext-json ## Installation diff --git a/composer.json b/composer.json index ba4c976..3217843 100644 --- a/composer.json +++ b/composer.json @@ -27,16 +27,16 @@ "prefer-stable" : true, "require" : { - "php" : "^8.2", + "php" : "^8.3", "ext-json" : "*", - "jbzoo/data" : "^7.2", - "jbzoo/utils" : "^7.3", - "jbzoo/event" : "^7.0.2" + "jbzoo/data" : "^8.0", + "jbzoo/utils" : "^8.0", + "jbzoo/event" : "^8.0" }, "require-dev" : { - "jbzoo/toolbox-dev" : "^7.2", + "jbzoo/toolbox-dev" : "^8.0", "rmccue/requests" : ">=2.0.15", "guzzlehttp/guzzle" : ">=7.10.0" }, @@ -62,7 +62,7 @@ "extra" : { "branch-alias" : { - "dev-master" : "7.x-dev" + "dev-master" : "8.x-dev" } } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 5d0ba26..1eb87db 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -10,24 +10,14 @@ @copyright Copyright (C) JBZoo.com, All rights reserved. @see https://github.com/JBZoo/Http-Client --> - - - - src - + stopOnRisky="false"> + @@ -44,4 +34,10 @@ + + + + src + + diff --git a/src/HttpClient.php b/src/HttpClient.php index 0df6b70..a4710cd 100644 --- a/src/HttpClient.php +++ b/src/HttpClient.php @@ -105,9 +105,6 @@ public function setEventManager(EventManager $eManager): self return $this; } - /** - * @psalm-suppress PossiblyUnusedReturnValue - */ public function trigger(string $eventName, array $context = [], ?\Closure $callback = null): int { if ($this->eManager !== null) { diff --git a/src/Response.php b/src/Response.php index 0111e44..3eefb1b 100644 --- a/src/Response.php +++ b/src/Response.php @@ -36,7 +36,6 @@ final class Response /** * @return null|array|float|int|string|string[] - * @psalm-suppress PossiblyUnusedReturnValue */ public function __get(string $name) { From 5fd2814562efe89384a5d0d4270aaa77d442caaa Mon Sep 17 00:00:00 2001 From: SmetDenis Date: Mon, 20 Jul 2026 10:01:25 +0400 Subject: [PATCH 2/2] docs: refresh PHP floor and dependency versions for the 8.0 line --- CLAUDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index bff34c9..26d6e74 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -69,7 +69,7 @@ src/ ``` ## Dependencies -- **Required**: PHP 8.2+, jbzoo/data, jbzoo/utils, jbzoo/event +- **Required**: PHP 8.3+, jbzoo/data, jbzoo/utils, jbzoo/event - **Suggested**: guzzlehttp/guzzle (recommended) or rmccue/requests (fallback) - **Dev Dependencies**: jbzoo/toolbox-dev for code quality tools