From 58108b3518a06f8669c5dc244860f642cb94d65e Mon Sep 17 00:00:00 2001 From: SmetDenis Date: Sun, 19 Jul 2026 00:22:57 +0400 Subject: [PATCH 1/4] build: PHP 8.3 floor, major 8.0, jbzoo/* ^8.0, toolchain 8.0 --- .github/workflows/main.yml | 24 +++++++++++++++--------- .phan.php | 2 +- README.md | 12 ++++++++++-- composer.json | 15 +++++++-------- phpunit.xml.dist | 18 ++++++++---------- tests/PHPUnitHttpServerTest.php | 8 ++++++++ 6 files changed, 49 insertions(+), 30 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 65513be..5f18810 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 @@ -71,11 +74,12 @@ jobs: 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: @@ -83,10 +87,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 @@ -105,11 +109,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: @@ -117,10 +122,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 @@ -139,8 +144,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/.phan.php b/.phan.php index fadd838..b6798c6 100644 --- a/.phan.php +++ b/.phan.php @@ -30,7 +30,7 @@ // Libs 'vendor/jbzoo/data', - 'vendor/jbzoo/http-client', + // 'vendor/jbzoo/http-client', // removed with http-client during the 8.0 batch; re-add in Wave B 'vendor/jbzoo/utils', 'vendor/jbzoo/markdown', diff --git a/README.md b/README.md index 9599ffa..41c009e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,15 @@ # JBZoo / PHPUnit -[![CI](https://github.com/JBZoo/PHPUnit/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/JBZoo/PHPUnit/actions/workflows/main.yml?query=branch%3Amaster) [![Coverage Status](https://coveralls.io/repos/github/JBZoo/PHPUnit/badge.svg?branch=master)](https://coveralls.io/github/JBZoo/PHPUnit?branch=master) [![Psalm Coverage](https://shepherd.dev/github/JBZoo/PHPUnit/coverage.svg)](https://shepherd.dev/github/JBZoo/PHPUnit) [![Psalm Level](https://shepherd.dev/github/JBZoo/PHPUnit/level.svg)](https://shepherd.dev/github/JBZoo/PHPUnit) [![CodeFactor](https://www.codefactor.io/repository/github/jbzoo/phpunit/badge)](https://www.codefactor.io/repository/github/jbzoo/phpunit/issues) -[![Stable Version](https://poser.pugx.org/jbzoo/phpunit/version)](https://packagist.org/packages/jbzoo/phpunit/) [![Total Downloads](https://poser.pugx.org/jbzoo/phpunit/downloads)](https://packagist.org/packages/jbzoo/phpunit/stats) [![Dependents](https://poser.pugx.org/jbzoo/phpunit/dependents)](https://packagist.org/packages/jbzoo/phpunit/dependents?order_by=downloads) [![GitHub License](https://img.shields.io/github/license/jbzoo/phpunit)](https://github.com/JBZoo/PHPUnit/blob/master/LICENSE) +[![CI](https://github.com/JBZoo/PHPUnit/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/JBZoo/PHPUnit/actions/workflows/main.yml?query=branch%3Amaster) +[![Coverage Status](https://coveralls.io/repos/github/JBZoo/PHPUnit/badge.svg?branch=master)](https://coveralls.io/github/JBZoo/PHPUnit?branch=master) +[![Psalm Coverage](https://shepherd.dev/github/JBZoo/PHPUnit/coverage.svg)](https://shepherd.dev/github/JBZoo/PHPUnit) +[![Psalm Level](https://shepherd.dev/github/JBZoo/PHPUnit/level.svg)](https://shepherd.dev/github/JBZoo/PHPUnit) +[![CodeFactor](https://www.codefactor.io/repository/github/jbzoo/phpunit/badge)](https://www.codefactor.io/repository/github/jbzoo/phpunit/issues) + +[![Stable Version](https://poser.pugx.org/jbzoo/phpunit/version)](https://packagist.org/packages/jbzoo/phpunit/) +[![Total Downloads](https://poser.pugx.org/jbzoo/phpunit/downloads)](https://packagist.org/packages/jbzoo/phpunit/stats) +[![Dependents](https://poser.pugx.org/jbzoo/phpunit/dependents)](https://packagist.org/packages/jbzoo/phpunit/dependents?order_by=downloads) +[![GitHub License](https://img.shields.io/github/license/jbzoo/phpunit)](https://github.com/JBZoo/PHPUnit/blob/master/LICENSE) PHPUnit toolbox with short assertion aliases and useful testing utilities. This library provides a more concise and readable way to write tests by offering shorter function names for common PHPUnit assertions. diff --git a/composer.json b/composer.json index 950bd30..f9a0dfc 100644 --- a/composer.json +++ b/composer.json @@ -26,21 +26,20 @@ "prefer-stable" : true, "require" : { - "php" : "^8.2", + "php" : "^8.3", "ext-filter" : "*", "ext-mbstring" : "*", "phpunit/phpunit" : "^11.5.41", "ulrichsg/getopt-php" : ">=4.0.4", - "jbzoo/markdown" : "^7.0.1" + "jbzoo/markdown" : "^8.0" }, "require-dev" : { - "jbzoo/toolbox-dev" : "^7.1", - "jbzoo/codestyle" : "^7.1.6", - "jbzoo/http-client" : "^7.1", - "jbzoo/data" : "^7.1", - "jbzoo/utils" : "^7.2", + "jbzoo/toolbox-dev" : "^8.0", + "jbzoo/codestyle" : "^8.0", + "jbzoo/data" : "^8.0", + "jbzoo/utils" : "^8.0", "guzzlehttp/guzzle" : ">=7.10.0", "symfony/process" : ">=7.3.4" @@ -66,7 +65,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 930818b..5d5d26f 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -10,16 +10,8 @@ @copyright Copyright (C) JBZoo.com, All rights reserved. @see https://github.com/JBZoo/PHPUnit --> - - - - src - + + @@ -37,4 +29,10 @@ + + + + src + + diff --git a/tests/PHPUnitHttpServerTest.php b/tests/PHPUnitHttpServerTest.php index 76371fd..0b5f80b 100644 --- a/tests/PHPUnitHttpServerTest.php +++ b/tests/PHPUnitHttpServerTest.php @@ -16,6 +16,7 @@ namespace JBZoo\PHPUnit; +use JBZoo\HttpClient\HttpClient; use JBZoo\HttpClient\Response; use JBZoo\Utils\FS; use JBZoo\Utils\Sys; @@ -26,6 +27,13 @@ protected function setUp(): void { parent::setUp(); + // Interim (major 8.0 toolchain batch): jbzoo/http-client is temporarily removed from + // require-dev because its 7.x line pins jbzoo/data ^7.2 / jbzoo/utils ^7.3, unsatisfiable + // against this batch's ^8.0. It is re-added at ^8.0 in Wave B; drop this guard then. + if (!\class_exists(HttpClient::class)) { + skip('jbzoo/http-client is not installed during the 8.0 toolchain batch (re-added in Wave B).'); + } + FS::rmDir(PROJECT_BUILD . '/coverage_cov'); FS::rmDir(PROJECT_BUILD . '/coverage_html'); FS::rmDir(PROJECT_BUILD . '/coverage_xml'); From e89bc785764e2269569c3394e2b93b8be142d00c Mon Sep 17 00:00:00 2001 From: SmetDenis Date: Sun, 19 Jul 2026 20:03:45 +0400 Subject: [PATCH 2/4] build: re-add jbzoo/http-client ^8.0 dev dep (Wave B) --- .phan.php | 2 +- composer.json | 1 + tests/PHPUnitHttpServerTest.php | 8 -------- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.phan.php b/.phan.php index b6798c6..fadd838 100644 --- a/.phan.php +++ b/.phan.php @@ -30,7 +30,7 @@ // Libs 'vendor/jbzoo/data', - // 'vendor/jbzoo/http-client', // removed with http-client during the 8.0 batch; re-add in Wave B + 'vendor/jbzoo/http-client', 'vendor/jbzoo/utils', 'vendor/jbzoo/markdown', diff --git a/composer.json b/composer.json index f9a0dfc..77887be 100644 --- a/composer.json +++ b/composer.json @@ -40,6 +40,7 @@ "jbzoo/codestyle" : "^8.0", "jbzoo/data" : "^8.0", "jbzoo/utils" : "^8.0", + "jbzoo/http-client" : "^8.0", "guzzlehttp/guzzle" : ">=7.10.0", "symfony/process" : ">=7.3.4" diff --git a/tests/PHPUnitHttpServerTest.php b/tests/PHPUnitHttpServerTest.php index 0b5f80b..76371fd 100644 --- a/tests/PHPUnitHttpServerTest.php +++ b/tests/PHPUnitHttpServerTest.php @@ -16,7 +16,6 @@ namespace JBZoo\PHPUnit; -use JBZoo\HttpClient\HttpClient; use JBZoo\HttpClient\Response; use JBZoo\Utils\FS; use JBZoo\Utils\Sys; @@ -27,13 +26,6 @@ protected function setUp(): void { parent::setUp(); - // Interim (major 8.0 toolchain batch): jbzoo/http-client is temporarily removed from - // require-dev because its 7.x line pins jbzoo/data ^7.2 / jbzoo/utils ^7.3, unsatisfiable - // against this batch's ^8.0. It is re-added at ^8.0 in Wave B; drop this guard then. - if (!\class_exists(HttpClient::class)) { - skip('jbzoo/http-client is not installed during the 8.0 toolchain batch (re-added in Wave B).'); - } - FS::rmDir(PROJECT_BUILD . '/coverage_cov'); FS::rmDir(PROJECT_BUILD . '/coverage_html'); FS::rmDir(PROJECT_BUILD . '/coverage_xml'); From 3a15fb0e3b6974e4bcb5630b4bcbcb50725623b4 Mon Sep 17 00:00:00 2001 From: SmetDenis Date: Mon, 20 Jul 2026 10:01:24 +0400 Subject: [PATCH 3/4] docs: refresh PHP floor and dependency versions for the 8.0 line --- CLAUDE.md | 4 ++-- README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 783dafa..bb06c81 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -87,7 +87,7 @@ class MyFeatureTest extends PHPUnit ## Dependencies -- PHP 8.2+ required +- PHP 8.3+ required - PHPUnit ^9.6.29 as core testing framework - JBZoo toolbox ecosystem (codestyle, markdown, etc.) - Development dependencies managed via jbzoo/toolbox-dev @@ -95,7 +95,7 @@ class MyFeatureTest extends PHPUnit ## CI/CD GitHub Actions workflow runs: -- PHPUnit tests across PHP 8.1, 8.2, 8.3 +- PHPUnit tests across PHP 8.3, 8.4, 8.5 - Code quality checks (linters) - Coverage reporting to Coveralls - Matrix testing with different Composer flags (--prefer-lowest) \ No newline at end of file diff --git a/README.md b/README.md index 41c009e..5e7b6c8 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ PHPUnit toolbox with short assertion aliases and useful testing utilities. This - **Extended assertions** - Additional assertions for emails, dates, amounts, file contents - **Environment detection** - Detect if running under TeamCity, Travis, PhpStorm - **Built-in utilities** - Tools for test organization and debugging -- **PHP 8.2+ support** - Modern PHP features and strict typing +- **PHP 8.3+ support** - Modern PHP features and strict typing ## Installation @@ -160,7 +160,7 @@ class PackageTest extends PHPUnit ## Requirements -- PHP 8.2 or higher +- PHP 8.3 or higher - PHPUnit ^9.6.29 - ext-filter, ext-mbstring From d66c014f8396d359fa8d049d7e55382952cc8c49 Mon Sep 17 00:00:00 2001 From: SmetDenis Date: Mon, 20 Jul 2026 12:21:56 +0400 Subject: [PATCH 4/4] build: fix latent phan findings under the newest analyzer (no API change) --- src/fake-index.php | 2 +- src/functions/aliases.php | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/fake-index.php b/src/fake-index.php index 0a9899d..2a5393f 100644 --- a/src/fake-index.php +++ b/src/fake-index.php @@ -77,7 +77,7 @@ $cliOptions->process(Env::string('PHPUNINT_ARGUMENTS')); -$realIndex = (string)($realIndex ?? \realpath($cliOptions->getOption('index'))); +$realIndex = (string)($realIndex ?? \realpath((string)$cliOptions->getOption('index'))); if (\class_exists(CovCatcher::class) && Sys::hasXdebug()) { $testname = (string)data($_REQUEST)->get('testname'); diff --git a/src/functions/aliases.php b/src/functions/aliases.php index 426e862..89ff157 100644 --- a/src/functions/aliases.php +++ b/src/functions/aliases.php @@ -78,12 +78,10 @@ function isFalse(mixed $value, string $message = ''): void } /** - * @param string $expected - * @param mixed $className + * @param class-string $expected + * @param mixed $className * - * @psalm-template ExpectedType of object - * @psalm-param class-string $expected - * @phan-suppress PhanPluginCanUseParamType + * @phan-suppress PhanPluginCanUseParamType */ function isClass($expected, $className, string $message = ''): void {