From a51a87a3a304e8424cacd5ef006b3b3654af009d Mon Sep 17 00:00:00 2001 From: ollily <426229+ollily@users.noreply.github.com> Date: Sat, 23 May 2026 17:21:04 +0200 Subject: [PATCH 1/9] #1: switch to php 8.4 --- composer.json | 12 +- composer.lock | 3423 +++++++++++++++++++++++++++++++++---------------- 2 files changed, 2337 insertions(+), 1098 deletions(-) diff --git a/composer.json b/composer.json index 07875a4..a7c535d 100644 --- a/composer.json +++ b/composer.json @@ -31,8 +31,8 @@ "minimum-stability": "stable", "prefer-stable": true, "require": { - "php": ">=7.4", - "php-ds/php-ds": "^1.0", + "php": ">=8.4.1", + "php-ds/php-ds": "^2.0", "psr/log": "^1.0||^2.0||^3.0", "composer/composer": "^2.0" }, @@ -44,19 +44,19 @@ "hrodic/php-integration-testing": "Integration Testing with PHPUnit" }, "require-dev": { - "phpunit/phpunit": "^9.6", + "phpunit/phpunit": "^13.1", "phpstan/phpstan": "^2.1", "phpstan/phpstan-strict-rules": "^2.0", - "vimeo/psalm": "^5.26", + "vimeo/psalm": "^6.0", "psalm/plugin-phpunit": "^0.19", "friendsofphp/php-cs-fixer": "^3.0", - "squizlabs/php_codesniffer": "^3.13", + "squizlabs/php_codesniffer": "^4.0", "phpmd/phpmd": "^2.0", "rogervila/php-sonarqube-scanner": "^1.0" }, "config": { "platform": { - "php": "7.4.0" + "php": "8.4.3" }, "optimize-autoloader": false, "sort-packages": true, diff --git a/composer.lock b/composer.lock index efc28a2..026e2ff 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0cf666d874d0dd8f0cde75e281fecdf6", + "content-hash": "6782bd4890c67575243cec15f9f468a9", "packages": [ { "name": "composer/ca-bundle", @@ -777,33 +777,36 @@ }, { "name": "php-ds/php-ds", - "version": "v1.7.0", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/php-ds/polyfill.git", - "reference": "017fb5cdfa52a1f13126c94987b04b884c44f9cd" + "reference": "890702aa2b2e74b027a51800b3c1f58148124d14" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-ds/polyfill/zipball/017fb5cdfa52a1f13126c94987b04b884c44f9cd", - "reference": "017fb5cdfa52a1f13126c94987b04b884c44f9cd", + "url": "https://api.github.com/repos/php-ds/polyfill/zipball/890702aa2b2e74b027a51800b3c1f58148124d14", + "reference": "890702aa2b2e74b027a51800b3c1f58148124d14", "shasum": "" }, "require": { - "ext-json": "*", - "php": ">=7.4" + "php": ">=8.2" }, "provide": { - "ext-ds": "1.5.0" + "ext-ds": "2.0.0" }, "require-dev": { - "php-ds/tests": "^1.5" + "php-ds/tests": "@dev", + "phpunit/phpunit": "^11.0" }, "suggest": { "ext-ds": "to improve performance and reduce memory usage" }, "type": "library", "autoload": { + "files": [ + "src/functions.php" + ], "psr-4": { "Ds\\": "src" } @@ -827,28 +830,33 @@ ], "support": { "issues": "https://github.com/php-ds/polyfill/issues", - "source": "https://github.com/php-ds/polyfill/tree/v1.7.0" + "source": "https://github.com/php-ds/polyfill/tree/v2.0.1" }, - "time": "2025-05-18T04:50:53+00:00" + "time": "2026-05-17T18:41:55+00:00" }, { "name": "psr/container", - "version": "1.1.2", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -875,36 +883,36 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "time": "2021-11-05T16:50:12+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { "name": "psr/log", - "version": "1.1.4", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -925,9 +933,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/3.0.2" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2024-09-11T13:17:53+00:00" }, { "name": "react/promise", @@ -1177,52 +1185,39 @@ }, { "name": "symfony/console", - "version": "v5.4.47", + "version": "v8.0.11", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed" + "reference": "3156577f46a38aa1b9323aad223de7a9cd426782" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed", - "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed", + "url": "https://api.github.com/repos/symfony/console/zipball/3156577f46a38aa1b9323aad223de7a9cd426782", + "reference": "3156577f46a38aa1b9323aad223de7a9cd426782", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" - }, - "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "php": ">=8.4", + "symfony/polyfill-mbstring": "^1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^7.4|^8.0" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" + "psr/log": "^1|^2|^3", + "symfony/config": "^7.4|^8.0", + "symfony/dependency-injection": "^7.4|^8.0", + "symfony/event-dispatcher": "^7.4|^8.0", + "symfony/http-foundation": "^7.4|^8.0", + "symfony/http-kernel": "^7.4|^8.0", + "symfony/lock": "^7.4|^8.0", + "symfony/messenger": "^7.4|^8.0", + "symfony/process": "^7.4|^8.0", + "symfony/stopwatch": "^7.4|^8.0", + "symfony/var-dumper": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -1256,7 +1251,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.47" + "source": "https://github.com/symfony/console/tree/v8.0.11" }, "funding": [ { @@ -1267,29 +1262,33 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-11-06T11:30:55+00:00" + "time": "2026-05-13T12:07:53+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.4", + "version": "v3.7.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918" + "reference": "50f59d1f3ca46d41ac911f97a78626b6756af35b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/605389f2a7e5625f273b53960dc46aeaf9c62918", - "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/50f59d1f3ca46d41ac911f97a78626b6756af35b", + "reference": "50f59d1f3ca46d41ac911f97a78626b6756af35b", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1" }, "type": "library", "extra": { @@ -1298,7 +1297,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.7-dev" } }, "autoload": { @@ -1323,7 +1322,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.4" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.7.0" }, "funding": [ { @@ -1334,35 +1333,38 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-25T14:11:13+00:00" + "time": "2026-04-13T15:52:40+00:00" }, { "name": "symfony/filesystem", - "version": "v5.4.45", + "version": "v7.4.11", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "57c8294ed37d4a055b77057827c67f9558c95c54" + "reference": "d721ea61b4a5fba8c5b6e7c1feda19efea144b50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/57c8294ed37d4a055b77057827c67f9558c95c54", - "reference": "57c8294ed37d4a055b77057827c67f9558c95c54", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/d721ea61b4a5fba8c5b6e7c1feda19efea144b50", + "reference": "d721ea61b4a5fba8c5b6e7c1feda19efea144b50", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" + "symfony/polyfill-mbstring": "~1.8" }, "require-dev": { - "symfony/process": "^5.4|^6.4" + "symfony/process": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -1390,7 +1392,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.45" + "source": "https://github.com/symfony/filesystem/tree/v7.4.11" }, "funding": [ { @@ -1401,31 +1403,36 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-10-22T13:05:35+00:00" + "time": "2026-05-11T16:38:44+00:00" }, { "name": "symfony/finder", - "version": "v5.4.45", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "63741784cd7b9967975eec610b256eed3ede022b" + "reference": "8da41214757b87d97f181e3d14a4179286151007" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/63741784cd7b9967975eec610b256eed3ede022b", - "reference": "63741784cd7b9967975eec610b256eed3ede022b", + "url": "https://api.github.com/repos/symfony/finder/zipball/8da41214757b87d97f181e3d14a4179286151007", + "reference": "8da41214757b87d97f181e3d14a4179286151007", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.4" + }, + "require-dev": { + "symfony/filesystem": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -1453,7 +1460,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.45" + "source": "https://github.com/symfony/finder/tree/v8.0.8" }, "funding": [ { @@ -1464,12 +1471,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-28T13:32:08+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2132,21 +2143,20 @@ }, { "name": "symfony/process", - "version": "v5.4.51", + "version": "v8.0.11", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "467bfc56f18f5ef6d5ccb09324d7e988c1c0a98f" + "reference": "26d89e459f037d2873300605d0a07e7a8ef84db0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/467bfc56f18f5ef6d5ccb09324d7e988c1c0a98f", - "reference": "467bfc56f18f5ef6d5ccb09324d7e988c1c0a98f", + "url": "https://api.github.com/repos/symfony/process/zipball/26d89e459f037d2873300605d0a07e7a8ef84db0", + "reference": "26d89e459f037d2873300605d0a07e7a8ef84db0", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.4" }, "type": "library", "autoload": { @@ -2174,7 +2184,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.51" + "source": "https://github.com/symfony/process/tree/v8.0.11" }, "funding": [ { @@ -2194,33 +2204,30 @@ "type": "tidelift" } ], - "time": "2026-01-26T15:53:37+00:00" + "time": "2026-05-11T16:56:32+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.4", + "version": "v3.7.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "f37b419f7aea2e9abf10abd261832cace12e3300" + "reference": "d25d82433a80eba6aa0e6c24b61d7370d99e444a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f37b419f7aea2e9abf10abd261832cace12e3300", - "reference": "f37b419f7aea2e9abf10abd261832cace12e3300", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d25d82433a80eba6aa0e6c24b61d7370d99e444a", + "reference": "d25d82433a80eba6aa0e6c24b61d7370d99e444a", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" }, "conflict": { "ext-psr": "<1.1|>=2" }, - "suggest": { - "symfony/service-implementation": "" - }, "type": "library", "extra": { "thanks": { @@ -2228,13 +2235,16 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.7-dev" } }, "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2261,7 +2271,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.4" + "source": "https://github.com/symfony/service-contracts/tree/v3.7.0" }, "funding": [ { @@ -2272,43 +2282,47 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-25T14:11:13+00:00" + "time": "2026-03-28T09:44:51+00:00" }, { "name": "symfony/string", - "version": "v5.4.47", + "version": "v8.0.11", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "136ca7d72f72b599f2631aca474a4f8e26719799" + "reference": "39be2ad058a3c0bd558edca23e65f009865d75ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/136ca7d72f72b599f2631aca474a4f8e26719799", - "reference": "136ca7d72f72b599f2631aca474a4f8e26719799", + "url": "https://api.github.com/repos/symfony/string/zipball/39be2ad058a3c0bd558edca23e65f009865d75ff", + "reference": "39be2ad058a3c0bd558edca23e65f009865d75ff", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "php": ">=8.4", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-intl-grapheme": "^1.33", + "symfony/polyfill-intl-normalizer": "^1.0", + "symfony/polyfill-mbstring": "^1.0" }, "conflict": { - "symfony/translation-contracts": ">=3.0" + "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" + "symfony/emoji": "^7.4|^8.0", + "symfony/http-client": "^7.4|^8.0", + "symfony/intl": "^7.4|^8.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -2347,7 +2361,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.47" + "source": "https://github.com/symfony/string/tree/v8.0.11" }, "funding": [ { @@ -2358,49 +2372,51 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-11-10T20:33:58+00:00" + "time": "2026-05-13T12:07:53+00:00" } ], "packages-dev": [ { "name": "amphp/amp", - "version": "v2.6.5", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "d7dda98dae26e56f3f6fcfbf1c1f819c9a993207" + "reference": "fa0ab33a6f47a82929c38d03ca47ebb71086a93f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/d7dda98dae26e56f3f6fcfbf1c1f819c9a993207", - "reference": "d7dda98dae26e56f3f6fcfbf1c1f819c9a993207", + "url": "https://api.github.com/repos/amphp/amp/zipball/fa0ab33a6f47a82929c38d03ca47ebb71086a93f", + "reference": "fa0ab33a6f47a82929c38d03ca47ebb71086a93f", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "ext-json": "*", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^7 | ^8 | ^9", - "react/promise": "^2", - "vimeo/psalm": "^3.12" + "amphp/php-cs-fixer-config": "^2", + "phpunit/phpunit": "^9", + "psalm/phar": "5.23.1" }, "type": "library", "autoload": { "files": [ - "lib/functions.php", - "lib/Internal/functions.php" + "src/functions.php", + "src/Future/functions.php", + "src/Internal/functions.php" ], "psr-4": { - "Amp\\": "lib" + "Amp\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2408,10 +2424,6 @@ "MIT" ], "authors": [ - { - "name": "Daniel Lowrey", - "email": "rdlowrey@php.net" - }, { "name": "Aaron Piotrowski", "email": "aaron@trowski.com" @@ -2423,6 +2435,10 @@ { "name": "Niklas Keller", "email": "me@kelunik.com" + }, + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" } ], "description": "A non-blocking concurrency framework for PHP applications.", @@ -2439,9 +2455,8 @@ "promise" ], "support": { - "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.6.5" + "source": "https://github.com/amphp/amp/tree/v3.1.1" }, "funding": [ { @@ -2449,41 +2464,45 @@ "type": "github" } ], - "time": "2025-09-03T19:41:28+00:00" + "time": "2025-08-27T21:42:00+00:00" }, { "name": "amphp/byte-stream", - "version": "v1.8.2", + "version": "v2.1.2", "source": { "type": "git", "url": "https://github.com/amphp/byte-stream.git", - "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc" + "reference": "55a6bd071aec26fa2a3e002618c20c35e3df1b46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/4f0e968ba3798a423730f567b1b50d3441c16ddc", - "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/55a6bd071aec26fa2a3e002618c20c35e3df1b46", + "reference": "55a6bd071aec26fa2a3e002618c20c35e3df1b46", "shasum": "" }, "require": { - "amphp/amp": "^2", - "php": ">=7.1" + "amphp/amp": "^3", + "amphp/parser": "^1.1", + "amphp/pipeline": "^1", + "amphp/serialization": "^1", + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2.3" }, "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.4", - "friendsofphp/php-cs-fixer": "^2.3", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^6 || ^7 || ^8", - "psalm/phar": "^3.11.4" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "5.22.1" }, "type": "library", "autoload": { "files": [ - "lib/functions.php" + "src/functions.php", + "src/Internal/functions.php" ], "psr-4": { - "Amp\\ByteStream\\": "lib" + "Amp\\ByteStream\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2512,7 +2531,7 @@ ], "support": { "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/v1.8.2" + "source": "https://github.com/amphp/byte-stream/tree/v2.1.2" }, "funding": [ { @@ -2520,34 +2539,39 @@ "type": "github" } ], - "time": "2024-04-13T18:00:56+00:00" + "time": "2025-03-16T17:10:27+00:00" }, { - "name": "clue/ndjson-react", - "version": "v1.3.0", + "name": "amphp/cache", + "version": "v2.0.1", "source": { "type": "git", - "url": "https://github.com/clue/reactphp-ndjson.git", - "reference": "392dc165fce93b5bb5c637b67e59619223c931b0" + "url": "https://github.com/amphp/cache.git", + "reference": "46912e387e6aa94933b61ea1ead9cf7540b7797c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/reactphp-ndjson/zipball/392dc165fce93b5bb5c637b67e59619223c931b0", - "reference": "392dc165fce93b5bb5c637b67e59619223c931b0", + "url": "https://api.github.com/repos/amphp/cache/zipball/46912e387e6aa94933b61ea1ead9cf7540b7797c", + "reference": "46912e387e6aa94933b61ea1ead9cf7540b7797c", "shasum": "" }, "require": { - "php": ">=5.3", - "react/stream": "^1.2" + "amphp/amp": "^3", + "amphp/serialization": "^1", + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" }, "require-dev": { - "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35", - "react/event-loop": "^1.2" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" }, "type": "library", "autoload": { "psr-4": { - "Clue\\React\\NDJson\\": "src/" + "Amp\\Cache\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2556,72 +2580,71 @@ ], "authors": [ { - "name": "Christian Lück", - "email": "christian@clue.engineering" + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" } ], - "description": "Streaming newline-delimited JSON (NDJSON) parser and encoder for ReactPHP.", - "homepage": "https://github.com/clue/reactphp-ndjson", - "keywords": [ - "NDJSON", - "json", - "jsonlines", - "newline", - "reactphp", - "streaming" - ], + "description": "A fiber-aware cache API based on Amp and Revolt.", + "homepage": "https://amphp.org/cache", "support": { - "issues": "https://github.com/clue/reactphp-ndjson/issues", - "source": "https://github.com/clue/reactphp-ndjson/tree/v1.3.0" + "issues": "https://github.com/amphp/cache/issues", + "source": "https://github.com/amphp/cache/tree/v2.0.1" }, "funding": [ { - "url": "https://clue.engineering/support", - "type": "custom" - }, - { - "url": "https://github.com/clue", + "url": "https://github.com/amphp", "type": "github" } ], - "time": "2022-12-23T10:58:28+00:00" + "time": "2024-04-19T03:38:06+00:00" }, { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.5", + "name": "amphp/dns", + "version": "v2.4.0", "source": { "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" + "url": "https://github.com/amphp/dns.git", + "reference": "78eb3db5fc69bf2fc0cb503c4fcba667bc223c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", + "url": "https://api.github.com/repos/amphp/dns/zipball/78eb3db5fc69bf2fc0cb503c4fcba667bc223c71", + "reference": "78eb3db5fc69bf2fc0cb503c4fcba667bc223c71", "shasum": "" }, "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" - }, - "replace": { - "ocramius/package-versions": "1.11.99" + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/cache": "^2", + "amphp/parser": "^1", + "amphp/process": "^2", + "daverandom/libdns": "^2.0.2", + "ext-filter": "*", + "ext-json": "*", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" }, "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" - }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "1.x-dev" - } + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "5.20" }, + "type": "library", "autoload": { + "files": [ + "src/functions.php" + ], "psr-4": { - "PackageVersions\\": "src/PackageVersions" + "Amp\\Dns\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2630,102 +2653,158 @@ ], "authors": [ { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" + "name": "Chris Wright", + "email": "addr@daverandom.com" }, { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + }, + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" } ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", + "description": "Async DNS resolution for Amp.", + "homepage": "https://github.com/amphp/dns", + "keywords": [ + "amp", + "amphp", + "async", + "client", + "dns", + "resolve" + ], "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" + "issues": "https://github.com/amphp/dns/issues", + "source": "https://github.com/amphp/dns/tree/v2.4.0" }, "funding": [ { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", + "url": "https://github.com/amphp", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" } ], - "time": "2022-01-17T14:14:24+00:00" + "time": "2025-01-19T15:43:40+00:00" }, { - "name": "crysalead/dir", - "version": "2.0.4", + "name": "amphp/parallel", + "version": "v2.4.0", "source": { "type": "git", - "url": "https://github.com/crysalead/dir.git", - "reference": "0390ac74a8f1634b1ec1adffdd118125f1271976" + "url": "https://github.com/amphp/parallel.git", + "reference": "37f5b2754fadc229c00f9416bd68fb8d04529a81" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/crysalead/dir/zipball/0390ac74a8f1634b1ec1adffdd118125f1271976", - "reference": "0390ac74a8f1634b1ec1adffdd118125f1271976", + "url": "https://api.github.com/repos/amphp/parallel/zipball/37f5b2754fadc229c00f9416bd68fb8d04529a81", + "reference": "37f5b2754fadc229c00f9416bd68fb8d04529a81", "shasum": "" }, "require": { - "php": ">=5.4" + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/cache": "^2", + "amphp/parser": "^1", + "amphp/pipeline": "^1", + "amphp/process": "^2", + "amphp/serialization": "^1", + "amphp/socket": "^2", + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1" }, "require-dev": { - "kahlan/kahlan": "~5.0" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "6.16.1" }, "type": "library", "autoload": { + "files": [ + "src/Context/functions.php", + "src/Context/Internal/functions.php", + "src/Ipc/functions.php", + "src/Worker/functions.php" + ], "psr-4": { - "Lead\\Dir\\": "src/" + "Amp\\Parallel\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Recursive directory scanner to locate directories and/or files in a file system", + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Stephen Coakley", + "email": "me@stephencoakley.com" + } + ], + "description": "Parallel processing component for Amp.", + "homepage": "https://github.com/amphp/parallel", "keywords": [ - "Directory Scanner", - "directory", - "file", - "file system" + "async", + "asynchronous", + "concurrent", + "multi-processing", + "multi-threading" ], "support": { - "issues": "https://github.com/crysalead/dir/issues", - "source": "https://github.com/crysalead/dir/tree/2.0.4" + "issues": "https://github.com/amphp/parallel/issues", + "source": "https://github.com/amphp/parallel/tree/v2.4.0" }, - "time": "2022-05-17T17:12:17+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2026-05-16T16:54:01+00:00" }, { - "name": "danieljharvey/file-wrapper", - "version": "2.1.2", + "name": "amphp/parser", + "version": "v1.1.1", "source": { "type": "git", - "url": "https://github.com/danieljharvey/file-wrapper.git", - "reference": "8e3cc2455d180590bd59a4a2d78ecd97edeed1e8" + "url": "https://github.com/amphp/parser.git", + "reference": "3cf1f8b32a0171d4b1bed93d25617637a77cded7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danieljharvey/file-wrapper/zipball/8e3cc2455d180590bd59a4a2d78ecd97edeed1e8", - "reference": "8e3cc2455d180590bd59a4a2d78ecd97edeed1e8", + "url": "https://api.github.com/repos/amphp/parser/zipball/3cf1f8b32a0171d4b1bed93d25617637a77cded7", + "reference": "3cf1f8b32a0171d4b1bed93d25617637a77cded7", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.4" }, "require-dev": { - "phpunit/phpunit": "4.0.*" + "amphp/php-cs-fixer-config": "^2", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" }, "type": "library", "autoload": { "psr-4": { - "DanielJHarvey\\FileWrapper\\": "src/" + "Amp\\Parser\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2734,46 +2813,63 @@ ], "authors": [ { - "name": "Daniel Harvey", - "email": "danieljamesharvey@gmail.com" + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" } ], - "description": "A simple file system function wrapper that can be easily mocked or stubbed for testing", + "description": "A generator parser to make streaming parsers simple.", + "homepage": "https://github.com/amphp/parser", "keywords": [ - "file", - "testing", - "wrapper" + "async", + "non-blocking", + "parser", + "stream" ], "support": { - "issues": "https://github.com/danieljharvey/file-wrapper/issues", - "source": "https://github.com/danieljharvey/file-wrapper/tree/master" + "issues": "https://github.com/amphp/parser/issues", + "source": "https://github.com/amphp/parser/tree/v1.1.1" }, - "time": "2017-09-11T10:00:31+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-03-21T19:16:53+00:00" }, { - "name": "danieljharvey/php-git-branch", - "version": "1.1.1", + "name": "amphp/pipeline", + "version": "v1.2.4", "source": { "type": "git", - "url": "https://github.com/danieljharvey/php-git-branch.git", - "reference": "72aeb3367a0293d893828f264cd684aa79dcee96" + "url": "https://github.com/amphp/pipeline.git", + "reference": "a044733e080940d1483f56caff0c412ad6982776" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danieljharvey/php-git-branch/zipball/72aeb3367a0293d893828f264cd684aa79dcee96", - "reference": "72aeb3367a0293d893828f264cd684aa79dcee96", + "url": "https://api.github.com/repos/amphp/pipeline/zipball/a044733e080940d1483f56caff0c412ad6982776", + "reference": "a044733e080940d1483f56caff0c412ad6982776", "shasum": "" }, "require": { - "danieljharvey/file-wrapper": ">=2.1" + "amphp/amp": "^3", + "php": ">=8.1", + "revolt/event-loop": "^1" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "6.16.1" }, "type": "library", "autoload": { "psr-4": { - "DanielJHarvey\\PHPGitBranch\\": "src/" + "Amp\\Pipeline\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2782,21 +2878,628 @@ ], "authors": [ { - "name": "Daniel Harvey", - "email": "danieljamesharvey@gmail.com" + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" } ], - "description": "Library for working out which git branch you are on in PHP", + "description": "Asynchronous iterators and operators.", + "homepage": "https://amphp.org/pipeline", + "keywords": [ + "amp", + "amphp", + "async", + "io", + "iterator", + "non-blocking" + ], "support": { - "issues": "https://github.com/danieljharvey/php-git-branch/issues", - "source": "https://github.com/danieljharvey/php-git-branch/tree/master" + "issues": "https://github.com/amphp/pipeline/issues", + "source": "https://github.com/amphp/pipeline/tree/v1.2.4" }, - "time": "2017-08-08T10:38:23+00:00" - }, - { - "name": "dnoegel/php-xdg-base-dir", - "version": "v0.1.1", - "source": { + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2026-05-06T05:37:57+00:00" + }, + { + "name": "amphp/process", + "version": "v2.0.3", + "source": { + "type": "git", + "url": "https://github.com/amphp/process.git", + "reference": "52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/process/zipball/52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d", + "reference": "52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Amp\\Process\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "A fiber-aware process manager based on Amp and Revolt.", + "homepage": "https://amphp.org/process", + "support": { + "issues": "https://github.com/amphp/process/issues", + "source": "https://github.com/amphp/process/tree/v2.0.3" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-04-19T03:13:44+00:00" + }, + { + "name": "amphp/serialization", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/amphp/serialization.git", + "reference": "fdf2834d78cebb0205fb2672676c1b1eb84371f0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/serialization/zipball/fdf2834d78cebb0205fb2672676c1b1eb84371f0", + "reference": "fdf2834d78cebb0205fb2672676c1b1eb84371f0", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "ext-json": "*", + "ext-zlib": "*", + "phpunit/phpunit": "^9", + "psalm/phar": "6.16.1" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Amp\\Serialization\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Serialization tools for IPC and data storage in PHP.", + "homepage": "https://github.com/amphp/serialization", + "keywords": [ + "async", + "asynchronous", + "serialization", + "serialize" + ], + "support": { + "issues": "https://github.com/amphp/serialization/issues", + "source": "https://github.com/amphp/serialization/tree/v1.1.0" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2026-04-05T15:59:53+00:00" + }, + { + "name": "amphp/socket", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/amphp/socket.git", + "reference": "dadb63c5d3179fd83803e29dfeac27350e619314" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/socket/zipball/dadb63c5d3179fd83803e29dfeac27350e619314", + "reference": "dadb63c5d3179fd83803e29dfeac27350e619314", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/dns": "^2", + "ext-openssl": "*", + "kelunik/certificate": "^1.1", + "league/uri": "^7", + "league/uri-interfaces": "^7", + "php": ">=8.1", + "revolt/event-loop": "^1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "amphp/process": "^2", + "phpunit/phpunit": "^9", + "psalm/phar": "6.16.1" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php", + "src/Internal/functions.php", + "src/SocketAddress/functions.php" + ], + "psr-4": { + "Amp\\Socket\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Lowrey", + "email": "rdlowrey@gmail.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Non-blocking socket connection / server implementations based on Amp and Revolt.", + "homepage": "https://github.com/amphp/socket", + "keywords": [ + "amp", + "async", + "encryption", + "non-blocking", + "sockets", + "tcp", + "tls" + ], + "support": { + "issues": "https://github.com/amphp/socket/issues", + "source": "https://github.com/amphp/socket/tree/v2.4.0" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2026-04-19T15:09:56+00:00" + }, + { + "name": "amphp/sync", + "version": "v2.3.0", + "source": { + "type": "git", + "url": "https://github.com/amphp/sync.git", + "reference": "217097b785130d77cfcc58ff583cf26cd1770bf1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/sync/zipball/217097b785130d77cfcc58ff583cf26cd1770bf1", + "reference": "217097b785130d77cfcc58ff583cf26cd1770bf1", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "amphp/pipeline": "^1", + "amphp/serialization": "^1", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "5.23" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Amp\\Sync\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Stephen Coakley", + "email": "me@stephencoakley.com" + } + ], + "description": "Non-blocking synchronization primitives for PHP based on Amp and Revolt.", + "homepage": "https://github.com/amphp/sync", + "keywords": [ + "async", + "asynchronous", + "mutex", + "semaphore", + "synchronization" + ], + "support": { + "issues": "https://github.com/amphp/sync/issues", + "source": "https://github.com/amphp/sync/tree/v2.3.0" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-08-03T19:31:26+00:00" + }, + { + "name": "clue/ndjson-react", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/clue/reactphp-ndjson.git", + "reference": "392dc165fce93b5bb5c637b67e59619223c931b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clue/reactphp-ndjson/zipball/392dc165fce93b5bb5c637b67e59619223c931b0", + "reference": "392dc165fce93b5bb5c637b67e59619223c931b0", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "react/stream": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35", + "react/event-loop": "^1.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\React\\NDJson\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering" + } + ], + "description": "Streaming newline-delimited JSON (NDJSON) parser and encoder for ReactPHP.", + "homepage": "https://github.com/clue/reactphp-ndjson", + "keywords": [ + "NDJSON", + "json", + "jsonlines", + "newline", + "reactphp", + "streaming" + ], + "support": { + "issues": "https://github.com/clue/reactphp-ndjson/issues", + "source": "https://github.com/clue/reactphp-ndjson/tree/v1.3.0" + }, + "funding": [ + { + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-12-23T10:58:28+00:00" + }, + { + "name": "crysalead/dir", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/crysalead/dir.git", + "reference": "0390ac74a8f1634b1ec1adffdd118125f1271976" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/crysalead/dir/zipball/0390ac74a8f1634b1ec1adffdd118125f1271976", + "reference": "0390ac74a8f1634b1ec1adffdd118125f1271976", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "kahlan/kahlan": "~5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Lead\\Dir\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Recursive directory scanner to locate directories and/or files in a file system", + "keywords": [ + "Directory Scanner", + "directory", + "file", + "file system" + ], + "support": { + "issues": "https://github.com/crysalead/dir/issues", + "source": "https://github.com/crysalead/dir/tree/2.0.4" + }, + "time": "2022-05-17T17:12:17+00:00" + }, + { + "name": "danieljharvey/file-wrapper", + "version": "2.1.2", + "source": { + "type": "git", + "url": "https://github.com/danieljharvey/file-wrapper.git", + "reference": "8e3cc2455d180590bd59a4a2d78ecd97edeed1e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danieljharvey/file-wrapper/zipball/8e3cc2455d180590bd59a4a2d78ecd97edeed1e8", + "reference": "8e3cc2455d180590bd59a4a2d78ecd97edeed1e8", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "4.0.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "DanielJHarvey\\FileWrapper\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Harvey", + "email": "danieljamesharvey@gmail.com" + } + ], + "description": "A simple file system function wrapper that can be easily mocked or stubbed for testing", + "keywords": [ + "file", + "testing", + "wrapper" + ], + "support": { + "issues": "https://github.com/danieljharvey/file-wrapper/issues", + "source": "https://github.com/danieljharvey/file-wrapper/tree/master" + }, + "time": "2017-09-11T10:00:31+00:00" + }, + { + "name": "danieljharvey/php-git-branch", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/danieljharvey/php-git-branch.git", + "reference": "72aeb3367a0293d893828f264cd684aa79dcee96" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danieljharvey/php-git-branch/zipball/72aeb3367a0293d893828f264cd684aa79dcee96", + "reference": "72aeb3367a0293d893828f264cd684aa79dcee96", + "shasum": "" + }, + "require": { + "danieljharvey/file-wrapper": ">=2.1" + }, + "require-dev": { + "phpunit/phpunit": "^6.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "DanielJHarvey\\PHPGitBranch\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Harvey", + "email": "danieljamesharvey@gmail.com" + } + ], + "description": "Library for working out which git branch you are on in PHP", + "support": { + "issues": "https://github.com/danieljharvey/php-git-branch/issues", + "source": "https://github.com/danieljharvey/php-git-branch/tree/master" + }, + "time": "2017-08-08T10:38:23+00:00" + }, + { + "name": "danog/advanced-json-rpc", + "version": "v3.2.3", + "source": { + "type": "git", + "url": "https://github.com/danog/php-advanced-json-rpc.git", + "reference": "ae703ea7b4811797a10590b6078de05b3b33dd91" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danog/php-advanced-json-rpc/zipball/ae703ea7b4811797a10590b6078de05b3b33dd91", + "reference": "ae703ea7b4811797a10590b6078de05b3b33dd91", + "shasum": "" + }, + "require": { + "netresearch/jsonmapper": "^5", + "php": ">=8.1", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0 || ^6" + }, + "replace": { + "felixfbecker/php-advanced-json-rpc": "^3" + }, + "require-dev": { + "phpunit/phpunit": "^9" + }, + "type": "library", + "autoload": { + "psr-4": { + "AdvancedJsonRpc\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + }, + { + "name": "Daniil Gentili", + "email": "daniil@daniil.it" + } + ], + "description": "A more advanced JSONRPC implementation", + "support": { + "issues": "https://github.com/danog/php-advanced-json-rpc/issues", + "source": "https://github.com/danog/php-advanced-json-rpc/tree/v3.2.3" + }, + "time": "2026-01-12T21:07:10+00:00" + }, + { + "name": "daverandom/libdns", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/DaveRandom/LibDNS.git", + "reference": "b84c94e8fe6b7ee4aecfe121bfe3b6177d303c8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/DaveRandom/LibDNS/zipball/b84c94e8fe6b7ee4aecfe121bfe3b6177d303c8a", + "reference": "b84c94e8fe6b7ee4aecfe121bfe3b6177d303c8a", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "Required for IDN support" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "LibDNS\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "DNS protocol implementation written in pure PHP", + "keywords": [ + "dns" + ], + "support": { + "issues": "https://github.com/DaveRandom/LibDNS/issues", + "source": "https://github.com/DaveRandom/LibDNS/tree/v2.1.0" + }, + "time": "2024-04-12T12:12:48+00:00" + }, + { + "name": "dnoegel/php-xdg-base-dir", + "version": "v0.1.1", + "source": { "type": "git", "url": "https://github.com/dnoegel/php-xdg-base-dir.git", "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" @@ -2878,76 +3581,6 @@ }, "time": "2026-02-07T07:09:04+00:00" }, - { - "name": "doctrine/instantiator", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9 || ^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.30 || ^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.5.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-12-30T00:15:36+00:00" - }, { "name": "ergebnis/agent-detector", "version": "1.2.0", @@ -3064,51 +3697,6 @@ }, "time": "2023-08-08T05:53:35+00:00" }, - { - "name": "felixfbecker/advanced-json-rpc", - "version": "v3.2.1", - "source": { - "type": "git", - "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", - "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447", - "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447", - "shasum": "" - }, - "require": { - "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "php": "^7.1 || ^8.0", - "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" - }, - "require-dev": { - "phpunit/phpunit": "^7.0 || ^8.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "AdvancedJsonRpc\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Felix Becker", - "email": "felix.b@outlook.com" - } - ], - "description": "A more advanced JSONRPC implementation", - "support": { - "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", - "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1" - }, - "time": "2021-06-11T22:34:44+00:00" - }, { "name": "felixfbecker/language-server-protocol", "version": "v1.5.3", @@ -3241,62 +3829,289 @@ "shasum": "" }, "require": { - "clue/ndjson-react": "^1.3", - "composer/semver": "^3.4", - "composer/xdebug-handler": "^3.0.5", - "ergebnis/agent-detector": "^1.1.1", + "clue/ndjson-react": "^1.3", + "composer/semver": "^3.4", + "composer/xdebug-handler": "^3.0.5", + "ergebnis/agent-detector": "^1.1.1", + "ext-filter": "*", + "ext-hash": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "fidry/cpu-core-counter": "^1.3", + "php": "^7.4 || ^8.0", + "react/child-process": "^0.6.6", + "react/event-loop": "^1.5", + "react/socket": "^1.16", + "react/stream": "^1.4", + "sebastian/diff": "^4.0.6 || ^5.1.1 || ^6.0.2 || ^7.0 || ^8.0", + "symfony/console": "^5.4.47 || ^6.4.24 || ^7.0 || ^8.0", + "symfony/event-dispatcher": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", + "symfony/filesystem": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", + "symfony/finder": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", + "symfony/options-resolver": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", + "symfony/polyfill-mbstring": "^1.33", + "symfony/polyfill-php80": "^1.33", + "symfony/polyfill-php81": "^1.33", + "symfony/polyfill-php84": "^1.33", + "symfony/process": "^5.4.47 || ^6.4.24 || ^7.2 || ^8.0", + "symfony/stopwatch": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0" + }, + "require-dev": { + "facile-it/paraunit": "^1.3.1 || ^2.11.0", + "infection/infection": "^0.32.7", + "justinrainbow/json-schema": "^6.8.0", + "keradus/cli-executor": "^2.3", + "mikey179/vfsstream": "^1.6.12", + "php-coveralls/php-coveralls": "^2.9.1", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.8", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.8", + "phpunit/phpunit": "^9.6.34 || ^10.5.63 || ^11.5.55", + "symfony/polyfill-php85": "^1.33", + "symfony/var-dumper": "^5.4.48 || ^6.4.32 || ^7.4.4 || ^8.0.8", + "symfony/yaml": "^5.4.45 || ^6.4.30 || ^7.4.1 || ^8.0.8" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + }, + "exclude-from-classmap": [ + "src/**/Internal/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "keywords": [ + "Static code analysis", + "fixer", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.95.2" + }, + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2026-05-15T09:20:44+00:00" + }, + { + "name": "kelunik/certificate", + "version": "v1.1.3", + "source": { + "type": "git", + "url": "https://github.com/kelunik/certificate.git", + "reference": "7e00d498c264d5eb4f78c69f41c8bd6719c0199e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kelunik/certificate/zipball/7e00d498c264d5eb4f78c69f41c8bd6719c0199e", + "reference": "7e00d498c264d5eb4f78c69f41c8bd6719c0199e", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "php": ">=7.0" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "phpunit/phpunit": "^6 | 7 | ^8 | ^9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Kelunik\\Certificate\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Access certificate details and transform between different formats.", + "keywords": [ + "DER", + "certificate", + "certificates", + "openssl", + "pem", + "x509" + ], + "support": { + "issues": "https://github.com/kelunik/certificate/issues", + "source": "https://github.com/kelunik/certificate/tree/v1.1.3" + }, + "time": "2023-02-03T21:26:53+00:00" + }, + { + "name": "league/uri", + "version": "7.8.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri.git", + "reference": "08cf38e3924d4f56238125547b5720496fac8fd4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/08cf38e3924d4f56238125547b5720496fac8fd4", + "reference": "08cf38e3924d4f56238125547b5720496fac8fd4", + "shasum": "" + }, + "require": { + "league/uri-interfaces": "^7.8.1", + "php": "^8.1", + "psr/http-factory": "^1" + }, + "conflict": { + "league/uri-schemes": "^1.0" + }, + "suggest": { + "ext-bcmath": "to improve IPV4 host parsing", + "ext-dom": "to convert the URI into an HTML anchor tag", + "ext-fileinfo": "to create Data URI from file contennts", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "ext-uri": "to use the PHP native URI class", + "jeremykendall/php-domain-parser": "to further parse the URI host and resolve its Public Suffix and Top Level Domain", + "league/uri-components": "to provide additional tools to manipulate URI objects components", + "league/uri-polyfill": "to backport the PHP URI extension for older versions of PHP", + "php-64bit": "to improve IPV4 host parsing", + "rowbot/url": "to handle URLs using the WHATWG URL Living Standard specification", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "URI manipulation library", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "URN", + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "middleware", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc2141", + "rfc3986", + "rfc3987", + "rfc6570", + "rfc8141", + "uri", + "uri-template", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri/tree/7.8.1" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2026-03-15T20:22:25+00:00" + }, + { + "name": "league/uri-interfaces", + "version": "7.8.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri-interfaces.git", + "reference": "85d5c77c5d6d3af6c54db4a78246364908f3c928" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/85d5c77c5d6d3af6c54db4a78246364908f3c928", + "reference": "85d5c77c5d6d3af6c54db4a78246364908f3c928", + "shasum": "" + }, + "require": { "ext-filter": "*", - "ext-hash": "*", - "ext-json": "*", - "ext-tokenizer": "*", - "fidry/cpu-core-counter": "^1.3", - "php": "^7.4 || ^8.0", - "react/child-process": "^0.6.6", - "react/event-loop": "^1.5", - "react/socket": "^1.16", - "react/stream": "^1.4", - "sebastian/diff": "^4.0.6 || ^5.1.1 || ^6.0.2 || ^7.0 || ^8.0", - "symfony/console": "^5.4.47 || ^6.4.24 || ^7.0 || ^8.0", - "symfony/event-dispatcher": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", - "symfony/filesystem": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", - "symfony/finder": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", - "symfony/options-resolver": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", - "symfony/polyfill-mbstring": "^1.33", - "symfony/polyfill-php80": "^1.33", - "symfony/polyfill-php81": "^1.33", - "symfony/polyfill-php84": "^1.33", - "symfony/process": "^5.4.47 || ^6.4.24 || ^7.2 || ^8.0", - "symfony/stopwatch": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0" - }, - "require-dev": { - "facile-it/paraunit": "^1.3.1 || ^2.11.0", - "infection/infection": "^0.32.7", - "justinrainbow/json-schema": "^6.8.0", - "keradus/cli-executor": "^2.3", - "mikey179/vfsstream": "^1.6.12", - "php-coveralls/php-coveralls": "^2.9.1", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.8", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.8", - "phpunit/phpunit": "^9.6.34 || ^10.5.63 || ^11.5.55", - "symfony/polyfill-php85": "^1.33", - "symfony/var-dumper": "^5.4.48 || ^6.4.32 || ^7.4.4 || ^8.0.8", - "symfony/yaml": "^5.4.45 || ^6.4.30 || ^7.4.1 || ^8.0.8" + "php": "^8.1", + "psr/http-message": "^1.1 || ^2.0" }, "suggest": { - "ext-dom": "For handling output formats in XML", - "ext-mbstring": "For handling non-UTF8 characters." + "ext-bcmath": "to improve IPV4 host parsing", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "php-64bit": "to improve IPV4 host parsing", + "rowbot/url": "to handle URLs using the WHATWG URL Living Standard specification", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } }, - "bin": [ - "php-cs-fixer" - ], - "type": "application", "autoload": { "psr-4": { - "PhpCsFixer\\": "src/" - }, - "exclude-from-classmap": [ - "src/**/Internal/" - ] + "League\\Uri\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3304,32 +4119,45 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Dariusz Rumiński", - "email": "dariusz.ruminski@gmail.com" + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" } ], - "description": "A tool to automatically fix PHP code style", + "description": "Common tools for parsing and resolving RFC3987/RFC3986 URI", + "homepage": "https://uri.thephpleague.com", "keywords": [ - "Static code analysis", - "fixer", - "standards", - "static analysis" + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "url", + "ws" ], "support": { - "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.95.2" + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.8.1" }, "funding": [ { - "url": "https://github.com/keradus", + "url": "https://github.com/sponsors/nyamsprod", "type": "github" } ], - "time": "2026-05-15T09:20:44+00:00" + "time": "2026-03-08T20:05:35+00:00" }, { "name": "myclabs/deep-copy", @@ -3393,16 +4221,16 @@ }, { "name": "netresearch/jsonmapper", - "version": "v4.5.0", + "version": "v5.0.1", "source": { "type": "git", "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "8e76efb98ee8b6afc54687045e1b8dba55ac76e5" + "reference": "980674efdda65913492d29a8fd51c82270dd37bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8e76efb98ee8b6afc54687045e1b8dba55ac76e5", - "reference": "8e76efb98ee8b6afc54687045e1b8dba55ac76e5", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/980674efdda65913492d29a8fd51c82270dd37bb", + "reference": "980674efdda65913492d29a8fd51c82270dd37bb", "shasum": "" }, "require": { @@ -3438,36 +4266,43 @@ "support": { "email": "cweiske@cweiske.de", "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.5.0" + "source": "https://github.com/cweiske/jsonmapper/tree/v5.0.1" }, - "time": "2024-09-08T10:13:13+00:00" + "time": "2026-02-22T16:28:03+00:00" }, { "name": "nikic/php-parser", - "version": "v4.19.5", + "version": "v5.7.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "51bd93cc741b7fc3d63d20b6bdcd99fdaa359837" + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/51bd93cc741b7fc3d63d20b6bdcd99fdaa359837", - "reference": "51bd93cc741b7fc3d63d20b6bdcd99fdaa359837", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.1" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^9.0" }, "bin": [ "bin/php-parse" ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, "autoload": { "psr-4": { "PhpParser\\": "lib/PhpParser" @@ -3489,9 +4324,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.19.5" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.7.0" }, - "time": "2025-12-06T11:45:25+00:00" + "time": "2025-12-06T11:56:16+00:00" }, { "name": "pdepend/pdepend", @@ -3729,16 +4564,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.6.7", + "version": "6.0.3", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "31a105931bc8ffa3a123383829772e832fd8d903" + "reference": "7bae67520aa9f5ecc506d646810bd40d9da54582" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/31a105931bc8ffa3a123383829772e832fd8d903", - "reference": "31a105931bc8ffa3a123383829772e832fd8d903", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/7bae67520aa9f5ecc506d646810bd40d9da54582", + "reference": "7bae67520aa9f5ecc506d646810bd40d9da54582", "shasum": "" }, "require": { @@ -3746,8 +4581,8 @@ "ext-filter": "*", "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.7", - "phpstan/phpdoc-parser": "^1.7|^2.0", + "phpdocumentor/type-resolver": "^2.0", + "phpstan/phpdoc-parser": "^2.0", "webmozart/assert": "^1.9.1 || ^2" }, "require-dev": { @@ -3757,7 +4592,8 @@ "phpstan/phpstan-mockery": "^1.1", "phpstan/phpstan-webmozart-assert": "^1.2", "phpunit/phpunit": "^9.5", - "psalm/phar": "^5.26" + "psalm/phar": "^5.26", + "shipmonk/dead-code-detector": "^0.5.1" }, "type": "library", "extra": { @@ -3787,44 +4623,44 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.7" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/6.0.3" }, - "time": "2026-03-18T20:47:46+00:00" + "time": "2026-03-18T20:49:53+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.12.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "92a98ada2b93d9b201a613cb5a33584dde25f195" + "reference": "327a05bbee54120d4786a0dc67aad30226ad4cf9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/92a98ada2b93d9b201a613cb5a33584dde25f195", - "reference": "92a98ada2b93d9b201a613cb5a33584dde25f195", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/327a05bbee54120d4786a0dc67aad30226ad4cf9", + "reference": "327a05bbee54120d4786a0dc67aad30226ad4cf9", "shasum": "" }, "require": { "doctrine/deprecations": "^1.0", - "php": "^7.3 || ^8.0", + "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.0", - "phpstan/phpdoc-parser": "^1.18|^2.0" + "phpstan/phpdoc-parser": "^2.0" }, "require-dev": { "ext-tokenizer": "*", "phpbench/phpbench": "^1.2", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-phpunit": "^1.1", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-phpunit": "^2.0", "phpunit/phpunit": "^9.5", - "rector/rector": "^0.13.9", - "vimeo/psalm": "^4.25" + "psalm/phar": "^4" }, "type": "library", "extra": { "branch-alias": { - "dev-1.x": "1.x-dev" + "dev-1.x": "1.x-dev", + "dev-2.x": "2.x-dev" } }, "autoload": { @@ -3845,9 +4681,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.12.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/2.0.0" }, - "time": "2025-11-21T15:09:14+00:00" + "time": "2026-01-06T21:53:42+00:00" }, { "name": "phpmd/phpmd", @@ -4085,35 +4921,35 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.32", + "version": "14.1.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" + "reference": "655533a65696bbc4231cd8027af150dadc40ec88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", - "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/655533a65696bbc4231cd8027af150dadc40ec88", + "reference": "655533a65696bbc4231cd8027af150dadc40ec88", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", + "ext-mbstring": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.19.1 || ^5.1.0", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.6", - "phpunit/php-text-template": "^2.0.4", - "sebastian/code-unit-reverse-lookup": "^2.0.3", - "sebastian/complexity": "^2.0.3", - "sebastian/environment": "^5.1.5", - "sebastian/lines-of-code": "^1.0.4", - "sebastian/version": "^3.0.2", - "theseer/tokenizer": "^1.2.3" + "nikic/php-parser": "^5.7.0", + "php": ">=8.4", + "phpunit/php-text-template": "^6.0", + "sebastian/complexity": "^6.0", + "sebastian/environment": "^9.2", + "sebastian/git-state": "^1.0", + "sebastian/lines-of-code": "^5.0", + "sebastian/version": "^7.0", + "theseer/tokenizer": "^2.0.1" }, "require-dev": { - "phpunit/phpunit": "^9.6" + "phpunit/phpunit": "^13.1" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -4122,7 +4958,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "9.2.x-dev" + "dev-main": "14.1.x-dev" } }, "autoload": { @@ -4151,40 +4987,52 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/14.1.9" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-code-coverage", + "type": "tidelift" } ], - "time": "2024-08-22T04:23:01+00:00" + "time": "2026-05-16T05:16:14+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "7.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "6e5aa1fb0a95b1703d83e721299ee18bb4e2de50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6e5aa1fb0a95b1703d83e721299ee18bb4e2de50", + "reference": "6e5aa1fb0a95b1703d83e721299ee18bb4e2de50", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -4211,36 +5059,49 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/7.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-file-iterator", + "type": "tidelift" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2026-02-06T04:33:26+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.1.1", + "version": "7.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "reference": "42e5c5cae0c65df12d1b1a3ab52bf3f50f244d88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/42e5c5cae0c65df12d1b1a3ab52bf3f50f244d88", + "reference": "42e5c5cae0c65df12d1b1a3ab52bf3f50f244d88", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.4" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.0" }, "suggest": { "ext-pcntl": "*" @@ -4248,7 +5109,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -4274,40 +5135,53 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/7.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-invoker", + "type": "tidelift" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2026-02-06T04:34:47+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "a47af19f93f76aa3368303d752aa5272ca3299f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/a47af19f93f76aa3368303d752aa5272ca3299f4", + "reference": "a47af19f93f76aa3368303d752aa5272ca3299f4", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -4333,40 +5207,53 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/6.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-text-template", + "type": "tidelift" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2026-02-06T04:36:37+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "9.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "a0e12065831f6ab0d83120dc61513eb8d9a966f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/a0e12065831f6ab0d83120dc61513eb8d9a966f6", + "reference": "a0e12065831f6ab0d83120dc61513eb8d9a966f6", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "9.0-dev" } }, "autoload": { @@ -4392,32 +5279,44 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "security": "https://github.com/sebastianbergmann/php-timer/security/policy", + "source": "https://github.com/sebastianbergmann/php-timer/tree/9.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-timer", + "type": "tidelift" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2026-02-06T04:37:53+00:00" }, { "name": "phpunit/phpunit", - "version": "9.6.34", + "version": "13.1.11", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "b36f02317466907a230d3aa1d34467041271ef4a" + "reference": "0f540976373361d1b4549adcb87913ce2116e904" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b36f02317466907a230d3aa1d34467041271ef4a", - "reference": "b36f02317466907a230d3aa1d34467041271ef4a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0f540976373361d1b4549adcb87913ce2116e904", + "reference": "0f540976373361d1b4549adcb87913ce2116e904", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.5.0 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -4427,27 +5326,24 @@ "myclabs/deep-copy": "^1.13.4", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.32", - "phpunit/php-file-iterator": "^3.0.6", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.4", - "phpunit/php-timer": "^5.0.3", - "sebastian/cli-parser": "^1.0.2", - "sebastian/code-unit": "^1.0.8", - "sebastian/comparator": "^4.0.10", - "sebastian/diff": "^4.0.6", - "sebastian/environment": "^5.1.5", - "sebastian/exporter": "^4.0.8", - "sebastian/global-state": "^5.0.8", - "sebastian/object-enumerator": "^4.0.4", - "sebastian/resource-operations": "^3.0.4", - "sebastian/type": "^3.2.1", - "sebastian/version": "^3.0.2" - }, - "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + "php": ">=8.4.1", + "phpunit/php-code-coverage": "^14.1.9", + "phpunit/php-file-iterator": "^7.0.0", + "phpunit/php-invoker": "^7.0.0", + "phpunit/php-text-template": "^6.0.0", + "phpunit/php-timer": "^9.0.0", + "sebastian/cli-parser": "^5.0.0", + "sebastian/comparator": "^8.2.1", + "sebastian/diff": "^8.3.0", + "sebastian/environment": "^9.3.1", + "sebastian/exporter": "^8.1.0", + "sebastian/git-state": "^1.0", + "sebastian/global-state": "^9.0.0", + "sebastian/object-enumerator": "^8.0.0", + "sebastian/recursion-context": "^8.0.0", + "sebastian/type": "^7.0.1", + "sebastian/version": "^7.0.0", + "staabm/side-effects-detector": "^1.0.5" }, "bin": [ "phpunit" @@ -4455,7 +5351,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.6-dev" + "dev-main": "13.1-dev" } }, "autoload": { @@ -4487,62 +5383,44 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.34" + "source": "https://github.com/sebastianbergmann/phpunit/tree/13.1.11" }, "funding": [ { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", - "type": "tidelift" + "url": "https://phpunit.de/sponsoring.html", + "type": "other" } ], - "time": "2026-01-27T05:45:00+00:00" + "time": "2026-05-21T12:38:47+00:00" }, { "name": "psalm/plugin-phpunit", - "version": "0.19.0", + "version": "0.19.7", "source": { "type": "git", "url": "https://github.com/psalm/psalm-plugin-phpunit.git", - "reference": "e344eaaa27871e79c6cb97b9efe52a735f9d1966" + "reference": "143f9d5e049fffcdbc0da3fbb99f6149f9d3e2dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/e344eaaa27871e79c6cb97b9efe52a735f9d1966", - "reference": "e344eaaa27871e79c6cb97b9efe52a735f9d1966", + "url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/143f9d5e049fffcdbc0da3fbb99f6149f9d3e2dc", + "reference": "143f9d5e049fffcdbc0da3fbb99f6149f9d3e2dc", "shasum": "" }, "require": { - "composer/package-versions-deprecated": "^1.10", - "composer/semver": "^1.4 || ^2.0 || ^3.0", "ext-simplexml": "*", - "php": "^7.4 || ^8.0", - "vimeo/psalm": "dev-master || ^5@beta || ^5.0" + "php": ">=8.1", + "vimeo/psalm": "dev-master || ^6.10.0" }, "conflict": { - "phpunit/phpunit": "<7.5" + "phpspec/prophecy": "<1.20.0", + "phpspec/prophecy-phpunit": "<2.3.0", + "phpunit/phpunit": "<8.5.1" }, "require-dev": { - "codeception/codeception": "^4.0.3", "php": "^7.3 || ^8.0", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.0", + "phpunit/phpunit": "^10.0 || ^11.0 || ^12.0", "squizlabs/php_codesniffer": "^3.3.1", - "weirdan/codeception-psalm-module": "^0.11.0", "weirdan/prophecy-shim": "^1.0 || ^2.0" }, "type": "psalm-plugin", @@ -4566,39 +5444,144 @@ "email": "github@muglug.com" } ], - "description": "Psalm plugin for PHPUnit", + "description": "Psalm plugin for PHPUnit", + "support": { + "issues": "https://github.com/psalm/psalm-plugin-phpunit/issues", + "source": "https://github.com/psalm/psalm-plugin-phpunit/tree/0.19.7" + }, + "time": "2025-03-31T18:49:55+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], "support": { - "issues": "https://github.com/psalm/psalm-plugin-phpunit/issues", - "source": "https://github.com/psalm/psalm-plugin-phpunit/tree/0.19.0" + "source": "https://github.com/php-fig/http-factory" }, - "time": "2024-03-15T10:43:15+00:00" + "time": "2024-04-15T12:06:14+00:00" }, { - "name": "psr/event-dispatcher", - "version": "1.0.0", + "name": "psr/http-message", + "version": "2.0", "source": { "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Psr\\EventDispatcher\\": "src/" + "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -4608,20 +5591,23 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], - "description": "Standard interfaces for event handling.", + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", "keywords": [ - "events", + "http", + "http-message", "psr", - "psr-14" + "psr-7", + "request", + "response" ], "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + "source": "https://github.com/php-fig/http-message/tree/2.0" }, - "time": "2019-01-08T18:20:26+00:00" + "time": "2023-04-04T09:54:51+00:00" }, { "name": "react/cache", @@ -5076,6 +6062,78 @@ ], "time": "2024-06-11T12:45:25+00:00" }, + { + "name": "revolt/event-loop", + "version": "v1.0.9", + "source": { + "type": "git", + "url": "https://github.com/revoltphp/event-loop.git", + "reference": "44061cf513e53c6200372fc935ac42271566295d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/44061cf513e53c6200372fc935ac42271566295d", + "reference": "44061cf513e53c6200372fc935ac42271566295d", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "ext-json": "*", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^9", + "psalm/phar": "6.16.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Revolt\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Rock-solid event loop for concurrent PHP applications.", + "keywords": [ + "async", + "asynchronous", + "concurrency", + "event", + "event-loop", + "non-blocking", + "scheduler" + ], + "support": { + "issues": "https://github.com/revoltphp/event-loop/issues", + "source": "https://github.com/revoltphp/event-loop/tree/v1.0.9" + }, + "time": "2026-05-16T17:55:38+00:00" + }, { "name": "rogervila/php-sonarqube-scanner", "version": "1.1.0", @@ -5133,28 +6191,28 @@ }, { "name": "sebastian/cli-parser", - "version": "1.0.2", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" + "reference": "48a4654fa5e48c1c81214e9930048a572d4b23ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/48a4654fa5e48c1c81214e9930048a572d4b23ca", + "reference": "48a4654fa5e48c1c81214e9930048a572d4b23ca", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -5177,153 +6235,60 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/5.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" - } - ], - "time": "2024-03-02T06:27:43+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ + }, { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, { - "url": "https://github.com/sebastianbergmann", - "type": "github" + "url": "https://tidelift.com/funding/github/packagist/sebastian/cli-parser", + "type": "tidelift" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2026-02-06T04:39:44+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.10", + "version": "8.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "e4df00b9b3571187db2831ae9aada2c6efbd715d" + "reference": "ce999bf08b2c387a5423fe56961c32eed3f88089" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/e4df00b9b3571187db2831ae9aada2c6efbd715d", - "reference": "e4df00b9b3571187db2831ae9aada2c6efbd715d", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/ce999bf08b2c387a5423fe56961c32eed3f88089", + "reference": "ce999bf08b2c387a5423fe56961c32eed3f88089", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.4", + "sebastian/diff": "^8.3", + "sebastian/exporter": "^8.0.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.1.10" + }, + "suggest": { + "ext-bcmath": "For comparing BcMath\\Number objects" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "8.2-dev" } }, "autoload": { @@ -5362,7 +6327,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.10" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/8.2.1" }, "funding": [ { @@ -5382,33 +6348,33 @@ "type": "tidelift" } ], - "time": "2026-01-24T09:22:56+00:00" + "time": "2026-05-21T04:46:40+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.3", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" + "reference": "c5651c795c98093480df79350cb050813fc7a2f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/c5651c795c98093480df79350cb050813fc7a2f3", + "reference": "c5651c795c98093480df79350cb050813fc7a2f3", "shasum": "" }, "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" + "nikic/php-parser": "^5.0", + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -5431,41 +6397,54 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/6.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/complexity", + "type": "tidelift" } ], - "time": "2023-12-22T06:19:30+00:00" + "time": "2026-02-06T04:41:32+00:00" }, { "name": "sebastian/diff", - "version": "4.0.6", + "version": "8.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" + "reference": "b36d33b6e796513de7cb7df053afb3f55eefcd47" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b36d33b6e796513de7cb7df053afb3f55eefcd47", + "reference": "b36d33b6e796513de7cb7df053afb3f55eefcd47", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" + "phpunit/phpunit": "^13.0", + "symfony/process": "^7.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "8.3-dev" } }, "autoload": { @@ -5497,35 +6476,48 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/8.3.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/diff", + "type": "tidelift" } ], - "time": "2024-03-02T06:30:58+00:00" + "time": "2026-05-15T04:58:09+00:00" }, { "name": "sebastian/environment", - "version": "5.1.5", + "version": "9.3.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + "reference": "a15fa79a5f5cfd0e9f6817dbcdb0048e99efa146" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/a15fa79a5f5cfd0e9f6817dbcdb0048e99efa146", + "reference": "a15fa79a5f5cfd0e9f6817dbcdb0048e99efa146", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.1.10" }, "suggest": { "ext-posix": "*" @@ -5533,7 +6525,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "9.3-dev" } }, "autoload": { @@ -5552,7 +6544,7 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "homepage": "https://github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", @@ -5560,42 +6552,55 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/9.3.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/environment", + "type": "tidelift" } ], - "time": "2023-02-03T06:03:51+00:00" + "time": "2026-05-21T08:47:00+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.8", + "version": "8.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "14c6ba52f95a36c3d27c835d65efc7123c446e8c" + "reference": "c0d29a945f8cf82f300a05e69874508e307ca4c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/14c6ba52f95a36c3d27c835d65efc7123c446e8c", - "reference": "14c6ba52f95a36c3d27c835d65efc7123c446e8c", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c0d29a945f8cf82f300a05e69874508e307ca4c6", + "reference": "c0d29a945f8cf82f300a05e69874508e307ca4c6", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.4", + "sebastian/recursion-context": "^8.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.1.10" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "8.1-dev" } }, "autoload": { @@ -5636,8 +6641,78 @@ "exporter" ], "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.8" + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/8.1.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter", + "type": "tidelift" + } + ], + "time": "2026-05-21T11:50:56+00:00" + }, + { + "name": "sebastian/git-state", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/git-state.git", + "reference": "792a952e0eba55b6960a48aeceb9f371aad1f76b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/git-state/zipball/792a952e0eba55b6960a48aeceb9f371aad1f76b", + "reference": "792a952e0eba55b6960a48aeceb9f371aad1f76b", + "shasum": "" + }, + "require": { + "php": ">=8.4" + }, + "require-dev": { + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for describing the state of a Git checkout", + "homepage": "https://github.com/sebastianbergmann/git-state", + "support": { + "issues": "https://github.com/sebastianbergmann/git-state/issues", + "security": "https://github.com/sebastianbergmann/git-state/security/policy", + "source": "https://github.com/sebastianbergmann/git-state/tree/1.0.0" }, "funding": [ { @@ -5653,42 +6728,39 @@ "type": "thanks_dev" }, { - "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter", + "url": "https://tidelift.com/funding/github/packagist/sebastian/git-state", "type": "tidelift" } ], - "time": "2025-09-24T06:03:27+00:00" + "time": "2026-03-21T12:54:28+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.8", + "version": "9.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "b6781316bdcd28260904e7cc18ec983d0d2ef4f6" + "reference": "e52e3dc22441e6218c710afe72c3042f8fc41ea7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/b6781316bdcd28260904e7cc18ec983d0d2ef4f6", - "reference": "b6781316bdcd28260904e7cc18ec983d0d2ef4f6", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e52e3dc22441e6218c710afe72c3042f8fc41ea7", + "reference": "e52e3dc22441e6218c710afe72c3042f8fc41ea7", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.4", + "sebastian/object-reflector": "^6.0", + "sebastian/recursion-context": "^8.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^13.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "9.0-dev" } }, "autoload": { @@ -5707,13 +6779,14 @@ } ], "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.8" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/9.0.0" }, "funding": [ { @@ -5733,33 +6806,33 @@ "type": "tidelift" } ], - "time": "2025-08-10T07:10:35+00:00" + "time": "2026-02-06T04:45:13+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.4", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" + "reference": "d2cff273a90c79b0eb590baa682d4b5c318bdbb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d2cff273a90c79b0eb590baa682d4b5c318bdbb7", + "reference": "d2cff273a90c79b0eb590baa682d4b5c318bdbb7", "shasum": "" }, "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" + "nikic/php-parser": "^5.7.0", + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.1.10" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -5782,42 +6855,55 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/5.0.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/lines-of-code", + "type": "tidelift" } ], - "time": "2023-12-22T06:20:34+00:00" + "time": "2026-05-19T16:23:37+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.4", + "version": "8.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "b39ab125fd9a7434b0ecbc4202eebce11a98cfc5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/b39ab125fd9a7434b0ecbc4202eebce11a98cfc5", + "reference": "b39ab125fd9a7434b0ecbc4202eebce11a98cfc5", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.4", + "sebastian/object-reflector": "^6.0", + "sebastian/recursion-context": "^8.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "8.0-dev" } }, "autoload": { @@ -5839,40 +6925,53 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/8.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/object-enumerator", + "type": "tidelift" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2026-02-06T04:46:36+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.4", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "3ca042c2c60b0eab094f8a1b6a7093f4d4c72200" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/3ca042c2c60b0eab094f8a1b6a7093f4d4c72200", + "reference": "3ca042c2c60b0eab094f8a1b6a7093f4d4c72200", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -5894,40 +6993,53 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/6.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/object-reflector", + "type": "tidelift" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2026-02-06T04:47:13+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.6", + "version": "8.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "539c6691e0623af6dc6f9c20384c120f963465a0" + "reference": "74c5af21f6a5833e91767ca068c4d3dfec15317e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/539c6691e0623af6dc6f9c20384c120f963465a0", - "reference": "539c6691e0623af6dc6f9c20384c120f963465a0", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/74c5af21f6a5833e91767ca068c4d3dfec15317e", + "reference": "74c5af21f6a5833e91767ca068c4d3dfec15317e", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^13.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "8.0-dev" } }, "autoload": { @@ -5957,7 +7069,8 @@ "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.6" + "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/8.0.0" }, "funding": [ { @@ -5977,86 +7090,32 @@ "type": "tidelift" } ], - "time": "2025-08-10T06:57:39+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-14T16:00:52+00:00" + "time": "2026-02-06T04:51:28+00:00" }, { "name": "sebastian/type", - "version": "3.2.1", + "version": "7.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + "reference": "fee0309275847fefd7636167085e379c1dbf6990" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fee0309275847fefd7636167085e379c1dbf6990", + "reference": "fee0309275847fefd7636167085e379c1dbf6990", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^13.1.10" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -6079,37 +7138,50 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + "security": "https://github.com/sebastianbergmann/type/security/policy", + "source": "https://github.com/sebastianbergmann/type/tree/7.0.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/type", + "type": "tidelift" } ], - "time": "2023-02-03T06:13:03+00:00" + "time": "2026-05-20T06:49:11+00:00" }, { "name": "sebastian/version", - "version": "3.0.2", + "version": "7.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "reference": "ad37a5552c8e2b88572249fdc19b6da7792e021b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/ad37a5552c8e2b88572249fdc19b6da7792e021b", + "reference": "ad37a5552c8e2b88572249fdc19b6da7792e021b", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -6132,41 +7204,58 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "security": "https://github.com/sebastianbergmann/version/security/policy", + "source": "https://github.com/sebastianbergmann/version/tree/7.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/version", + "type": "tidelift" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2026-02-06T04:52:52+00:00" }, { "name": "spatie/array-to-xml", - "version": "2.17.1", + "version": "3.4.4", "source": { "type": "git", "url": "https://github.com/spatie/array-to-xml.git", - "reference": "5cbec9c6ab17e320c58a259f0cebe88bde4a7c46" + "reference": "88b2f3852a922dd73177a68938f8eb2ec70c7224" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/5cbec9c6ab17e320c58a259f0cebe88bde4a7c46", - "reference": "5cbec9c6ab17e320c58a259f0cebe88bde4a7c46", + "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/88b2f3852a922dd73177a68938f8eb2ec70c7224", + "reference": "88b2f3852a922dd73177a68938f8eb2ec70c7224", "shasum": "" }, "require": { "ext-dom": "*", - "php": "^7.4|^8.0" + "php": "^8.0" }, "require-dev": { "mockery/mockery": "^1.2", "pestphp/pest": "^1.21", - "phpunit/phpunit": "^9.0", "spatie/pest-plugin-snapshots": "^1.1" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, "autoload": { "psr-4": { "Spatie\\ArrayToXml\\": "src" @@ -6192,7 +7281,7 @@ "xml" ], "support": { - "source": "https://github.com/spatie/array-to-xml/tree/2.17.1" + "source": "https://github.com/spatie/array-to-xml/tree/3.4.4" }, "funding": [ { @@ -6204,30 +7293,30 @@ "type": "github" } ], - "time": "2022-12-26T08:22:07+00:00" + "time": "2025-12-15T09:00:41+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.13.5", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4" + "reference": "0525c73950de35ded110cffafb9892946d7771b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0ca86845ce43291e8f5692c7356fccf3bcf02bf4", - "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0525c73950de35ded110cffafb9892946d7771b5", + "reference": "0525c73950de35ded110cffafb9892946d7771b5", "shasum": "" }, "require": { "ext-simplexml": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": ">=5.4.0" + "php": ">=7.2.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" + "phpunit/phpunit": "^8.4.0 || ^9.3.4 || ^10.5.32 || 11.3.3 - 11.5.28 || ^11.5.31" }, "bin": [ "bin/phpcbf", @@ -6252,7 +7341,7 @@ "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "description": "PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.", "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", "keywords": [ "phpcs", @@ -6283,42 +7372,90 @@ "type": "thanks_dev" } ], - "time": "2025-11-04T16:30:35+00:00" + "time": "2025-11-10T16:43:36+00:00" + }, + { + "name": "staabm/side-effects-detector", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/staabm/side-effects-detector.git", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.6", + "phpunit/phpunit": "^9.6.21", + "symfony/var-dumper": "^5.4.43", + "tomasvotruba/type-coverage": "1.0.0", + "tomasvotruba/unused-public": "1.0.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A static analysis tool to detect side effects in PHP code", + "keywords": [ + "static analysis" + ], + "support": { + "issues": "https://github.com/staabm/side-effects-detector/issues", + "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5" + }, + "funding": [ + { + "url": "https://github.com/staabm", + "type": "github" + } + ], + "time": "2024-10-20T05:08:20+00:00" }, { "name": "symfony/config", - "version": "v5.4.46", + "version": "v7.4.10", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "977c88a02d7d3f16904a81907531b19666a08e78" + "reference": "d91b6c7cd2a8c9a9c2b8d26c8f5ed48edf99ef57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/977c88a02d7d3f16904a81907531b19666a08e78", - "reference": "977c88a02d7d3f16904a81907531b19666a08e78", + "url": "https://api.github.com/repos/symfony/config/zipball/d91b6c7cd2a8c9a9c2b8d26c8f5ed48edf99ef57", + "reference": "d91b6c7cd2a8c9a9c2b8d26c8f5ed48edf99ef57", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/filesystem": "^4.4|^5.0|^6.0", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-php80": "^1.16", - "symfony/polyfill-php81": "^1.22" + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/filesystem": "^7.1|^8.0", + "symfony/polyfill-ctype": "~1.8" }, "conflict": { - "symfony/finder": "<4.4" + "symfony/finder": "<6.4", + "symfony/service-contracts": "<2.5" }, "require-dev": { - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/messenger": "^4.4|^5.0|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/yaml": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/yaml": "To use the yaml reference dumper" + "symfony/event-dispatcher": "^6.4|^7.0|^8.0", + "symfony/finder": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/yaml": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -6346,7 +7483,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v5.4.46" + "source": "https://github.com/symfony/config/tree/v7.4.10" }, "funding": [ { @@ -6357,57 +7494,52 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-10-30T07:58:02+00:00" + "time": "2026-05-03T14:20:49+00:00" }, { "name": "symfony/dependency-injection", - "version": "v5.4.48", + "version": "v7.4.10", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "e5ca16dee39ef7d63e552ff0bf0a2526a1142c92" + "reference": "4eb0d9dfa9d4f7c59216baf49b3ed6b1fb72293d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/e5ca16dee39ef7d63e552ff0bf0a2526a1142c92", - "reference": "e5ca16dee39ef7d63e552ff0bf0a2526a1142c92", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/4eb0d9dfa9d4f7c59216baf49b3ed6b1fb72293d", + "reference": "4eb0d9dfa9d4f7c59216baf49b3ed6b1fb72293d", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1.1", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16", - "symfony/polyfill-php81": "^1.22", - "symfony/service-contracts": "^1.1.6|^2" + "php": ">=8.2", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/service-contracts": "^3.6", + "symfony/var-exporter": "^6.4.20|^7.2.5|^8.0" }, "conflict": { "ext-psr": "<1.1|>=2", - "symfony/config": "<5.3", - "symfony/finder": "<4.4", - "symfony/proxy-manager-bridge": "<4.4", - "symfony/yaml": "<4.4.26" + "symfony/config": "<6.4", + "symfony/finder": "<6.4", + "symfony/yaml": "<6.4" }, "provide": { - "psr/container-implementation": "1.0", - "symfony/service-implementation": "1.0|2.0" + "psr/container-implementation": "1.1|2.0", + "symfony/service-implementation": "1.1|2.0|3.0" }, "require-dev": { - "symfony/config": "^5.3|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/yaml": "^4.4.26|^5.0|^6.0" - }, - "suggest": { - "symfony/config": "", - "symfony/expression-language": "For using expressions in service container configuration", - "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required", - "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", - "symfony/yaml": "" + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/yaml": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -6435,7 +7567,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v5.4.48" + "source": "https://github.com/symfony/dependency-injection/tree/v7.4.10" }, "funding": [ { @@ -6446,53 +7578,53 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-11-20T10:51:57+00:00" + "time": "2026-05-06T11:55:30+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.4.45", + "version": "v8.0.9", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "72982eb416f61003e9bb6e91f8b3213600dcf9e9" + "reference": "0c3c1a17604c4dbbec4b93fe162c538482096e1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/72982eb416f61003e9bb6e91f8b3213600dcf9e9", - "reference": "72982eb416f61003e9bb6e91f8b3213600dcf9e9", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/0c3c1a17604c4dbbec4b93fe162c538482096e1f", + "reference": "0c3c1a17604c4dbbec4b93fe162c538482096e1f", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^2|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.4", + "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { - "symfony/dependency-injection": "<4.4" + "symfony/security-http": "<7.4", + "symfony/service-contracts": "<2.5" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" + "symfony/event-dispatcher-implementation": "2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "symfony/config": "^7.4|^8.0", + "symfony/dependency-injection": "^7.4|^8.0", + "symfony/error-handler": "^7.4|^8.0", + "symfony/expression-language": "^7.4|^8.0", + "symfony/framework-bundle": "^7.4|^8.0", + "symfony/http-foundation": "^7.4|^8.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -6520,7 +7652,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.45" + "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.9" }, "funding": [ { @@ -6531,34 +7663,35 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-25T14:11:13+00:00" + "time": "2026-04-18T13:51:42+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.4", + "version": "v3.7.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "e0fe3d79b516eb75126ac6fa4cbf19b79b08c99f" + "reference": "ccba7060602b7fed0b03c85bf025257f76d9ef32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/e0fe3d79b516eb75126ac6fa4cbf19b79b08c99f", - "reference": "e0fe3d79b516eb75126ac6fa4cbf19b79b08c99f", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/ccba7060602b7fed0b03c85bf025257f76d9ef32", + "reference": "ccba7060602b7fed0b03c85bf025257f76d9ef32", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", "psr/event-dispatcher": "^1" }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, "type": "library", "extra": { "thanks": { @@ -6566,7 +7699,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.7-dev" } }, "autoload": { @@ -6599,7 +7732,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.4" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.7.0" }, "funding": [ { @@ -6610,32 +7743,34 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-25T14:11:13+00:00" + "time": "2026-01-05T13:30:16+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.4.45", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "74e5b6f0db3e8589e6cfd5efb317a1fc2bb52fb6" + "reference": "b48bce0a70b914f6953dafbd10474df232ed4de8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/74e5b6f0db3e8589e6cfd5efb317a1fc2bb52fb6", - "reference": "74e5b6f0db3e8589e6cfd5efb317a1fc2bb52fb6", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/b48bce0a70b914f6953dafbd10474df232ed4de8", + "reference": "b48bce0a70b914f6953dafbd10474df232ed4de8", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.4", + "symfony/deprecation-contracts": "^2.5|^3" }, "type": "library", "autoload": { @@ -6668,7 +7803,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.45" + "source": "https://github.com/symfony/options-resolver/tree/v8.0.8" }, "funding": [ { @@ -6679,30 +7814,34 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-25T14:11:13+00:00" + "time": "2026-03-30T15:14:47+00:00" }, { "name": "symfony/stopwatch", - "version": "v5.4.45", + "version": "v8.0.8", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "fb2c199cf302eb207f8c23e7ee174c1c31a5c004" + "reference": "85954ed72d5440ea4dc9a10b7e49e01df766ffa3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fb2c199cf302eb207f8c23e7ee174c1c31a5c004", - "reference": "fb2c199cf302eb207f8c23e7ee174c1c31a5c004", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/85954ed72d5440ea4dc9a10b7e49e01df766ffa3", + "reference": "85954ed72d5440ea4dc9a10b7e49e01df766ffa3", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/service-contracts": "^1|^2|^3" + "php": ">=8.4", + "symfony/service-contracts": "^2.5|^3" }, "type": "library", "autoload": { @@ -6730,7 +7869,87 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v5.4.45" + "source": "https://github.com/symfony/stopwatch/tree/v8.0.8" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-03-30T15:14:47+00:00" + }, + { + "name": "symfony/var-exporter", + "version": "v8.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-exporter.git", + "reference": "24cf67be4dd0926e4413635418682f4fff831412" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/24cf67be4dd0926e4413635418682f4fff831412", + "reference": "24cf67be4dd0926e4413635418682f4fff831412", + "shasum": "" + }, + "require": { + "php": ">=8.4" + }, + "require-dev": { + "symfony/property-access": "^7.4|^8.0", + "symfony/serializer": "^7.4|^8.0", + "symfony/var-dumper": "^7.4|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\VarExporter\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows exporting any serializable PHP data structure to plain PHP code", + "homepage": "https://symfony.com", + "keywords": [ + "clone", + "construct", + "export", + "hydrate", + "instantiate", + "lazy-loading", + "proxy", + "serialize" + ], + "support": { + "source": "https://github.com/symfony/var-exporter/tree/v8.0.9" }, "funding": [ { @@ -6741,32 +7960,36 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-25T14:11:13+00:00" + "time": "2026-04-18T13:51:42+00:00" }, { "name": "theseer/tokenizer", - "version": "1.3.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "b7489ce515e168639d17feec34b8847c326b0b3c" + "reference": "7989e43bf381af0eac72e4f0ca5bcbfa81658be4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b7489ce515e168639d17feec34b8847c326b0b3c", - "reference": "b7489ce515e168639d17feec34b8847c326b0b3c", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/7989e43bf381af0eac72e4f0ca5bcbfa81658be4", + "reference": "7989e43bf381af0eac72e4f0ca5bcbfa81658be4", "shasum": "" }, "require": { "ext-dom": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" + "php": "^8.1" }, "type": "library", "autoload": { @@ -6788,7 +8011,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.3.1" + "source": "https://github.com/theseer/tokenizer/tree/2.0.1" }, "funding": [ { @@ -6796,7 +8019,7 @@ "type": "github" } ], - "time": "2025-11-17T20:03:58+00:00" + "time": "2025-12-08T11:19:18+00:00" }, { "name": "tivie/php-os-detector", @@ -6852,24 +8075,26 @@ }, { "name": "vimeo/psalm", - "version": "5.26.1", + "version": "6.16.1", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "d747f6500b38ac4f7dfc5edbcae6e4b637d7add0" + "reference": "f1f5de594dc76faf8784e02d3dc4716c91c6f6ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/d747f6500b38ac4f7dfc5edbcae6e4b637d7add0", - "reference": "d747f6500b38ac4f7dfc5edbcae6e4b637d7add0", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/f1f5de594dc76faf8784e02d3dc4716c91c6f6ac", + "reference": "f1f5de594dc76faf8784e02d3dc4716c91c6f6ac", "shasum": "" }, "require": { - "amphp/amp": "^2.4.2", - "amphp/byte-stream": "^1.5", + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/parallel": "^2.3", "composer-runtime-api": "^2", "composer/semver": "^1.4 || ^2.0 || ^3.0", "composer/xdebug-handler": "^2.0 || ^3.0", + "danog/advanced-json-rpc": "^3.1", "dnoegel/php-xdg-base-dir": "^0.1.1", "ext-ctype": "*", "ext-dom": "*", @@ -6878,27 +8103,26 @@ "ext-mbstring": "*", "ext-simplexml": "*", "ext-tokenizer": "*", - "felixfbecker/advanced-json-rpc": "^3.1", - "felixfbecker/language-server-protocol": "^1.5.2", + "felixfbecker/language-server-protocol": "^1.5.3", "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1 || ^1.0.0", - "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "nikic/php-parser": "^4.17", - "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", - "sebastian/diff": "^4.0 || ^5.0 || ^6.0", + "netresearch/jsonmapper": "^5.0", + "nikic/php-parser": "^5.0.0", + "php": "~8.1.31 || ~8.2.27 || ~8.3.16 || ~8.4.3 || ~8.5.0", + "sebastian/diff": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0", "spatie/array-to-xml": "^2.17.0 || ^3.0", - "symfony/console": "^4.1.6 || ^5.0 || ^6.0 || ^7.0", - "symfony/filesystem": "^5.4 || ^6.0 || ^7.0" - }, - "conflict": { - "nikic/php-parser": "4.17.0" + "symfony/console": "^6.0 || ^7.0 || ^8.0", + "symfony/filesystem": "~6.3.12 || ~6.4.3 || ^7.0.3 || ^8.0", + "symfony/polyfill-php84": "^1.31.0" }, "provide": { "psalm/psalm": "self.version" }, "require-dev": { - "amphp/phpunit-util": "^2.0", + "amphp/phpunit-util": "^3", "bamarni/composer-bin-plugin": "^1.4", "brianium/paratest": "^6.9", + "danog/class-finder": "^0.4.8", + "dg/bypass-finals": "^1.5", "ext-curl": "*", "mockery/mockery": "^1.5", "nunomaduro/mock-final-classes": "^1.1", @@ -6906,10 +8130,10 @@ "phpstan/phpdoc-parser": "^1.6", "phpunit/phpunit": "^9.6", "psalm/plugin-mockery": "^1.1", - "psalm/plugin-phpunit": "^0.18", + "psalm/plugin-phpunit": "^0.19", "slevomat/coding-standard": "^8.4", "squizlabs/php_codesniffer": "^3.6", - "symfony/process": "^4.4 || ^5.0 || ^6.0 || ^7.0" + "symfony/process": "^6.0 || ^7.0 || ^8.0" }, "suggest": { "ext-curl": "In order to send data to shepherd", @@ -6920,6 +8144,7 @@ "psalm-language-server", "psalm-plugin", "psalm-refactor", + "psalm-review", "psalter" ], "type": "project", @@ -6929,7 +8154,9 @@ "dev-2.x": "2.x-dev", "dev-3.x": "3.x-dev", "dev-4.x": "4.x-dev", - "dev-master": "5.x-dev" + "dev-5.x": "5.x-dev", + "dev-6.x": "6.x-dev", + "dev-master": "7.x-dev" } }, "autoload": { @@ -6944,6 +8171,10 @@ "authors": [ { "name": "Matthew Brown" + }, + { + "name": "Daniil Gentili", + "email": "daniil@daniil.it" } ], "description": "A static analysis tool for finding errors in PHP applications", @@ -6958,27 +8189,27 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2024-09-08T18:53:08+00:00" + "time": "2026-03-19T10:56:09+00:00" }, { "name": "webmozart/assert", - "version": "1.12.1", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "9be6926d8b485f55b9229203f962b51ed377ba68" + "reference": "9007ea6f45ecf352a9422b36644e4bfc039b9155" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/9be6926d8b485f55b9229203f962b51ed377ba68", - "reference": "9be6926d8b485f55b9229203f962b51ed377ba68", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/9007ea6f45ecf352a9422b36644e4bfc039b9155", + "reference": "9007ea6f45ecf352a9422b36644e4bfc039b9155", "shasum": "" }, "require": { "ext-ctype": "*", "ext-date": "*", "ext-filter": "*", - "php": "^7.2 || ^8.0" + "php": "^8.2" }, "suggest": { "ext-intl": "", @@ -6987,8 +8218,12 @@ }, "type": "library", "extra": { + "psalm": { + "pluginClass": "Webmozart\\Assert\\PsalmPlugin" + }, "branch-alias": { - "dev-master": "1.10-dev" + "dev-master": "2.0-dev", + "dev-feature/2-0": "2.0-dev" } }, "autoload": { @@ -7004,6 +8239,10 @@ { "name": "Bernhard Schussek", "email": "bschussek@gmail.com" + }, + { + "name": "Woody Gilk", + "email": "woody.gilk@gmail.com" } ], "description": "Assertions to validate method input/output with nice error messages.", @@ -7014,9 +8253,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.12.1" + "source": "https://github.com/webmozarts/assert/tree/2.4.0" }, - "time": "2025-10-29T15:56:20+00:00" + "time": "2026-05-20T13:07:01+00:00" } ], "aliases": [], @@ -7025,11 +8264,11 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": ">=7.4" + "php": ">=8.4.1" }, "platform-dev": {}, "platform-overrides": { - "php": "7.4.0" + "php": "8.4.3" }, "plugin-api-version": "2.6.0" } From 656fa57a1a49f3ba62475b86bc42e5875ad1afdb Mon Sep 17 00:00:00 2001 From: ollily <426229+ollily@users.noreply.github.com> Date: Sat, 23 May 2026 19:57:32 +0200 Subject: [PATCH 2/9] #1: switch to php 8.4 / untested --- composer.json | 2 +- composer.lock | 22 ++--- nbproject/project.properties | 6 +- .../Framework/ConstantCheckTestCase.php | 37 ++++---- src/PHPUnit/Framework/EasyGoingTestCase.php | 33 ++++--- src/Tools/Batch/TaskItem.php | 25 ++---- src/Tools/String/ToStringTrait.php | 8 +- src/Tools/Test/TestDataFoo.php | 12 +-- .../ConstantCheckTestCaseClazz.php | 46 +++------- .../ConstantCheckTestCaseTest.php | 89 +++++++++---------- .../EasyGoingTestCaseClazz.php | 3 + .../EasyGoingTestCaseTest.php | 44 ++++----- tests/Tools/Batch/BatchTaskHelperTest.php | 11 ++- tests/Tools/Batch/TaskListTest.php | 37 +++----- tests/Tools/EmergencyTest.php | 11 ++- tests/Tools/PhpVersionTraitTest.php | 6 +- .../Reflection/ChildClazzesHelperTest.php | 6 +- tests/Tools/String/ImplodeTraitTest.php | 6 +- tests/Tools/String/ToStringTraitTest.php | 12 +-- .../String/ToStringTraitTestDummyClazz.php | 13 +-- tests/Tools/Test/TestDataFooTest.php | 10 ++- tests/Tools/Test/TestDataTest.php | 8 +- 22 files changed, 196 insertions(+), 251 deletions(-) diff --git a/composer.json b/composer.json index a7c535d..1bddff2 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "prefer-stable": true, "require": { "php": ">=8.4.1", - "php-ds/php-ds": "^2.0", + "php-ds/php-ds": "^1.0", "psr/log": "^1.0||^2.0||^3.0", "composer/composer": "^2.0" }, diff --git a/composer.lock b/composer.lock index 026e2ff..ebb6837 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6782bd4890c67575243cec15f9f468a9", + "content-hash": "dbb4908e4edbe739a10c13ff05fafb14", "packages": [ { "name": "composer/ca-bundle", @@ -777,36 +777,32 @@ }, { "name": "php-ds/php-ds", - "version": "v2.0.1", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/php-ds/polyfill.git", - "reference": "890702aa2b2e74b027a51800b3c1f58148124d14" + "reference": "2e1c133b99aaa1a5fa2318257a6e2501b9082b55" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-ds/polyfill/zipball/890702aa2b2e74b027a51800b3c1f58148124d14", - "reference": "890702aa2b2e74b027a51800b3c1f58148124d14", + "url": "https://api.github.com/repos/php-ds/polyfill/zipball/2e1c133b99aaa1a5fa2318257a6e2501b9082b55", + "reference": "2e1c133b99aaa1a5fa2318257a6e2501b9082b55", "shasum": "" }, "require": { "php": ">=8.2" }, "provide": { - "ext-ds": "2.0.0" + "ext-ds": "1.5.0" }, "require-dev": { - "php-ds/tests": "@dev", - "phpunit/phpunit": "^11.0" + "php-ds/tests": "^1.8" }, "suggest": { "ext-ds": "to improve performance and reduce memory usage" }, "type": "library", "autoload": { - "files": [ - "src/functions.php" - ], "psr-4": { "Ds\\": "src" } @@ -830,9 +826,9 @@ ], "support": { "issues": "https://github.com/php-ds/polyfill/issues", - "source": "https://github.com/php-ds/polyfill/tree/v2.0.1" + "source": "https://github.com/php-ds/polyfill/tree/v1.8.0" }, - "time": "2026-05-17T18:41:55+00:00" + "time": "2026-04-10T23:35:50+00:00" }, { "name": "psr/container", diff --git a/nbproject/project.properties b/nbproject/project.properties index 684c32c..f3b2e21 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -27,8 +27,8 @@ auxiliary.org-netbeans-modules-php-phpunit.configuration_2e_enabled=true auxiliary.org-netbeans-modules-php-phpunit.configuration_2e_path=phpunit.xml.dist auxiliary.org-netbeans-modules-php-phpunit.customSuite_2e_enabled=false auxiliary.org-netbeans-modules-php-phpunit.customSuite_2e_path= -auxiliary.org-netbeans-modules-php-phpunit.phpUnit_2e_enabled=false -auxiliary.org-netbeans-modules-php-phpunit.phpUnit_2e_path= +auxiliary.org-netbeans-modules-php-phpunit.phpUnit_2e_enabled=true +auxiliary.org-netbeans-modules-php-phpunit.phpUnit_2e_path=vendor/bin/phpunit.bat auxiliary.org-netbeans-modules-php-phpunit.relativePath_2e_enabled=false auxiliary.org-netbeans-modules-php-phpunit.test_2e_groups_2e_ask=false auxiliary.org-netbeans-modules-php-phpunit.test_2e_run_2e_all=false @@ -120,7 +120,7 @@ include.path=\ ${file.reference.vendor-tivie}:\ ${file.reference.vendor-vimeo}:\ ${file.reference.vendor-webmozart} -php.version=PHP_74 +php.version=PHP_84 project.license=apache20 source.encoding=UTF-8 src.dir=src diff --git a/src/PHPUnit/Framework/ConstantCheckTestCase.php b/src/PHPUnit/Framework/ConstantCheckTestCase.php index 97d4613..2f73cc7 100644 --- a/src/PHPUnit/Framework/ConstantCheckTestCase.php +++ b/src/PHPUnit/Framework/ConstantCheckTestCase.php @@ -18,11 +18,11 @@ abstract class ConstantCheckTestCase extends EasyGoingTestCase { - public const DIFF_ZERO = 0; + public const int DIFF_ZERO = 0; - public const INIT_CONST_COUNT = 0; + public const int INIT_CONST_COUNT = 0; - public const INIT_CROSSCHECK = false; + public const bool INIT_CROSSCHECK = false; /** * @var bool TRUE=Execute a constants cross check (Default: FALSE) @@ -38,13 +38,12 @@ abstract class ConstantCheckTestCase extends EasyGoingTestCase * @see ConstantCheckTestCase::$withConstCrossCheck * @see ConstantCheckTestCase::testAllConstants() */ - private static $expectedConstsCount = self::INIT_CONST_COUNT; + private static int $expectedConstsCount = self::INIT_CONST_COUNT; - /** @var mixed[] Array of the names of all constants in the class. */ - private static $actualConsts = []; + /** @var array Array of the names of all constants in the class. */ + private static array $actualConsts = []; - /** @var LoggerInterface */ - private static $logger; + private static LoggerInterface $logger; /** * Inits the constants crosscheck. @@ -55,6 +54,7 @@ abstract class ConstantCheckTestCase extends EasyGoingTestCase * @see ConstantCheckTestCase::$withConstCrossCheck * @see ConstantCheckTestCase::$expectedConstsCount */ + #[\Override] public static function setUpBeforeClass(bool $withConstCrossCheck = self::INIT_CROSSCHECK, int $expectedConstsCount = self::INIT_CONST_COUNT): void { self::$logger = EasyGoingLogger::init(ConstantCheckTestCase::class); @@ -73,6 +73,7 @@ public static function setUpBeforeClass(bool $withConstCrossCheck = self::INIT_C /** * Performs the constants crosscheck at the end. */ + #[\Override] public static function tearDownAfterClass(): void { self::$logger->debug('START'); @@ -99,12 +100,12 @@ public static function isWithConstCrossCheck(): bool /** * Executes the constant crosscheck and fails if a constant is not found or not expected to exist. * - * @param mixed $clazz the clazz having the constants to check - * @param mixed[] $actualConsts an array of the already found constants + * @param mixed $clazz the clazz having the constants to check + * @param array $actualConsts an array of the already found constants * * @see ConstantCheckTestCase::$withConstCrossCheck */ - protected static function crossCheckConstants($clazz, $actualConsts): void + protected static function crossCheckConstants(mixed $clazz, array $actualConsts): void { self::$logger->debug('START'); @@ -164,11 +165,11 @@ function ($value): string { /** * Adds an array of constants which have been found. * - * @param null|mixed[] $checkedConsts array of found constants + * @param null|array $checkedConsts array of found constants * * @see ConstantCheckTestCase::$withConstCrossCheck */ - protected static function updateActualConsts($checkedConsts): void + protected static function updateActualConsts(?array $checkedConsts): void { if (self::$withConstCrossCheck && !is_null($checkedConsts)) { self::$actualConsts = array_merge(self::$actualConsts, $checkedConsts); @@ -178,14 +179,14 @@ protected static function updateActualConsts($checkedConsts): void /** * Checks, if {@link $allDefinedConsts) has the size of {@link $expectedCount}. * - * @param int $expectedCount count of constants which must exists - * @param mixed[] $allDefinedConsts an array with all defined constants + * @param int $expectedCount count of constants which must exists + * @param array $allDefinedConsts an array with all defined constants * * @return array [true|false, count($allDefinedConsts)] * * @see ConstantCheckTestCase::$withConstCrossCheck */ - protected static function checkConstantsCount(int $expectedCount, $allDefinedConsts) + protected static function checkConstantsCount(int $expectedCount, array $allDefinedConsts): array { self::$logger->debug('START'); @@ -230,7 +231,7 @@ public function testAllConstants(): void * Checks, if all constants exists. * ['CONST1','CONST2',...]. * - * @param mixed[] $constants an array with constants to check + * @param array $constants an array with constants to check */ protected function verifyConstAllExists(array $constants = []): void { @@ -247,7 +248,7 @@ protected function verifyConstAllExists(array $constants = []): void * Checks, if all constants exists are arrays and have the expected size. * ['CONST1'=>3,'CONST2'=>10,...]. * - * @param mixed[] $constants an array with constants and expected sizes to check + * @param array $constants an array with constants and expected sizes to check */ protected function verifyConstArrayAllExists(array $constants = []): void { diff --git a/src/PHPUnit/Framework/EasyGoingTestCase.php b/src/PHPUnit/Framework/EasyGoingTestCase.php index 60ddb36..c0284db 100644 --- a/src/PHPUnit/Framework/EasyGoingTestCase.php +++ b/src/PHPUnit/Framework/EasyGoingTestCase.php @@ -19,16 +19,16 @@ abstract class EasyGoingTestCase extends TestCase { /** var string Separator for static access */ - public const C_STATIC_SEP = '::'; + public const string C_STATIC_SEP = '::'; /** @var string All primitive datatypes */ - protected const C_PRIMITIVES = 'int|integer|bool|boolean|float'; + protected const string C_PRIMITIVES = 'int|integer|bool|boolean|float'; /** @var LoggerInterface */ - private static $logger; + private static LoggerInterface $logger; /** @var mixed The object which will be tested. */ - protected $o2t; + protected mixed $o2t; /** * @return mixed @@ -40,28 +40,25 @@ abstract protected static function prepareO2t(); */ abstract protected function getCasto2t(); - /** - * @param mixed $name - * @param mixed[] $data - * @param string $dataName - */ - public function __construct($name = null, $data = [], $dataName = '') + #[\Override] + public static function setUpBeforeClass(): void { self::$logger = EasyGoingLogger::init(EasyGoingTestCase::class); self::$logger->debug('START'); - parent::__construct($name, $data, $dataName); - - $testInfo = [$this->get_called_function(), self::get_called_clazz()]; - self::$logger->debug('calledFunction,calledClazz', $testInfo); + parent::setUpBeforeClass(); self::$logger->debug('END'); } + #[\Override] public function setUp(): void { self::$logger->debug('START'); + $testInfo = [$this->get_called_function(), self::get_called_clazz()]; + self::$logger->debug('calledFunction,calledClazz', $testInfo); + parent::setUp(); $this->o2t = static::prepareO2t(); @@ -93,7 +90,7 @@ protected static function get_called_clazz(): string * * @return bool */ - protected static function isPrimitive($var): bool + protected static function isPrimitive(mixed $var): bool { $primitive = false; @@ -109,7 +106,7 @@ protected static function isPrimitive($var): bool * * @return mixed[] */ - protected static function getAllDefinedConsts($clazz): array + protected static function getAllDefinedConsts(mixed $clazz): array { $clazz = new \ReflectionClass($clazz); @@ -122,7 +119,7 @@ protected static function getAllDefinedConsts($clazz): array * * @return bool */ - protected static function isConstExist($clazz, string $constantName): bool + protected static function isConstExist(mixed $clazz, string $constantName): bool { self::$logger->debug('START'); @@ -166,7 +163,7 @@ public function testInit(): void * * @return mixed */ - protected static function getConstValue($clazz, string $constantName) + protected static function getConstValue(mixed $clazz, string $constantName): mixed { self::$logger->debug('START'); diff --git a/src/Tools/Batch/TaskItem.php b/src/Tools/Batch/TaskItem.php index c712ffa..87c9ce8 100644 --- a/src/Tools/Batch/TaskItem.php +++ b/src/Tools/Batch/TaskItem.php @@ -23,18 +23,11 @@ class TaskItem implements ITaskItem { use ToStringTrait; - /** - * @var mixed - * - * @phpstan-var TaskKey */ - private $key; + /** @phpstan-var TaskKey */ + private mixed $key; - /** - * @var array - * - * @phpstan-var TaskData - */ - private $data; + /** @phpstan-var TaskData */ + private array $data; /** * @param mixed $key @@ -43,7 +36,7 @@ class TaskItem implements ITaskItem * @phpstan-param TaskKey $key * @phpstan-param TaskData $data */ - public function __construct($key, array $data) + public function __construct(mixed $key, array $data) { $this->key = $key; $this->data = $data; @@ -52,6 +45,7 @@ public function __construct($key, array $data) /** * @inheritDoc */ + #[\Override] public function getKey() { return $this->key; @@ -60,15 +54,14 @@ public function getKey() /** * @inheritDoc */ + #[\Override] public function getData(): array { return $this->data; } - /** - * @return mixed - */ - protected function __toStringValues() // NOSONAR: php:S100 + #[\Override] + protected function __toStringValues(): mixed // NOSONAR: php:S100 { return $this->data; } diff --git a/src/Tools/String/ToStringTrait.php b/src/Tools/String/ToStringTrait.php index 238b2d9..7fcf695 100644 --- a/src/Tools/String/ToStringTrait.php +++ b/src/Tools/String/ToStringTrait.php @@ -18,16 +18,14 @@ trait ToStringTrait use ImplodeTrait; /** - * @return mixed - * * @SuppressWarnings("PHPMD.CamelCaseMethodName") */ - abstract protected function __toStringValues(); // NOSONAR: php:S100 + abstract protected function __toStringValues(): mixed; // NOSONAR: php:S100 /** * @inheritdoc */ - public function __toString() + public function __toString(): string { $value = $this->__toStringValues(); if (is_string($value)) { @@ -57,7 +55,7 @@ public function __toString() /** * @inheritdoc */ - public function __wakeup() + public function __wakeup(): void { throw new \BadMethodCallException("Cannot unserialize singleton"); } diff --git a/src/Tools/Test/TestDataFoo.php b/src/Tools/Test/TestDataFoo.php index 16551a8..c9f7f53 100644 --- a/src/Tools/Test/TestDataFoo.php +++ b/src/Tools/Test/TestDataFoo.php @@ -19,15 +19,14 @@ class TestDataFoo { use ToStringTrait; - /** @var null|mixed */ - private $fooValue; + private mixed $fooValue; /** * @param null|mixed $fooValue * * @return TestDataFoo */ - public static function init($fooValue = null): TestDataFoo + public static function init(mixed $fooValue = null): TestDataFoo { return new TestDataFoo($fooValue); } @@ -35,7 +34,7 @@ public static function init($fooValue = null): TestDataFoo /** * @param null|mixed $fooValue */ - public function __construct($fooValue = null) + public function __construct(mixed $fooValue = null) { $this->fooValue = $fooValue; } @@ -43,8 +42,9 @@ public function __construct($fooValue = null) /** * @return mixed */ - protected function __toStringValues() + #[\Override] + protected function __toStringValues(): mixed { - return $this; + return $this->fooValue; } } diff --git a/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseClazz.php b/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseClazz.php index 82c79dd..e9769b5 100644 --- a/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseClazz.php +++ b/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseClazz.php @@ -23,15 +23,20 @@ */ class ConstantCheckTestCaseClazz extends ConstantCheckTestCase // NOSONAR: php:S3360 { + #[\Override] + public static function setUpBeforeClass(bool $withConstCrossCheck = self::INIT_CROSSCHECK, int $expectedConstsCount = self::INIT_CONST_COUNT): void + { + parent::setUpBeforeClass($withConstCrossCheck, $expectedConstsCount); + } + + #[\Override] public static function tearDownAfterClass(): void { // Deactivate the check, will be called manually in testcase } - /** - * @return ConstantCheckTestCaseDummyClazz - */ - protected static function prepareO2t() + #[\Override] + protected static function prepareO2t(): ConstantCheckTestCaseDummyClazz { return new ConstantCheckTestCaseDummyClazz(); } @@ -39,6 +44,7 @@ protected static function prepareO2t() /** * @return ConstantCheckTestCaseDummyClazz */ + #[\Override] protected function getCasto2t() { return $this->o2t; @@ -46,54 +52,31 @@ protected function getCasto2t() // Override the visibility for the test cases - /** - * @param mixed $clazz - * @param mixed $actualConstants - */ - public static function publicCrossCheckConstants($clazz, $actualConstants): void + public static function publicCrossCheckConstants(mixed $clazz, array $actualConstants): void { parent::crossCheckConstants($clazz, $actualConstants); } - /** - * @param null|array $checkedConsts - */ - public static function publicUpdateActualConsts($checkedConsts): void + public static function publicUpdateActualConsts(?array $checkedConsts): void { parent::updateActualConsts($checkedConsts); } - /** - * @param int $expectedCount - * @param array $allDefinedConsts - * - * @return array - */ - public static function publicCheckConstantsCount(int $expectedCount, $allDefinedConsts) + public static function publicCheckConstantsCount(int $expectedCount, array $allDefinedConsts): array { return parent::checkConstantsCount($expectedCount, $allDefinedConsts); } - /** - * @param array $constants - */ public function publicVerifyConstAllExists(array $constants = []): void { parent::verifyConstAllExists($constants); } - /** - * @param array $constants - */ public function publicVerifyConstArrayAllExists(array $constants = []): void { parent::verifyConstArrayAllExists($constants); } - /** - * @param string $constantName - * @param int $expectedSize - */ public function publicVerifyConstArraySize(string $constantName, int $expectedSize): void { parent::verifyConstArraySize($constantName, $expectedSize); @@ -114,9 +97,6 @@ public function testConsts(): void // Misc functions - /** - * @return array - */ public static function prepareAllConsts(): array { return [ diff --git a/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseTest.php b/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseTest.php index 9380838..d0b01ad 100644 --- a/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseTest.php +++ b/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseTest.php @@ -20,6 +20,7 @@ use PHPUnit\Framework\ConstantCheckTestCase; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; +use PHPUnit\Framework\Attributes\DataProvider; /** * This is the test clazz which will test the test clazz. @@ -41,20 +42,24 @@ class ConstantCheckTestCaseTest extends TestCase private const WRONG_CONST_SIZE = 1; - /** @var ConstantCheckTestCaseClazz */ - protected $o2t; + protected ConstantCheckTestCaseClazz $o2t; - /** @var LoggerInterface */ - private static $logger; + private static LoggerInterface $logger; + #[\Override] public static function setUpBeforeClass(): void { + self::$logger = EasyGoingLogger::init(ConstantCheckTestCaseTest::class); + self::$logger->debug('START'); + parent::setUpBeforeClass(); // function must be called manually $sO2t = self::prepareO2t(); - $sO2t::setUpBeforeClass(); + + self::$logger->debug('END'); } + #[\Override] public static function tearDownAfterClass(): void { parent::tearDownAfterClass(); @@ -63,41 +68,28 @@ public static function tearDownAfterClass(): void $sO2t::tearDownAfterClass(); } - /** - * @return ConstantCheckTestCaseClazz - */ - protected static function prepareO2t() + protected static function prepareO2t(): ConstantCheckTestCaseClazz { - return new ConstantCheckTestCaseClazz(); + return new ConstantCheckTestCaseClazz(ConstantCheckTestCaseClazz::class); } - /** - * @return array - */ protected static function prepareAllConsts(): array { return ConstantCheckTestCaseClazz::prepareAllConsts(); } - /** - * @param mixed $name - * @param array $data - * @param string $dataName - */ - public function __construct($name = null, $data = [], $dataName = '') - { - self::$logger = EasyGoingLogger::init(ConstantCheckTestCaseTest::class); - self::$logger->debug('START'); - parent::__construct($name, $data, $dataName); - self::$logger->debug('END'); - } - + #[\Override] public function setUp(): void { self::$logger->debug('START'); + parent::setUp(); + $this->o2t = self::prepareO2t(); + // Must be called manually + $this->o2t->setUpBeforeClass(); $this->o2t->setUp(); + self::$logger->debug('END'); } @@ -161,13 +153,12 @@ public function testIsWithConstCrossCheck(): void } /** - * @param bool $success - * @param bool $crossCheckActive - * @param string $clazz - * @param array $actualConstants - * - * @dataProvider providerCrossCheck + * @param bool $success + * @param bool $crossCheckActive + * @param string $clazz + * @param array $actualConstants */ + #[DataProvider('providerCrossCheck')] public function testCrossCheckConstants(bool $success, bool $crossCheckActive, string $clazz, array $actualConstants): void { self::$logger->debug('parameters', [$success, $crossCheckActive, $clazz, $actualConstants]); @@ -193,9 +184,12 @@ public function testCrossCheckConstants(bool $success, bool $crossCheckActive, s public function testUpdateActualConsts(): void { + $this->o2t->setUpBeforeClass(true); + $checkedConsts = TestData::ARRAY_ALPHA5; /** @var array */ $before = $this->getFieldByReflection(ConstantCheckTestCase::class, 'actualConsts', $this->o2t); + $expected = count($before) + count($checkedConsts); $this->o2t::publicUpdateActualConsts($checkedConsts); @@ -221,11 +215,10 @@ public function testCheckConstantsCountDisabled(): void } /** - * @param bool $success - * @param array $constants - * - * @dataProvider providerConstants + * @param bool $success + * @param array $constants */ + #[DataProvider('providerConstants')] public function testVerifyConstAllExists(bool $success, array $constants): void { self::$logger->debug('parameters', [$success, $constants]); @@ -244,11 +237,10 @@ public function testVerifyConstAllExists(bool $success, array $constants): void } /** - * @param bool $success - * @param array $constants - * - * @dataProvider providerConstantsArray + * @param bool $success + * @param array $constants */ + #[DataProvider('providerConstantsArray')] public function testVerifyConstArrayAllExists(bool $success, array $constants): void { self::$logger->debug('parameters', [$success, $constants]); @@ -270,9 +262,8 @@ public function testVerifyConstArrayAllExists(bool $success, array $constants): * @param bool $success * @param string $constantName * @param int $expectedSize - * - * @dataProvider providerConstantName */ + #[DataProvider('providerConstantName')] public function testVerifyConstArraySize(bool $success, string $constantName, int $expectedSize): void { self::$logger->debug('parameters', [$constantName, $expectedSize]); @@ -295,7 +286,7 @@ public function testVerifyConstArraySize(bool $success, string $constantName, in /** * @return array */ - public function providerConstants() + public static function providerConstants() { return [ 'emptyList' => [true, []], @@ -308,7 +299,7 @@ public function providerConstants() /** * @return array */ - public function providerConstantsArray() + public static function providerConstantsArray() { return [ 'emptyList' => [true, []], @@ -321,7 +312,7 @@ public function providerConstantsArray() /** * @return array */ - public function providerConstantName() + public static function providerConstantName() { return [ 'missingName' => [false, '', self::TEST_CONST_ARRAY_SIZE], @@ -334,7 +325,7 @@ public function providerConstantName() /** * @return array */ - public function providerCrossCheck() + public static function providerCrossCheck() { return [ 'emptyListDisabled' => [true, false, ConstantCheckTestCaseDummyClazz::class, []], @@ -358,9 +349,9 @@ public function providerCrossCheck() // Misc functions /** - * @param bool $success - * @param null|\Exception $exception - * @param array $extraData + * @param bool $success + * @param null|\Exception $exception + * @param array $extraData */ protected function verifyConstantsTestResult(bool $success, ?\Exception $exception, array $extraData): void { diff --git a/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseClazz.php b/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseClazz.php index d6a6141..6fb5121 100644 --- a/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseClazz.php +++ b/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseClazz.php @@ -26,6 +26,7 @@ class EasyGoingTestCaseClazz extends EasyGoingTestCase // NOSONAR: php:S3360 { public const C_TEST = 1; + #[\Override] public static function tearDownAfterClass(): void { // Deactivate the check, will be called manually in testcase @@ -34,6 +35,7 @@ public static function tearDownAfterClass(): void /** * @return EasyGoingTestCaseDummyClazz */ + #[\Override] protected static function prepareO2t() { return new EasyGoingTestCaseDummyClazz(); @@ -42,6 +44,7 @@ protected static function prepareO2t() /** * @return EasyGoingTestCaseDummyClazz */ + #[\Override] protected function getCasto2t() { return $this->o2t; diff --git a/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseTest.php b/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseTest.php index cf41a8f..f423d94 100644 --- a/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseTest.php +++ b/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseTest.php @@ -18,6 +18,7 @@ use ollily\Tools\Reflection\UnavailableMethodsTrait; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; +use PHPUnit\Framework\Attributes\DataProvider; /** * This is the test clazz which will test the test clazz. @@ -35,12 +36,23 @@ class EasyGoingTestCaseTest extends TestCase /** @var LoggerInterface */ private static $logger; + #[\Override] + public static function setUpBeforeClass(): void + { + self::$logger = EasyGoingLogger::init(EasyGoingTestCaseTest::class); + self::$logger->debug('START'); + + parent::setUpBeforeClass(); + + self::$logger->debug('END'); + } + /** * @return EasyGoingTestCaseClazz */ protected static function prepareO2t() { - return new EasyGoingTestCaseClazz(); + return new EasyGoingTestCaseClazz(EasyGoingTestCaseClazz::class); } /** @@ -51,25 +63,18 @@ protected static function prepareAllConsts(): array return EasyGoingTestCaseClazz::prepareAllConsts(); } - /** - * @param mixed $name - * @param array $data - * @param string $dataName - */ - public function __construct($name = null, $data = [], $dataName = '') - { - self::$logger = EasyGoingLogger::init(EasyGoingTestCaseTest::class); - self::$logger->debug('START'); - parent::__construct($name, $data, $dataName); - self::$logger->debug('END'); - } - + #[\Override] public function setUp(): void { self::$logger->debug('START'); + parent::setUp(); + $this->o2t = self::prepareO2t(); + // Must be called manually + $this->o2t::setUpBeforeClass(); $this->o2t->setUp(); + self::$logger->debug('END'); } @@ -113,10 +118,10 @@ public function testTestInit(): void /** * @param bool $expectedBool * @param string $constName - * - * @dataProvider providerConstant + * @param string $expected */ - public function testIsConstExist(bool $expectedBool, string $constName): void + #[DataProvider('providerConstant')] + public function testIsConstExist(bool $expectedBool, string $constName, string $expected): void { self::$logger->debug('parameters', [$expectedBool, $constName]); @@ -131,9 +136,8 @@ public function testIsConstExist(bool $expectedBool, string $constName): void * @param bool $expectedBool * @param string $constName * @param string $expected - * - * @dataProvider providerConstant */ + #[DataProvider('providerConstant')] public function testGetConstValue(bool $expectedBool, string $constName, string $expected): void { self::$logger->debug('parameters', [$expectedBool, $constName]); @@ -199,7 +203,7 @@ public function testGet_called_function(): void /** * @return array */ - public function providerConstant() + public static function providerConstant() { return [ 'public' => [true, EasyGoingTestCaseDummyClazz::TEST_CONST_PREFIX . '_PUBLIC', 'public'], diff --git a/tests/Tools/Batch/BatchTaskHelperTest.php b/tests/Tools/Batch/BatchTaskHelperTest.php index 8bab1f8..15b287c 100644 --- a/tests/Tools/Batch/BatchTaskHelperTest.php +++ b/tests/Tools/Batch/BatchTaskHelperTest.php @@ -15,6 +15,7 @@ use PHPUnit\Framework\TestCase; use ollily\Tools\Test\TestData; +use PHPUnit\Framework\Attributes\DataProvider; class BatchTaskHelperTest extends TestCase { @@ -23,9 +24,8 @@ class BatchTaskHelperTest extends TestCase * @param int $expectedCount * @param bool $expectedEmpty * @param null|string $listKey - * - * @dataProvider providerTaskList */ + #[DataProvider('providerTaskList')] public function testGetTaskList(string $expectedKey, int $expectedCount, bool $expectedEmpty, ?string $listKey = null): void { $actual = BatchTaskHelper::getTaskList($listKey); @@ -42,9 +42,8 @@ public function testGetTaskList(string $expectedKey, int $expectedCount, bool $e * @param bool $expectedEmpty * @param string $fileName * @param null|string $listKey - * - * @dataProvider providerTaskListFile */ + #[DataProvider('providerTaskListFile')] public function testReadTaskList(string $expectedKey, int $expectedCount, bool $expectedEmpty, string $fileName, ?string $listKey = null): void { $actual = BatchTaskHelper::readTaskList($fileName, $listKey); @@ -60,7 +59,7 @@ public function testReadTaskList(string $expectedKey, int $expectedCount, bool $ /** * @return array */ - public function providerTaskList(): array + public static function providerTaskList(): array { return [ 'empty' => [BatchTaskHelper::DEFAULT, 0, true], @@ -70,7 +69,7 @@ public function providerTaskList(): array /** * @return array */ - public function providerTaskListFile(): array + public static function providerTaskListFile(): array { return [ 'empty' => [BatchTaskHelper::DEFAULT, 0, true, TestData::FILE_FILENAME_EMPTY], diff --git a/tests/Tools/Batch/TaskListTest.php b/tests/Tools/Batch/TaskListTest.php index 444bdb5..3546422 100644 --- a/tests/Tools/Batch/TaskListTest.php +++ b/tests/Tools/Batch/TaskListTest.php @@ -15,6 +15,7 @@ use ollily\Tools\Test\TestData; use PHPUnit\Framework\EasyGoingTestCase; +use PHPUnit\Framework\Attributes\DataProvider; class TaskListTest extends EasyGoingTestCase { @@ -24,15 +25,6 @@ class TaskListTest extends EasyGoingTestCase /** @var string */ public const DATA = TestData::DATA_ALPHA1; - /** @var string */ - protected static $emptyFileName = TestData::FILE_FILENAME_EMPTY; - - /** @var string */ - protected static $existingFile; - - /** @var string */ - protected static $emptyFile; - /** @var string */ private $writeTaskListFile = ''; @@ -41,18 +33,14 @@ protected function tearDown(): void TestData::cleanupTempFile($this->writeTaskListFile); } - /** - * @param mixed $name - * @param array $data - * @param string $dataName - */ - public function __construct($name = null, $data = [], $dataName = '') + public static function prepareFiles(): array { - parent::__construct($name, $data, $dataName); $reflector = new \ReflectionClass(self::class); $path = '' . realpath('' . $reflector->getFileName()); - self::$existingFile = str_replace(TestData::FILE_EXT_PHP, TestData::FILE_EXT_CSV, $path); - self::$emptyFile = str_replace(TestData::FILE_EXT_PHP, 'Empty' . TestData::FILE_EXT_CSV, $path); + $emptyFile = str_replace(TestData::FILE_EXT_PHP, 'Empty' . TestData::FILE_EXT_CSV, $path); + $existingFile = str_replace(TestData::FILE_EXT_PHP, TestData::FILE_EXT_CSV, $path); + + return [TestData::FILE_FILENAME_EMPTY,$emptyFile, $existingFile]; } /** @@ -131,10 +119,9 @@ public function testNextTask(): void /** * @param bool $expected * @param string $fileName - * - * @dataProvider providerTaskListFile */ - public function testReadFileFile(bool $expected, int $expectedCount, string $fileName): void + #[DataProvider('providerTaskListFile')] + public function testReadFileFile(bool $expected, int $expectedCount, ?string $fileName): void { $this->o2t = new TaskList(self::class); $actual = $this->getCasto2t()->readFile($fileName); @@ -164,12 +151,12 @@ public function testStoreFile(): void /** * @return array */ - public function providerTaskListFile(): array + public static function providerTaskListFile(): array { return [ - 'emptyFileName' => [false, 0,self::$emptyFileName], - 'emptyFile' => [true, 0,self::$emptyFile], - 'existingFile' => [true, 3, self::$existingFile], + 'emptyFileName' => [false, 0, self::prepareFiles()[0]], + 'emptyFile' => [true, 0, self::prepareFiles()[1]], + 'existingFile' => [true, 3, self::prepareFiles()[2]], ]; } diff --git a/tests/Tools/EmergencyTest.php b/tests/Tools/EmergencyTest.php index ae11da3..a7ccb7a 100644 --- a/tests/Tools/EmergencyTest.php +++ b/tests/Tools/EmergencyTest.php @@ -14,6 +14,7 @@ namespace ollily\Tools; use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\Attributes\DataProvider; class EmergencyTest extends TestCase { @@ -37,9 +38,8 @@ class EmergencyTest extends TestCase * @param int $errCode * @param string $errMessage * @param int $expected - * - * @dataProvider providerBreakSystem */ + #[DataProvider('providerBreakSystem')] public function testBreakSystem(int $errCode, string $errMessage, int $expected): void { $actual = Emergency::breakSystem($errCode, $errMessage, true); @@ -50,9 +50,8 @@ public function testBreakSystem(int $errCode, string $errMessage, int $expected) /** * @param \Throwable $throwable * @param int $expected - * - * @dataProvider providerExceptionStop */ + #[DataProvider('providerExceptionStop')] public function testExceptionStop(\Throwable $throwable, int $expected): void { $actual = Emergency::exceptionStop($throwable, true); @@ -65,7 +64,7 @@ public function testExceptionStop(\Throwable $throwable, int $expected): void /** * @return array */ - public function providerBreakSystem(): array + public static function providerBreakSystem(): array { return [ 'Default' => [self::CODE_0, self::MSG_EMPTY, Emergency::ERR_CODE_DEFAULT], @@ -78,7 +77,7 @@ public function providerBreakSystem(): array /** * @return array */ - public function providerExceptionStop(): array + public static function providerExceptionStop(): array { return [ 'Default' => [new \Exception(), Emergency::ERR_CODE_DEFAULT], diff --git a/tests/Tools/PhpVersionTraitTest.php b/tests/Tools/PhpVersionTraitTest.php index c5151fa..00c95b5 100644 --- a/tests/Tools/PhpVersionTraitTest.php +++ b/tests/Tools/PhpVersionTraitTest.php @@ -15,6 +15,7 @@ use PHPUnit\Framework\TestCase; use ollily\Tools\Test\TestData; +use PHPUnit\Framework\Attributes\DataProvider; class PhpVersionTraitTest extends TestCase { @@ -29,9 +30,8 @@ class PhpVersionTraitTest extends TestCase /** * @param bool $expected * @param string $checkVersion - * - * @dataProvider providerPhpVersion */ + #[DataProvider('providerPhpVersion')] public function testIsPhpGreater(bool $expected, string $checkVersion): void { $actual = $this->isPhpGreater($checkVersion); @@ -43,7 +43,7 @@ public function testIsPhpGreater(bool $expected, string $checkVersion): void /** * @return array */ - public function providerPhpVersion(): array + public static function providerPhpVersion(): array { return [ 'equal' => [true, self::PHP_VERSION_CURR], diff --git a/tests/Tools/Reflection/ChildClazzesHelperTest.php b/tests/Tools/Reflection/ChildClazzesHelperTest.php index 011fc48..a20f65d 100644 --- a/tests/Tools/Reflection/ChildClazzesHelperTest.php +++ b/tests/Tools/Reflection/ChildClazzesHelperTest.php @@ -15,6 +15,7 @@ use PHPUnit\Framework\TestCase; use ollily\Tools\Test\TestData; +use PHPUnit\Framework\Attributes\DataProvider; class ChildClazzesHelperTest extends TestCase { @@ -23,9 +24,8 @@ class ChildClazzesHelperTest extends TestCase * @param string $clazzName * @param array $childClazzes * @param bool $isEqual - * - * @dataProvider providerChildClazzes */ + #[DataProvider('providerChildClazzes')] public function testAllChildren(int $expected, string $clazzName, array $childClazzes, bool $isEqual = true): void { $actual = ChildClazzesHelper::getAllChildren($clazzName); @@ -45,7 +45,7 @@ public function testAllChildren(int $expected, string $clazzName, array $childCl /** * @return array */ - public function providerChildClazzes(): array + public static function providerChildClazzes(): array { return [ 'noChildren' => [0, ChildClazzesHelperTest::class, []], diff --git a/tests/Tools/String/ImplodeTraitTest.php b/tests/Tools/String/ImplodeTraitTest.php index d1cae96..57f941d 100644 --- a/tests/Tools/String/ImplodeTraitTest.php +++ b/tests/Tools/String/ImplodeTraitTest.php @@ -15,6 +15,7 @@ use PHPUnit\Framework\TestCase; use ollily\Tools\Test\TestData; +use PHPUnit\Framework\Attributes\DataProvider; /** * This is the test clazz which will test the test clazz. @@ -91,9 +92,8 @@ public function testImplode_recursive_ObjectCustom(): void * @param int $expectedCount * @param array $testData * @param int $preserveKeys - * - * @dataProvider providerArrayFlatten */ + #[DataProvider('providerArrayFlatten')] public function testArray_flatten(int $expectedCount, array $testData, int $preserveKeys): void { $actual = $this->o2t->array_flatten($testData, $preserveKeys); @@ -133,7 +133,7 @@ public function verifyResult($actual, $testData, int $expectedKeyCount, int $exp /** * @return array */ - public function providerArrayFlatten(): array + public static function providerArrayFlatten(): array { return [ 'emptyDefault' => [0, [], 0], diff --git a/tests/Tools/String/ToStringTraitTest.php b/tests/Tools/String/ToStringTraitTest.php index e281c08..2dc5b66 100644 --- a/tests/Tools/String/ToStringTraitTest.php +++ b/tests/Tools/String/ToStringTraitTest.php @@ -15,6 +15,7 @@ use PHPUnit\Framework\TestCase; use ollily\Tools\Test\TestData; +use PHPUnit\Framework\Attributes\DataProvider; /** * This is the test clazz which will test the test clazz. @@ -58,9 +59,8 @@ public function testWakeup(): void /** * @param mixed $data * @param string $expected - * - * @dataProvider provideDataToString */ + #[DataProvider('provideDataToString')] public function testToString($data, string $expected): void { $actualObj = new ToStringTraitTestDummyClazz($data); @@ -75,7 +75,7 @@ public function testToString($data, string $expected): void * * @psalm-suppress InvalidArgument */ - public function provideDataToString(): array + public static function provideDataToString(): array { return [ 'StringAsValue' => [ @@ -96,15 +96,15 @@ public function provideDataToString(): array ], 'ArrayWithNumKey' => [ TestData::ARRAY_ALPHA3, - sprintf(self::FORMAT_ARRAY, ToStringTraitTestDummyClazz::class, $this->implode_recursive(TestData::ARRAY_ITEM_SEP, TestData::ARRAY_ALPHA3)), + sprintf(self::FORMAT_ARRAY, ToStringTraitTestDummyClazz::class, self::implode_recursive(TestData::ARRAY_ITEM_SEP, TestData::ARRAY_ALPHA3)), ], 'ArrayWithAlphaKeys' => [ TestData::ARRAY_ALPHA_KEY2, - sprintf(self::FORMAT_ARRAY, ToStringTraitTestDummyClazz::class, $this->implode_recursive(TestData::ARRAY_ITEM_SEP, TestData::ARRAY_ALPHA_KEY2)), + sprintf(self::FORMAT_ARRAY, ToStringTraitTestDummyClazz::class, self::implode_recursive(TestData::ARRAY_ITEM_SEP, TestData::ARRAY_ALPHA_KEY2)), ], 'ArrayWithObjectValues' => [ TestData::ARRAY_OBJECT2(), - sprintf(self::FORMAT_ARRAY, ToStringTraitTestDummyClazz::class, $this->implode_recursive(TestData::ARRAY_ITEM_SEP, TestData::ARRAY_OBJECT2())), + sprintf(self::FORMAT_ARRAY, ToStringTraitTestDummyClazz::class, self::implode_recursive(TestData::ARRAY_ITEM_SEP, TestData::ARRAY_OBJECT2())), ] ]; } diff --git a/tests/Tools/String/ToStringTraitTestDummyClazz.php b/tests/Tools/String/ToStringTraitTestDummyClazz.php index b2bc66d..a2a4e62 100644 --- a/tests/Tools/String/ToStringTraitTestDummyClazz.php +++ b/tests/Tools/String/ToStringTraitTestDummyClazz.php @@ -23,13 +23,9 @@ class ToStringTraitTestDummyClazz { use ToStringTrait; - /** @var mixed */ - public $greeting = 'hello'; + public mixed $greeting = 'hello'; - /** - * @param mixed $greeting - */ - public function __construct($greeting = null) + public function __construct(mixed $greeting = null) { if (!is_null($greeting)) { $this->greeting = $greeting; @@ -37,11 +33,10 @@ public function __construct($greeting = null) } /** - * @return mixed - * * @SuppressWarnings("PHPMD.CamelCaseMethodName") */ - protected function __toStringValues() + #[\Override] + protected function __toStringValues(): mixed { return $this->greeting; } diff --git a/tests/Tools/Test/TestDataFooTest.php b/tests/Tools/Test/TestDataFooTest.php index 6a20d64..303c156 100644 --- a/tests/Tools/Test/TestDataFooTest.php +++ b/tests/Tools/Test/TestDataFooTest.php @@ -17,13 +17,13 @@ class TestDataFooTest extends TestCase { - /** @var TestDataFoo */ - private $o2t; + private TestDataFoo $o2t; + #[\Override] protected function setUp(): void { parent::setUp(); - $this->o2t = TestDataFoo::init(); + $this->o2t = TestDataFoo::init(TestData::KEY_ALPHA1); } public function testInit(): void @@ -33,8 +33,10 @@ public function testInit(): void public function testToString(): void { + $expected = sprintf('%s:\'%s\'', get_class($this->o2t), TestData::KEY_ALPHA1); + $actual = $this->o2t->__toString(); - self::assertEmpty($actual); + self::assertEquals($expected, $actual); } } diff --git a/tests/Tools/Test/TestDataTest.php b/tests/Tools/Test/TestDataTest.php index e1bcddb..1de64eb 100644 --- a/tests/Tools/Test/TestDataTest.php +++ b/tests/Tools/Test/TestDataTest.php @@ -14,6 +14,7 @@ namespace ollily\Tools\Test; use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\Attributes\DataProvider; /** * @SuppressWarnings("PHPMD.UnusedFormalParameter") @@ -26,10 +27,9 @@ class TestDataTest extends TestCase /** * @param int $expectedCount * @param mixed $actual - * - * @dataProvider providerData() */ - public function testData(int $expectedCount, $actual): void + #[DataProvider('providerData')] + public function testData(int $expectedCount, mixed $actual): void { if (is_array($actual)) { self::assertCount($expectedCount, $actual); @@ -41,7 +41,7 @@ public function testData(int $expectedCount, $actual): void /** * @return array */ - public function providerData(): array + public static function providerData(): array { return [ 'oneD' => [1, TestData::DATA_OBJECT1()], From d28f292818fde759c1458123a020390c35d46c1d Mon Sep 17 00:00:00 2001 From: ollily <426229+ollily@users.noreply.github.com> Date: Sat, 23 May 2026 22:20:03 +0200 Subject: [PATCH 3/9] #1: switch to php 8.4 / untested --- .gitignore | 1 + phpunit.xml.dist | 41 ++++++----- src/Tools/String/ImplodeTrait.php | 24 ++----- src/Tools/String/ToStringTrait.php | 2 +- src/Tools/Test/TestData.php | 4 +- tests/Tools/String/ImplodeTraitTest.php | 34 +++------ .../String/ImplodeTraitTestDummyClazz.php | 4 +- .../Tools/String/ImplodeTraitTestFooClazz.php | 4 +- tests/Tools/String/ToStringTraitTest.php | 72 ++++++++++++++----- .../String/ToStringTraitTestDummyClazz.php | 2 +- tests/Tools/Test/TestDataTest.php | 2 + 11 files changed, 106 insertions(+), 84 deletions(-) diff --git a/.gitignore b/.gitignore index b7df245..e92b60d 100644 --- a/.gitignore +++ b/.gitignore @@ -181,6 +181,7 @@ vendor/ target/ wpcs/* nbproject/private/ +.phpunit.cache/ ### Local config .php-cs-fixer.php diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 851a53c..71ab74a 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,11 +1,15 @@ - + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" + bootstrap="tests/bootstrap.php" + cacheDirectory=".phpunit.cache" + colors="true" + executionOrder="depends,defects" + beStrictAboutOutputDuringTests="false" + displayDetailsOnTestsThatTriggerDeprecations="true" + displayDetailsOnPhpunitDeprecations="true" +> @@ -18,23 +22,26 @@ + + + ./src + + + + + includeUncoveredFiles="true" + ignoreDeprecatedCodeUnits="false" + pathCoverage="true" + disableCodeCoverageIgnore="false"> - - + + - - - src - - + diff --git a/src/Tools/String/ImplodeTrait.php b/src/Tools/String/ImplodeTrait.php index dfd7fa6..1836bdb 100644 --- a/src/Tools/String/ImplodeTrait.php +++ b/src/Tools/String/ImplodeTrait.php @@ -19,30 +19,20 @@ trait ImplodeTrait { /** - * @return string Default glue character + * Default glue character. * * @see ImplodeTrait::array_flatten() * @see ImplodeTrait::implode_recursive() - * - * TODO: Make it a constant with PHP 8 */ - final public function DEFAULT_GLUE(): string // NOSONAR: php:S100 - { - return ','; - } + public const string DEFAULT_GLUE = ','; /** - * @return string Default separate character for csv + * Default separate character for csv. * * @see ImplodeTrait::array_flatten() * @see ImplodeTrait::implode_recursive() - * - * TODO: Make it a constant with PHP 8 */ - final public function DEFAULT_ITEM_SEP(): string // NOSONAR: php:S100 - { - return ';'; - } + public const string DEFAULT_ITEM_SEP = ';'; /** * Recursively implodes an array with optional key inclusion. @@ -59,7 +49,7 @@ final public function DEFAULT_ITEM_SEP(): string // NOSONAR: php:S100 * @SuppressWarnings("PHPMD.CamelCaseMethodName") */ // @phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps - final public function implode_recursive(string $glue, $anyData, bool $withTextSep = false, bool $withKeys = false): string // NOSONAR: php:S100 + final public static function implode_recursive(string $glue, mixed $anyData, bool $withTextSep = false, bool $withKeys = false): string // NOSONAR: php:S100 { $output = ''; $valueIdx = 0; @@ -72,7 +62,7 @@ final public function implode_recursive(string $glue, $anyData, bool $withTextSe $output .= ($valueIdx > 0 ? $glue : '') . $currKey; if (is_array($value)) { - $arrOutput = $this->implode_recursive($glue, $value, $withTextSep, $withKeys); + $arrOutput = self::implode_recursive($glue, $value, $withTextSep, $withKeys); if (!empty($arrOutput)) { $output .= '[' . $arrOutput . ']'; } else { @@ -80,7 +70,7 @@ final public function implode_recursive(string $glue, $anyData, bool $withTextSe } } else { if (is_object($value)) { - $objOutput = $this->implode_recursive($glue, $value, $withTextSep, $withKeys); + $objOutput = self::implode_recursive($glue, $value, $withTextSep, $withKeys); if (!empty($objOutput)) { $output .= '{' . $objOutput . '}'; } else { diff --git a/src/Tools/String/ToStringTrait.php b/src/Tools/String/ToStringTrait.php index 7fcf695..5632262 100644 --- a/src/Tools/String/ToStringTrait.php +++ b/src/Tools/String/ToStringTrait.php @@ -38,7 +38,7 @@ public function __toString(): string $value[$arrayKey] = get_class($value[$arrayKey]); } } - $toString = sprintf('%s:[%s]', get_class($this), $this->implode_recursive(',', $value)); + $toString = sprintf('%s:[%s]', get_class($this), self::implode_recursive(',', $value)); } elseif (is_object($value)) { if ($this == $value) { $toString = sprintf('{%s}', print_r($value, true)); diff --git a/src/Tools/Test/TestData.php b/src/Tools/Test/TestData.php index c1d6eb8..ae973a9 100644 --- a/src/Tools/Test/TestData.php +++ b/src/Tools/Test/TestData.php @@ -287,9 +287,9 @@ public static function prepareTempFile(string $prefix = self::FILE_FILENAME_PREF } /** - * @param string $fileName Full filename for a temporary file + * @param string|null $fileName Full filename for a temporary file */ - public static function cleanupTempFile(string $fileName): void + public static function cleanupTempFile(?string $fileName): void { try { if (!empty($fileName) && file_exists($fileName)) { diff --git a/tests/Tools/String/ImplodeTraitTest.php b/tests/Tools/String/ImplodeTraitTest.php index 57f941d..855eee8 100644 --- a/tests/Tools/String/ImplodeTraitTest.php +++ b/tests/Tools/String/ImplodeTraitTest.php @@ -24,44 +24,26 @@ */ class ImplodeTraitTest extends TestCase { - public const ITEM_SEP = '#'; + public const string ITEM_SEP = '#'; - public const KEY_SEP = '=>'; + public const string KEY_SEP = '=>'; - /** @var ImplodeTraitTestDummyClazz */ - protected $o2t; + protected ImplodeTraitTestDummyClazz $o2t; + #[\Override] public function setUp(): void { parent::setUp(); $this->o2t = new ImplodeTraitTestDummyClazz(); } - public function testDEFAULT_GLUE(): void - { - $expected = ','; - - $actual = $this->o2t->DEFAULT_GLUE(); - - self::assertEquals($expected, $actual); - } - - public function testDEFAULT_ITEM_SEP(): void - { - $expected = ';'; - - $actual = $this->o2t->DEFAULT_ITEM_SEP(); - - self::assertEquals($expected, $actual); - } - public function testImplode_recursiveDefault(): void { $testData = $this->o2t->traitData; $expectedKeyCount = 0; $expectedItemCount = count($testData) - 1; - $actual = $this->o2t->implode_recursive(self::ITEM_SEP, $testData); + $actual = $this->o2t::implode_recursive(self::ITEM_SEP, $testData); $this->verifyResult($actual, $testData, $expectedKeyCount, $expectedItemCount); } @@ -72,7 +54,7 @@ public function testImplode_recursiveCustom(): void $expectedKeyCount = count($testData); $expectedItemCount = $expectedKeyCount - 1; - $actual = $this->o2t->implode_recursive(self::ITEM_SEP, $testData, true, true); + $actual = $this->o2t::implode_recursive(self::ITEM_SEP, $testData, true, true); $this->verifyResult($actual, $testData, $expectedKeyCount, $expectedItemCount); } @@ -83,7 +65,7 @@ public function testImplode_recursive_ObjectCustom(): void $expectedKeyCount = count($testData) + count($testData[1]); $expectedItemCount = $expectedKeyCount - 2; - $actual = $this->o2t->implode_recursive(self::ITEM_SEP, $testData, true, true); + $actual = $this->o2t::implode_recursive(self::ITEM_SEP, $testData, true, true); $this->verifyResult($actual, $testData, $expectedKeyCount, $expectedItemCount, true); } @@ -108,7 +90,7 @@ public function testArray_flatten(int $expectedCount, array $testData, int $pres * @param int $expectedItemCount * @param bool $withClazz */ - public function verifyResult($actual, $testData, int $expectedKeyCount, int $expectedItemCount, bool $withClazz = false): void + public function verifyResult(mixed $actual, mixed $testData, int $expectedKeyCount, int $expectedItemCount, bool $withClazz = false): void { self::assertNotEmpty($actual); self::assertEquals($expectedKeyCount, substr_count($actual, self::KEY_SEP)); diff --git a/tests/Tools/String/ImplodeTraitTestDummyClazz.php b/tests/Tools/String/ImplodeTraitTestDummyClazz.php index 1963e01..58ef199 100644 --- a/tests/Tools/String/ImplodeTraitTestDummyClazz.php +++ b/tests/Tools/String/ImplodeTraitTestDummyClazz.php @@ -25,10 +25,10 @@ class ImplodeTraitTestDummyClazz use ImplodeTrait; /** @var array */ - public $traitData = TestData::ARRAY_ALPHA2; + public array $traitData = TestData::ARRAY_ALPHA2; /** @var array */ - public $traitObject = TestData::ARRAY_EMPTY; + public array $traitObject = TestData::ARRAY_EMPTY; public function __construct() { diff --git a/tests/Tools/String/ImplodeTraitTestFooClazz.php b/tests/Tools/String/ImplodeTraitTestFooClazz.php index 69a972a..7b16cf2 100644 --- a/tests/Tools/String/ImplodeTraitTestFooClazz.php +++ b/tests/Tools/String/ImplodeTraitTestFooClazz.php @@ -23,8 +23,8 @@ class ImplodeTraitTestFooClazz { /** @var array */ - public $dummyData = TestData::ARRAY_NUM_KEY2; + public array $dummyData = TestData::ARRAY_NUM_KEY2; /** @var array */ - public $dummyEmpty = TestData::ARRAY_EMPTY; + public array $dummyEmpty = TestData::ARRAY_EMPTY; } diff --git a/tests/Tools/String/ToStringTraitTest.php b/tests/Tools/String/ToStringTraitTest.php index 2dc5b66..00f9a09 100644 --- a/tests/Tools/String/ToStringTraitTest.php +++ b/tests/Tools/String/ToStringTraitTest.php @@ -15,6 +15,7 @@ use PHPUnit\Framework\TestCase; use ollily\Tools\Test\TestData; +use ollily\Tools\Test\TestDataFoo; use PHPUnit\Framework\Attributes\DataProvider; /** @@ -26,17 +27,27 @@ class ToStringTraitTest extends TestCase { use ImplodeTrait; - public const FORMAT_ARRAY = '%s:[%s]'; + public const FORMAT_OBJECT = '{%s Object( [greeting] => %s)}'; - public const FORMAT_ITEMS = '%s:{%s}'; + public const FORMAT_OBJECT_IN_OBJECT = '{%s Object( [greeting] => %s Object ( [fooValue:%s:private] => %s ))}'; - public const FORMAT_NUM = '%s:%s'; + public const FORMAT_ARRAY_IN_OBJECT = '{%s Object( [greeting] => Array ( %s ))}'; - public const FORMAT_ALPHA = '%s:\'%s\''; + public const FORMAT_ARRAY_IN_OBJECT_2 = '{%s Object( [greeting] => Array ( [%s] => %s Object ( [fooValue:%s:private] => %s ) ))}'; - /** @var ToStringTraitTestDummyClazz */ - protected $o2t; + public const FORMAT_ARRAY_KEY_NUM_SEARCH = '/(\w*)=>/'; + public const FORMAT_ARRAY_KEY_ALPHA_SEARCH = "/'([\w\W]+?)'=>/"; + + public const FORMAT_ARRAY_ELEM_REPLACE = '[$1] => '; + + public const FORMAT_ARRAY_SPACE_SEP = ' '; + + public const ILLEGAL_CHARS = [" \n", "\n ", "\n", " "]; + + protected ToStringTraitTestDummyClazz $o2t; + + #[\Override] protected function setUp(): void { parent::setUp(); @@ -61,13 +72,13 @@ public function testWakeup(): void * @param string $expected */ #[DataProvider('provideDataToString')] - public function testToString($data, string $expected): void + public function testToString(mixed $data, string $expected): void { $actualObj = new ToStringTraitTestDummyClazz($data); $actual = $actualObj->__toString(); - self::assertEquals($expected, $actual); + self::assertEquals($expected, str_replace(self::ILLEGAL_CHARS, '', $actual)); } /** @@ -80,31 +91,60 @@ public static function provideDataToString(): array return [ 'StringAsValue' => [ TestData::DATA_ALPHA1, - sprintf(self::FORMAT_ALPHA, ToStringTraitTestDummyClazz::class, TestData::DATA_ALPHA1) + sprintf(self::FORMAT_OBJECT, ToStringTraitTestDummyClazz::class, TestData::DATA_ALPHA1) ], 'IntegerAsValue' => [ TestData::DATA_NUM1, - sprintf(self::FORMAT_NUM, ToStringTraitTestDummyClazz::class, TestData::DATA_NUM1), + sprintf(self::FORMAT_OBJECT, ToStringTraitTestDummyClazz::class, TestData::DATA_NUM1), ], 'BoolAsValue' => [ TestData::DATA_BOOL_T, - sprintf(self::FORMAT_NUM, ToStringTraitTestDummyClazz::class, TestData::DATA_BOOL_T), + sprintf(self::FORMAT_OBJECT, ToStringTraitTestDummyClazz::class, TestData::DATA_BOOL_T), ], 'ObjectAsValue' => [ TestData::DATA_OBJECT1(), - sprintf(self::FORMAT_NUM, ToStringTraitTestDummyClazz::class, TestData::DATA_OBJECT1()), + sprintf( + self::FORMAT_OBJECT_IN_OBJECT, + ToStringTraitTestDummyClazz::class, + TestDataFoo::class, + TestDataFoo::class, + TestData::DATA_NUM1 + ), ], 'ArrayWithNumKey' => [ TestData::ARRAY_ALPHA3, - sprintf(self::FORMAT_ARRAY, ToStringTraitTestDummyClazz::class, self::implode_recursive(TestData::ARRAY_ITEM_SEP, TestData::ARRAY_ALPHA3)), + sprintf( + self::FORMAT_ARRAY_IN_OBJECT, + ToStringTraitTestDummyClazz::class, + preg_replace( + self::FORMAT_ARRAY_KEY_NUM_SEARCH, + self::FORMAT_ARRAY_ELEM_REPLACE, + self::implode_recursive(self::FORMAT_ARRAY_SPACE_SEP, TestData::ARRAY_ALPHA3, false, true) + ) + ), ], 'ArrayWithAlphaKeys' => [ TestData::ARRAY_ALPHA_KEY2, - sprintf(self::FORMAT_ARRAY, ToStringTraitTestDummyClazz::class, self::implode_recursive(TestData::ARRAY_ITEM_SEP, TestData::ARRAY_ALPHA_KEY2)), + sprintf( + self::FORMAT_ARRAY_IN_OBJECT, + ToStringTraitTestDummyClazz::class, + preg_replace( + self::FORMAT_ARRAY_KEY_ALPHA_SEARCH, + self::FORMAT_ARRAY_ELEM_REPLACE, + self::implode_recursive(self::FORMAT_ARRAY_SPACE_SEP, TestData::ARRAY_ALPHA_KEY2, false, true) + ) + ), ], 'ArrayWithObjectValues' => [ - TestData::ARRAY_OBJECT2(), - sprintf(self::FORMAT_ARRAY, ToStringTraitTestDummyClazz::class, self::implode_recursive(TestData::ARRAY_ITEM_SEP, TestData::ARRAY_OBJECT2())), + TestData::ARRAY_OBJECT1(), + sprintf( + self::FORMAT_ARRAY_IN_OBJECT_2, + ToStringTraitTestDummyClazz::class, + TestData::KEY_ALPHA1, + TestDataFoo::class, + TestDataFoo::class, + TestData::DATA_NUM1 + ), ] ]; } diff --git a/tests/Tools/String/ToStringTraitTestDummyClazz.php b/tests/Tools/String/ToStringTraitTestDummyClazz.php index a2a4e62..30635d6 100644 --- a/tests/Tools/String/ToStringTraitTestDummyClazz.php +++ b/tests/Tools/String/ToStringTraitTestDummyClazz.php @@ -38,6 +38,6 @@ public function __construct(mixed $greeting = null) #[\Override] protected function __toStringValues(): mixed { - return $this->greeting; + return $this; } } diff --git a/tests/Tools/Test/TestDataTest.php b/tests/Tools/Test/TestDataTest.php index 1de64eb..2841d26 100644 --- a/tests/Tools/Test/TestDataTest.php +++ b/tests/Tools/Test/TestDataTest.php @@ -15,6 +15,7 @@ use PHPUnit\Framework\TestCase; use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Depends; /** * @SuppressWarnings("PHPMD.UnusedFormalParameter") @@ -103,6 +104,7 @@ public function testPrepareTempFile(): void self::assertFileExists(self::$fileName); } + #[Depends('testPrepareTempFile')] public function testCleanupTempFile(): void { TestData::cleanupTempFile(self::$fileName); From 48ab3716fcb151c94ece44d7ebb879709c043b39 Mon Sep 17 00:00:00 2001 From: ollily <426229+ollily@users.noreply.github.com> Date: Sat, 23 May 2026 22:46:04 +0200 Subject: [PATCH 4/9] #1: switch to php 8.4 / untested --- .gitignore | 7 ++++--- composer.json | 2 +- psalm.xml.dist | 1 - src/Tools/Test/TestData.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index e92b60d..91ce8c6 100644 --- a/.gitignore +++ b/.gitignore @@ -172,16 +172,17 @@ vendor/ .php-cs-fixer.cache ### PHPUnit template -# Generated files .phpunit.result.cache -.phpunit.cache +.phpunit.cache/ + +### PHP Mess Detector +.phpmd.result-cache.php ### Custom target/ wpcs/* nbproject/private/ -.phpunit.cache/ ### Local config .php-cs-fixer.php diff --git a/composer.json b/composer.json index 1bddff2..2850067 100644 --- a/composer.json +++ b/composer.json @@ -116,7 +116,7 @@ "c-phpmd": [ "bash -c 'echo PHP Mess Dectector running...'", "bash -c 'rm -f target/analysis/phpmd/phpmd-report.txt'", - "@php -d xdebug.mode=off vendor/bin/phpmd src,tests text .phpmd.xml.dist --report-file=target/analysis/phpmd/phpmd-report.txt -v --color --ignore-errors-on-exit --ignore-violations-on-exit", + "@php -d xdebug.mode=off vendor/bin/phpmd src,tests text .phpmd.xml.dist --report-file=target/analysis/phpmd/phpmd-report.txt --error-file=target/analysis/phpmd/zzz-phpmd-error.txt --color --cache --ignore-errors-on-exit --ignore-violations-on-exit", "bash -c 'if [ -s target/analysis/phpmd/phpmd-report.txt ]; then cat target/analysis/phpmd/phpmd-report.txt; exit 1; else exit 0; fi'" ], "c-phpstan": "@php -d xdebug.mode=off vendor/bin/phpstan analyse", diff --git a/psalm.xml.dist b/psalm.xml.dist index 1418af2..19fa266 100644 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -30,7 +30,6 @@ - diff --git a/src/Tools/Test/TestData.php b/src/Tools/Test/TestData.php index ae973a9..cf50802 100644 --- a/src/Tools/Test/TestData.php +++ b/src/Tools/Test/TestData.php @@ -287,7 +287,7 @@ public static function prepareTempFile(string $prefix = self::FILE_FILENAME_PREF } /** - * @param string|null $fileName Full filename for a temporary file + * @param null|string $fileName Full filename for a temporary file */ public static function cleanupTempFile(?string $fileName): void { From 136b0af371bf2505d3b771324539a375b4a1f4d2 Mon Sep 17 00:00:00 2001 From: ollily <426229+ollily@users.noreply.github.com> Date: Sun, 24 May 2026 17:25:06 +0200 Subject: [PATCH 5/9] #1: switch to php 8.4 / untested --- .phpcs.xml.dist | 45 ++++++++++- composer.json | 2 +- phpstan.neon.dist | 1 - phpunit.xml.cov | 46 +++++++++++ phpunit.xml.dist | 12 --- .../Framework/ConstantCheckTestCase.php | 2 +- src/Tools/Batch/BatchTaskHelper.php | 4 +- src/Tools/String/ToStringTrait.php | 4 +- src/Tools/Test/TestData.php | 8 +- .../ConstantCheckTestCaseTest.php | 4 +- .../EasyGoingTestCaseTest.php | 2 +- tests/Tools/EnvironmentVariableTraitTest.php | 76 ++++++++++--------- tests/Tools/String/ImplodeTraitTest.php | 8 +- .../String/ImplodeTraitTestDummyClazz.php | 2 +- tests/Tools/String/ToStringTraitTest.php | 4 +- 15 files changed, 146 insertions(+), 74 deletions(-) create mode 100644 phpunit.xml.cov diff --git a/.phpcs.xml.dist b/.phpcs.xml.dist index e5d8086..2e55bc4 100644 --- a/.phpcs.xml.dist +++ b/.phpcs.xml.dist @@ -22,14 +22,13 @@ /vendor/autoload.php + - - - - + + @@ -38,6 +37,25 @@ + + + + + + + + + + + + + + + + + + + tests/**/*Test\.php @@ -46,6 +64,25 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 71ab74a..7cc8017 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -32,16 +32,4 @@ - - - - - - - - diff --git a/src/PHPUnit/Framework/ConstantCheckTestCase.php b/src/PHPUnit/Framework/ConstantCheckTestCase.php index 2f73cc7..38719f7 100644 --- a/src/PHPUnit/Framework/ConstantCheckTestCase.php +++ b/src/PHPUnit/Framework/ConstantCheckTestCase.php @@ -155,7 +155,7 @@ function ($value): string { self::assertCount( self::DIFF_ZERO, $difference, - 'You have forgotten to check: ' . print_r(array_diff($expected, $actual), true) + 'You have forgotten to check: ' . var_export(array_diff($expected, $actual), true) ); } diff --git a/src/Tools/Batch/BatchTaskHelper.php b/src/Tools/Batch/BatchTaskHelper.php index acb5c37..5932b2a 100644 --- a/src/Tools/Batch/BatchTaskHelper.php +++ b/src/Tools/Batch/BatchTaskHelper.php @@ -62,7 +62,7 @@ public static function getTaskList(?string $listKey): TaskList self::$logger->debug('START - listKey', [$listKey]); - $listKey = $listKey ?? self::DEFAULT; + $listKey ??= self::DEFAULT; if (!self::$tasklists->hasKey($listKey)) { self::$tasklists->put($listKey, new TaskList($listKey)); } @@ -84,7 +84,7 @@ public static function readTaskList(string $fileName, ?string $listKey) self::$logger->debug('START - listKey,fileName', [$listKey, $fileName]); - $listKey = $listKey ?? self::DEFAULT; + $listKey ??= self::DEFAULT; if (file_exists($fileName)) { $taskList = self::getTaskList($listKey); $taskList->readFile($fileName); diff --git a/src/Tools/String/ToStringTrait.php b/src/Tools/String/ToStringTrait.php index 5632262..41baf2c 100644 --- a/src/Tools/String/ToStringTrait.php +++ b/src/Tools/String/ToStringTrait.php @@ -41,9 +41,9 @@ public function __toString(): string $toString = sprintf('%s:[%s]', get_class($this), self::implode_recursive(',', $value)); } elseif (is_object($value)) { if ($this == $value) { - $toString = sprintf('{%s}', print_r($value, true)); + $toString = sprintf('{%s}', var_export($value, true)); } else { - $toString = sprintf('%s:{%s}', get_class($this), print_r($value, true)); + $toString = sprintf('%s:{%s}', get_class($this), var_export($value, true)); } } else { $toString = sprintf('%s', get_class($this)); diff --git a/src/Tools/Test/TestData.php b/src/Tools/Test/TestData.php index cf50802..e3857fe 100644 --- a/src/Tools/Test/TestData.php +++ b/src/Tools/Test/TestData.php @@ -129,13 +129,13 @@ class TestData public const ARRAY_ALPHA_KEY2 = [ self::KEY_ALPHA1 => self::DATA_ALPHA1, - self::KEY_ALPHA2 => self::DATA_ALPHA2 + self::KEY_ALPHA2 => self::DATA_ALPHA2, ]; public const ARRAY_ALPHA_KEY3 = [ self::KEY_ALPHA1 => self::DATA_ALPHA1, self::KEY_ALPHA2 => self::DATA_ALPHA2, - self::KEY_ALPHA3 => self::DATA_ALPHA3 + self::KEY_ALPHA3 => self::DATA_ALPHA3, ]; // Arrays with exlicit numeric key @@ -144,13 +144,13 @@ class TestData public const ARRAY_NUM_KEY2 = [ self::KEY_NUM1 => self::DATA_NUM1, - self::KEY_NUM2 => self::DATA_NUM2 + self::KEY_NUM2 => self::DATA_NUM2, ]; public const ARRAY_NUM_KEY3 = [ self::KEY_NUM1 => self::DATA_NUM1, self::KEY_NUM2 => self::DATA_NUM2, - self::KEY_NUM3 => self::DATA_NUM3 + self::KEY_NUM3 => self::DATA_NUM3, ]; // Arrays with object data diff --git a/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseTest.php b/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseTest.php index d0b01ad..f39d316 100644 --- a/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseTest.php +++ b/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseTest.php @@ -334,13 +334,13 @@ public static function providerCrossCheck() false, true, ConstantCheckTestCaseDummyClazz::class, - array_merge(self::prepareAllConsts(), [ConstantCheckTestCaseDummyClazz::TEST_CLAZZ . self::WRONG_CONST]) + array_merge(self::prepareAllConsts(), [ConstantCheckTestCaseDummyClazz::TEST_CLAZZ . self::WRONG_CONST]), ], 'existConstOneEnabled' => [ false, true, ConstantCheckTestCaseDummyClazz::class, - [ConstantCheckTestCaseDummyClazz::TEST_CLAZZ . self::TEST_CONST_PREFIX_NAME] + [ConstantCheckTestCaseDummyClazz::TEST_CLAZZ . self::TEST_CONST_PREFIX_NAME], ], 'existConstAllEnabled' => [true, true, ConstantCheckTestCaseDummyClazz::class, self::prepareAllConsts()], ]; diff --git a/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseTest.php b/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseTest.php index f423d94..b34c49a 100644 --- a/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseTest.php +++ b/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseTest.php @@ -209,7 +209,7 @@ public static function providerConstant() 'public' => [true, EasyGoingTestCaseDummyClazz::TEST_CONST_PREFIX . '_PUBLIC', 'public'], 'protected' => [true, EasyGoingTestCaseDummyClazz::TEST_CONST_PREFIX . '_PROTECTED', 'protected'], 'private' => [true, EasyGoingTestCaseDummyClazz::TEST_CONST_PREFIX . '_PRIVATE', 'private'], - 'notexist' => [false, EasyGoingTestCaseDummyClazz::TEST_CONST_PREFIX . '_NOTEXISTS', ''] + 'notexist' => [false, EasyGoingTestCaseDummyClazz::TEST_CONST_PREFIX . '_NOTEXISTS', ''], ]; } } diff --git a/tests/Tools/EnvironmentVariableTraitTest.php b/tests/Tools/EnvironmentVariableTraitTest.php index 81a4205..7fee0e0 100644 --- a/tests/Tools/EnvironmentVariableTraitTest.php +++ b/tests/Tools/EnvironmentVariableTraitTest.php @@ -35,43 +35,43 @@ public function testHomeDefault(): void $this->validateActualContains($actual, DIRECTORY_SEPARATOR); } - public function testHomeUserProfileDirect(): void - { - $actual = self::getHome(self::HOME_WIN); - if (empty($actual)) { - $actual = self::getHome(self::HOME_LINUX); - } - - $this->validateActualContains($actual, DIRECTORY_SEPARATOR); - } - - public function testHomeUserProfileIndirect(): void - { - $actual = self::getHome(self::HOME_NOTEXIST); - - self::assertEquals(TestData::DATA_EMPTY, $actual); - } - - public function testGetProjectRoot(): void - { - $actual = self::getProjectRoot(); - - $this->validateActualEnds($actual, self::PROJECT_NAME); - } - - public function testGetComposerFilePath(): void - { - $actual = self::getComposerFilePath(); - - $this->validateActualEnds($actual, self::PROJECT_NAME); - } - - public function testGetProjectRootFallback(): void - { - $actual = self::getProjectRootFallback(); - - $this->validateActualEnds($actual, self::PROJECT_NAME); - } +// public function testHomeUserProfileDirect(): void +// { +// $actual = self::getHome(self::HOME_WIN); +// if (empty($actual)) { +// $actual = self::getHome(self::HOME_LINUX); +// } +// +// $this->validateActualContains($actual, DIRECTORY_SEPARATOR); +// } + +// public function testHomeUserProfileIndirect(): void +// { +// $actual = self::getHome(self::HOME_NOTEXIST); +// +// self::assertEquals(TestData::DATA_EMPTY, $actual); +// } + +// public function testGetProjectRoot(): void +// { +// $actual = self::getProjectRoot(); +// +// $this->validateActualEnds($actual, self::PROJECT_NAME); +// } + +// public function testGetComposerFilePath(): void +// { +// $actual = self::getComposerFilePath(); +// +// $this->validateActualEnds($actual, self::PROJECT_NAME); +// } +// +// public function testGetProjectRootFallback(): void +// { +// $actual = self::getProjectRootFallback(); +// +// $this->validateActualEnds($actual, self::PROJECT_NAME); +// } private function validateActualContains(string $actual, string $expected): void { @@ -81,6 +81,8 @@ private function validateActualContains(string $actual, string $expected): void private function validateActualEnds(string $actual, string $expected): void { + var_dump($expected); + var_dump($actual); self::assertNotEmpty($actual); self::assertStringEndsWith($expected, $actual); } diff --git a/tests/Tools/String/ImplodeTraitTest.php b/tests/Tools/String/ImplodeTraitTest.php index 855eee8..c5a0799 100644 --- a/tests/Tools/String/ImplodeTraitTest.php +++ b/tests/Tools/String/ImplodeTraitTest.php @@ -123,14 +123,14 @@ public static function providerArrayFlatten(): array 'oneLevelDefault' => [4, [ TestData::DATA_ALPHA1, TestData::ARRAY_ALPHA2, - TestData::DATA_BOOL_F - ], 0 + TestData::DATA_BOOL_F, + ], 0, ], 'twoLevelDefault' => [8, [ TestData::ARRAY_ALPHA2, [TestData::ARRAY_ALPHA2, TestData::ARRAY_ALPHA2], - TestData::ARRAY_ALPHA2 - ], 0 + TestData::ARRAY_ALPHA2, + ], 0, ], ]; } diff --git a/tests/Tools/String/ImplodeTraitTestDummyClazz.php b/tests/Tools/String/ImplodeTraitTestDummyClazz.php index 58ef199..4136732 100644 --- a/tests/Tools/String/ImplodeTraitTestDummyClazz.php +++ b/tests/Tools/String/ImplodeTraitTestDummyClazz.php @@ -35,7 +35,7 @@ public function __construct() $this->traitObject[] = new ImplodeTraitTestFooClazz(); $this->traitObject[] = [ TestData::KEY_NUM1 => new ImplodeTraitTestFooClazz(), - TestData::KEY_NUM2 => new ImplodeTraitTestFooClazz() + TestData::KEY_NUM2 => new ImplodeTraitTestFooClazz(), ]; } } diff --git a/tests/Tools/String/ToStringTraitTest.php b/tests/Tools/String/ToStringTraitTest.php index 00f9a09..10cd07e 100644 --- a/tests/Tools/String/ToStringTraitTest.php +++ b/tests/Tools/String/ToStringTraitTest.php @@ -91,7 +91,7 @@ public static function provideDataToString(): array return [ 'StringAsValue' => [ TestData::DATA_ALPHA1, - sprintf(self::FORMAT_OBJECT, ToStringTraitTestDummyClazz::class, TestData::DATA_ALPHA1) + sprintf(self::FORMAT_OBJECT, ToStringTraitTestDummyClazz::class, TestData::DATA_ALPHA1), ], 'IntegerAsValue' => [ TestData::DATA_NUM1, @@ -145,7 +145,7 @@ public static function provideDataToString(): array TestDataFoo::class, TestData::DATA_NUM1 ), - ] + ], ]; } } From 66da2e50fcd76606d73368f5a7ff66c08ca4b337 Mon Sep 17 00:00:00 2001 From: ollily <426229+ollily@users.noreply.github.com> Date: Sun, 24 May 2026 17:33:18 +0200 Subject: [PATCH 6/9] #1: switch to php 8.4 / untested --- src/Monolog/EasyGoingLogger.php | 2 +- .../Framework/ConstantCheckTestCase.php | 4 +- src/PHPUnit/Framework/EasyGoingTestCase.php | 4 +- src/Tools/Batch/BatchTaskHelper.php | 6 +- src/Tools/Batch/ITaskItem.php | 4 +- src/Tools/Batch/TaskList.php | 8 +- src/Tools/Emergency.php | 2 +- src/Tools/Reflection/ChildClazzesHelper.php | 2 +- .../Reflection/UnavailableFieldsTrait.php | 6 +- .../Reflection/UnavailableMethodsTrait.php | 4 +- src/Tools/String/ImplodeTrait.php | 2 +- src/Tools/Test/TestData.php | 6 +- .../ConstantCheckTestCaseTest.php | 10 +-- .../EasyGoingTestCaseClazz.php | 8 +- .../EasyGoingTestCaseTest.php | 10 +-- tests/Tools/Batch/BatchTaskHelperTest.php | 2 +- tests/Tools/Batch/TaskItemTest.php | 6 +- tests/Tools/Batch/TaskListTest.php | 10 +-- tests/Tools/EmergencyTest.php | 2 +- tests/Tools/EnvironmentVariableTraitTest.php | 78 +++++++++---------- tests/Tools/PhpVersionTraitTest.php | 2 +- .../Reflection/ChildClazzesHelperTest.php | 2 +- .../UnavailableFieldsTraitDummyClazz.php | 6 +- .../UnavailableFieldsTraitTest.php | 4 +- .../UnavailableFieldsTraitTestO2tClazz.php | 8 +- ...navailableFieldsTraitTestWrongO2tClazz.php | 4 +- .../UnavailableMethodsTraitTest.php | 4 +- .../UnavailableMethodsTraitTestO2tClazz.php | 6 +- ...availableMethodsTraitTestWrongO2tClazz.php | 4 +- tests/Tools/String/ImplodeTraitTest.php | 6 +- tests/Tools/String/ToStringTraitTest.php | 2 +- tests/Tools/Test/TestDataTest.php | 6 +- 32 files changed, 114 insertions(+), 116 deletions(-) diff --git a/src/Monolog/EasyGoingLogger.php b/src/Monolog/EasyGoingLogger.php index b2194c7..42f392e 100644 --- a/src/Monolog/EasyGoingLogger.php +++ b/src/Monolog/EasyGoingLogger.php @@ -44,7 +44,7 @@ private function __construct() */ public static function init( string $name, - $level = LogLevel::INFO, + string $level = LogLevel::INFO, array $handlers = [], array $processors = [], ?DateTimeZone $timezone = null diff --git a/src/PHPUnit/Framework/ConstantCheckTestCase.php b/src/PHPUnit/Framework/ConstantCheckTestCase.php index 38719f7..f91d7c4 100644 --- a/src/PHPUnit/Framework/ConstantCheckTestCase.php +++ b/src/PHPUnit/Framework/ConstantCheckTestCase.php @@ -30,7 +30,7 @@ abstract class ConstantCheckTestCase extends EasyGoingTestCase * @see ConstantCheckTestCase::expectedConstsCount * @see ConstantCheckTestCase::CHECK_INIT */ - private static $withConstCrossCheck = self::INIT_CROSSCHECK; + private static bool $withConstCrossCheck = self::INIT_CROSSCHECK; /** * @var int Set the expected and correct count of constants in child classes. Only used if {@link ConstantCheckTestCase::$withConstCrossCheck}=true. @@ -120,7 +120,7 @@ protected static function crossCheckConstants(mixed $clazz, array $actualConsts) * * @return string */ - function ($value): string { + function (mixed $value): string { $res = ''; if (is_string($value) && str_contains($value, self::C_STATIC_SEP)) { try { diff --git a/src/PHPUnit/Framework/EasyGoingTestCase.php b/src/PHPUnit/Framework/EasyGoingTestCase.php index c0284db..1338eb1 100644 --- a/src/PHPUnit/Framework/EasyGoingTestCase.php +++ b/src/PHPUnit/Framework/EasyGoingTestCase.php @@ -33,12 +33,12 @@ abstract class EasyGoingTestCase extends TestCase /** * @return mixed */ - abstract protected static function prepareO2t(); + abstract protected static function prepareO2t(): mixed; /** * @return mixed */ - abstract protected function getCasto2t(); + abstract protected function getCasto2t(): mixed; #[\Override] public static function setUpBeforeClass(): void diff --git a/src/Tools/Batch/BatchTaskHelper.php b/src/Tools/Batch/BatchTaskHelper.php index 5932b2a..0b1d0f1 100644 --- a/src/Tools/Batch/BatchTaskHelper.php +++ b/src/Tools/Batch/BatchTaskHelper.php @@ -23,10 +23,10 @@ class BatchTaskHelper public const DEFAULT = 'DEFAULT'; /** @var \Ds\Map */ - private static $tasklists; + private static \Ds\Map $tasklists; /** @var LoggerInterface */ - private static $logger; + private static LoggerInterface $logger; private function __construct() { @@ -78,7 +78,7 @@ public static function getTaskList(?string $listKey): TaskList * * @return TaskList */ - public static function readTaskList(string $fileName, ?string $listKey) + public static function readTaskList(string $fileName, ?string $listKey): TaskList { self::init(); diff --git a/src/Tools/Batch/ITaskItem.php b/src/Tools/Batch/ITaskItem.php index bd56c07..b070f53 100644 --- a/src/Tools/Batch/ITaskItem.php +++ b/src/Tools/Batch/ITaskItem.php @@ -24,7 +24,7 @@ interface ITaskItem * * @phpstan-return TaskKey */ - public function getKey(); + public function getKey(): mixed; /** * @return array @@ -36,5 +36,5 @@ public function getData(): array; /** * @return mixed */ - public function __toString(); + public function __toString(): mixed; } diff --git a/src/Tools/Batch/TaskList.php b/src/Tools/Batch/TaskList.php index 143c490..493d811 100644 --- a/src/Tools/Batch/TaskList.php +++ b/src/Tools/Batch/TaskList.php @@ -20,13 +20,13 @@ class TaskList { /** @var LoggerInterface */ - private static $logger; + private static LoggerInterface $logger; /** @var string */ - private $listKey; + private string $listKey; /** @var Queue */ - private $tasks; + private Queue $tasks; public function __construct(string $listKey) { @@ -108,7 +108,7 @@ public function readFile(string $fileName): bool * * @return null|ITaskItem */ - protected function parseTaskData($itemKey, $convertedLine): ?ITaskItem + protected function parseTaskData(mixed $itemKey, mixed $convertedLine): ?ITaskItem { self::$logger->debug('START - itemKey', [$itemKey]); diff --git a/src/Tools/Emergency.php b/src/Tools/Emergency.php index 793c16f..880cc12 100644 --- a/src/Tools/Emergency.php +++ b/src/Tools/Emergency.php @@ -39,7 +39,7 @@ class Emergency */ public static function exceptionStop(\Throwable $throwable, bool $unitTest = false): int { - $errMsg = sprintf('\%s - %s', get_class($throwable), $throwable->getMessage()); + $errMsg = sprintf('\%s - %s', $throwable::class, $throwable->getMessage()); /** @psalm-suppress PossiblyInvalidArgument */ return static::breakSystem($throwable->getCode(), $errMsg, $unitTest); diff --git a/src/Tools/Reflection/ChildClazzesHelper.php b/src/Tools/Reflection/ChildClazzesHelper.php index 873aa4e..ec83aba 100644 --- a/src/Tools/Reflection/ChildClazzesHelper.php +++ b/src/Tools/Reflection/ChildClazzesHelper.php @@ -27,7 +27,7 @@ private function __construct() * * @return string[] */ - public static function getAllChildren($clazzName): array + public static function getAllChildren(mixed $clazzName): array { $children = []; foreach (get_declared_classes() as $currentClazz) { diff --git a/src/Tools/Reflection/UnavailableFieldsTrait.php b/src/Tools/Reflection/UnavailableFieldsTrait.php index b02697f..62cbb06 100644 --- a/src/Tools/Reflection/UnavailableFieldsTrait.php +++ b/src/Tools/Reflection/UnavailableFieldsTrait.php @@ -24,7 +24,7 @@ trait UnavailableFieldsTrait * * @return null|mixed */ - protected function getFieldByReflection($clazzName, string $fieldName, $instance) + protected function getFieldByReflection(mixed $clazzName, string $fieldName, mixed $instance): mixed { $result = null; if (!empty($clazzName)) { @@ -43,7 +43,7 @@ protected function getFieldByReflection($clazzName, string $fieldName, $instance * @param mixed $instance * @param null|mixed $newValue */ - protected function setFieldByReflection($clazzName, string $fieldName, $instance, $newValue): void + protected function setFieldByReflection(mixed $clazzName, string $fieldName, mixed $instance, mixed $newValue): void { if (!empty($clazzName)) { $refObject = new ReflectionProperty($clazzName, $fieldName); @@ -58,7 +58,7 @@ protected function setFieldByReflection($clazzName, string $fieldName, $instance * * @return null|mixed */ - protected function getFieldFromO2t(string $fieldName) + protected function getFieldFromO2t(string $fieldName): mixed { $result = null; diff --git a/src/Tools/Reflection/UnavailableMethodsTrait.php b/src/Tools/Reflection/UnavailableMethodsTrait.php index 51ae4aa..16e70d1 100644 --- a/src/Tools/Reflection/UnavailableMethodsTrait.php +++ b/src/Tools/Reflection/UnavailableMethodsTrait.php @@ -26,7 +26,7 @@ trait UnavailableMethodsTrait * * @return null|mixed */ - protected function callMethodByReflection($clazzName, string $methodName, $instance) + protected function callMethodByReflection(mixed $clazzName, string $methodName, mixed $instance): mixed { $result = null; if (!empty($clazzName)) { @@ -46,7 +46,7 @@ protected function callMethodByReflection($clazzName, string $methodName, $insta * * @return null|mixed */ - protected function callMethodOnO2t(string $methodName) + protected function callMethodOnO2t(string $methodName): mixed { $result = null; diff --git a/src/Tools/String/ImplodeTrait.php b/src/Tools/String/ImplodeTrait.php index 1836bdb..0ad07bb 100644 --- a/src/Tools/String/ImplodeTrait.php +++ b/src/Tools/String/ImplodeTrait.php @@ -87,7 +87,7 @@ final public static function implode_recursive(string $glue, mixed $anyData, boo if ($anyData instanceof Stringable) { $output = $anyData->__toString(); } else { - $output = get_class($anyData); + $output = $anyData::class; } } else { $output = $anyData; diff --git a/src/Tools/Test/TestData.php b/src/Tools/Test/TestData.php index e3857fe..d5ac256 100644 --- a/src/Tools/Test/TestData.php +++ b/src/Tools/Test/TestData.php @@ -160,21 +160,21 @@ class TestData * * @var array */ - private static $ARRAY_OBJECT1 = []; // NOSONAR: php:S100 + private static array $ARRAY_OBJECT1 = []; // NOSONAR: php:S100 /** * @see self::C_ARRAY_OBJECT2() * * @var array */ - private static $ARRAY_OBJECT2 = []; // NOSONAR: php:S100 + private static array $ARRAY_OBJECT2 = []; // NOSONAR: php:S100 /** * @see self::C_ARRAY_OBJECT3() * * @var array */ - private static $ARRAY_OBJECT3 = []; // NOSONAR: php:S100 + private static array $ARRAY_OBJECT3 = []; // NOSONAR: php:S100 // Filesystem Data diff --git a/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseTest.php b/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseTest.php index f39d316..7a6d76a 100644 --- a/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseTest.php +++ b/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseTest.php @@ -17,10 +17,10 @@ use ollily\Tools\Reflection\UnavailableFieldsTrait; use ollily\Tools\Reflection\UnavailableMethodsTrait; use ollily\Tools\Test\TestData; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\ConstantCheckTestCase; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; -use PHPUnit\Framework\Attributes\DataProvider; /** * This is the test clazz which will test the test clazz. @@ -286,7 +286,7 @@ public function testVerifyConstArraySize(bool $success, string $constantName, in /** * @return array */ - public static function providerConstants() + public static function providerConstants(): array { return [ 'emptyList' => [true, []], @@ -299,7 +299,7 @@ public static function providerConstants() /** * @return array */ - public static function providerConstantsArray() + public static function providerConstantsArray(): array { return [ 'emptyList' => [true, []], @@ -312,7 +312,7 @@ public static function providerConstantsArray() /** * @return array */ - public static function providerConstantName() + public static function providerConstantName(): array { return [ 'missingName' => [false, '', self::TEST_CONST_ARRAY_SIZE], @@ -325,7 +325,7 @@ public static function providerConstantName() /** * @return array */ - public static function providerCrossCheck() + public static function providerCrossCheck(): array { return [ 'emptyListDisabled' => [true, false, ConstantCheckTestCaseDummyClazz::class, []], diff --git a/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseClazz.php b/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseClazz.php index 6fb5121..b24a4c7 100644 --- a/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseClazz.php +++ b/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseClazz.php @@ -58,7 +58,7 @@ protected function getCasto2t() * * @return bool */ - public static function publicIsConstExist($clazz, string $constantName): bool + public static function publicIsConstExist(mixed $clazz, string $constantName): bool { return parent::isConstExist($clazz, $constantName); } @@ -69,7 +69,7 @@ public static function publicIsConstExist($clazz, string $constantName): bool * * @return mixed */ - public static function publicGetConstValue($clazz, string $constantName) + public static function publicGetConstValue(mixed $clazz, string $constantName): mixed { return parent::getConstValue($clazz, $constantName); } @@ -79,7 +79,7 @@ public static function publicGetConstValue($clazz, string $constantName) * * @return bool */ - public static function publicIsPrimitive($var): bool + public static function publicIsPrimitive(mixed $var): bool { return parent::isPrimitive($var); } @@ -121,7 +121,7 @@ public function publicGet_called_function(): string /** * @return EasyGoingTestCaseDummyClazz */ - public function publicGetCastO2t() + public function publicGetCastO2t(): EasyGoingTestCaseDummyClazz { return $this->getCasto2t(); } diff --git a/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseTest.php b/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseTest.php index b34c49a..6d1a3d0 100644 --- a/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseTest.php +++ b/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseTest.php @@ -16,9 +16,9 @@ use Monolog\EasyGoingLogger; use ollily\Tools\Reflection\UnavailableFieldsTrait; use ollily\Tools\Reflection\UnavailableMethodsTrait; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; -use PHPUnit\Framework\Attributes\DataProvider; /** * This is the test clazz which will test the test clazz. @@ -31,10 +31,10 @@ class EasyGoingTestCaseTest extends TestCase use UnavailableFieldsTrait; /** @var EasyGoingTestCaseClazz */ - protected $o2t; + protected EasyGoingTestCaseClazz $o2t; /** @var LoggerInterface */ - private static $logger; + private static LoggerInterface $logger; #[\Override] public static function setUpBeforeClass(): void @@ -50,7 +50,7 @@ public static function setUpBeforeClass(): void /** * @return EasyGoingTestCaseClazz */ - protected static function prepareO2t() + protected static function prepareO2t(): EasyGoingTestCaseClazz { return new EasyGoingTestCaseClazz(EasyGoingTestCaseClazz::class); } @@ -203,7 +203,7 @@ public function testGet_called_function(): void /** * @return array */ - public static function providerConstant() + public static function providerConstant(): array { return [ 'public' => [true, EasyGoingTestCaseDummyClazz::TEST_CONST_PREFIX . '_PUBLIC', 'public'], diff --git a/tests/Tools/Batch/BatchTaskHelperTest.php b/tests/Tools/Batch/BatchTaskHelperTest.php index 15b287c..b99998a 100644 --- a/tests/Tools/Batch/BatchTaskHelperTest.php +++ b/tests/Tools/Batch/BatchTaskHelperTest.php @@ -13,9 +13,9 @@ namespace ollily\Tools\Batch; -use PHPUnit\Framework\TestCase; use ollily\Tools\Test\TestData; use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\TestCase; class BatchTaskHelperTest extends TestCase { diff --git a/tests/Tools/Batch/TaskItemTest.php b/tests/Tools/Batch/TaskItemTest.php index ab97639..fbbce2a 100644 --- a/tests/Tools/Batch/TaskItemTest.php +++ b/tests/Tools/Batch/TaskItemTest.php @@ -13,8 +13,8 @@ namespace ollily\Tools\Batch; -use PHPUnit\Framework\EasyGoingTestCase; use ollily\Tools\Test\TestData; +use PHPUnit\Framework\EasyGoingTestCase; class TaskItemTest extends EasyGoingTestCase { @@ -25,7 +25,7 @@ class TaskItemTest extends EasyGoingTestCase /** * @return ITaskItem */ - protected static function prepareO2t() + protected static function prepareO2t(): ITaskItem { return new TaskItem(self::KEY, self::DATA); } @@ -33,7 +33,7 @@ protected static function prepareO2t() /** * @return ITaskItem */ - protected function getCasto2t() + protected function getCasto2t(): ITaskItem { return $this->o2t; } diff --git a/tests/Tools/Batch/TaskListTest.php b/tests/Tools/Batch/TaskListTest.php index 3546422..852ed05 100644 --- a/tests/Tools/Batch/TaskListTest.php +++ b/tests/Tools/Batch/TaskListTest.php @@ -14,8 +14,8 @@ namespace ollily\Tools\Batch; use ollily\Tools\Test\TestData; -use PHPUnit\Framework\EasyGoingTestCase; use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\EasyGoingTestCase; class TaskListTest extends EasyGoingTestCase { @@ -26,7 +26,7 @@ class TaskListTest extends EasyGoingTestCase public const DATA = TestData::DATA_ALPHA1; /** @var string */ - private $writeTaskListFile = ''; + private string $writeTaskListFile = ''; protected function tearDown(): void { @@ -46,7 +46,7 @@ public static function prepareFiles(): array /** * @return TaskList */ - protected static function prepareO2t() + protected static function prepareO2t(): TaskList { return new TaskList(self::KEY); } @@ -54,7 +54,7 @@ protected static function prepareO2t() /** * @return TaskList */ - protected function getCasto2t() + protected function getCasto2t(): TaskList { return $this->o2t; } @@ -168,7 +168,7 @@ public static function providerTaskListFile(): array * * @return array */ - protected function prepareTaskItem($taskListKey, int $count): array + protected function prepareTaskItem(mixed $taskListKey, int $count): array { $items = []; diff --git a/tests/Tools/EmergencyTest.php b/tests/Tools/EmergencyTest.php index a7ccb7a..ed86e53 100644 --- a/tests/Tools/EmergencyTest.php +++ b/tests/Tools/EmergencyTest.php @@ -13,8 +13,8 @@ namespace ollily\Tools; -use PHPUnit\Framework\TestCase; use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\TestCase; class EmergencyTest extends TestCase { diff --git a/tests/Tools/EnvironmentVariableTraitTest.php b/tests/Tools/EnvironmentVariableTraitTest.php index 7fee0e0..b424281 100644 --- a/tests/Tools/EnvironmentVariableTraitTest.php +++ b/tests/Tools/EnvironmentVariableTraitTest.php @@ -13,8 +13,8 @@ namespace ollily\Tools; -use PHPUnit\Framework\TestCase; use ollily\Tools\Test\TestData; +use PHPUnit\Framework\TestCase; class EnvironmentVariableTraitTest extends TestCase { @@ -35,43 +35,43 @@ public function testHomeDefault(): void $this->validateActualContains($actual, DIRECTORY_SEPARATOR); } -// public function testHomeUserProfileDirect(): void -// { -// $actual = self::getHome(self::HOME_WIN); -// if (empty($actual)) { -// $actual = self::getHome(self::HOME_LINUX); -// } -// -// $this->validateActualContains($actual, DIRECTORY_SEPARATOR); -// } - -// public function testHomeUserProfileIndirect(): void -// { -// $actual = self::getHome(self::HOME_NOTEXIST); -// -// self::assertEquals(TestData::DATA_EMPTY, $actual); -// } - -// public function testGetProjectRoot(): void -// { -// $actual = self::getProjectRoot(); -// -// $this->validateActualEnds($actual, self::PROJECT_NAME); -// } - -// public function testGetComposerFilePath(): void -// { -// $actual = self::getComposerFilePath(); -// -// $this->validateActualEnds($actual, self::PROJECT_NAME); -// } -// -// public function testGetProjectRootFallback(): void -// { -// $actual = self::getProjectRootFallback(); -// -// $this->validateActualEnds($actual, self::PROJECT_NAME); -// } + public function testHomeUserProfileDirect(): void + { + $actual = self::getHome(self::HOME_WIN); + if (empty($actual)) { + $actual = self::getHome(self::HOME_LINUX); + } + + $this->validateActualContains($actual, DIRECTORY_SEPARATOR); + } + + public function testHomeUserProfileIndirect(): void + { + $actual = self::getHome(self::HOME_NOTEXIST); + + self::assertEquals(TestData::DATA_EMPTY, $actual); + } + + public function testGetProjectRoot(): void + { + $actual = self::getProjectRoot(); + + $this->validateActualEnds($actual, self::PROJECT_NAME); + } + + public function testGetComposerFilePath(): void + { + $actual = self::getComposerFilePath(); + + $this->validateActualEnds($actual, self::PROJECT_NAME); + } + + public function testGetProjectRootFallback(): void + { + $actual = self::getProjectRootFallback(); + + $this->validateActualEnds($actual, self::PROJECT_NAME); + } private function validateActualContains(string $actual, string $expected): void { @@ -81,8 +81,6 @@ private function validateActualContains(string $actual, string $expected): void private function validateActualEnds(string $actual, string $expected): void { - var_dump($expected); - var_dump($actual); self::assertNotEmpty($actual); self::assertStringEndsWith($expected, $actual); } diff --git a/tests/Tools/PhpVersionTraitTest.php b/tests/Tools/PhpVersionTraitTest.php index 00c95b5..cbff393 100644 --- a/tests/Tools/PhpVersionTraitTest.php +++ b/tests/Tools/PhpVersionTraitTest.php @@ -13,9 +13,9 @@ namespace ollily\Tools; -use PHPUnit\Framework\TestCase; use ollily\Tools\Test\TestData; use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\TestCase; class PhpVersionTraitTest extends TestCase { diff --git a/tests/Tools/Reflection/ChildClazzesHelperTest.php b/tests/Tools/Reflection/ChildClazzesHelperTest.php index a20f65d..74af48f 100644 --- a/tests/Tools/Reflection/ChildClazzesHelperTest.php +++ b/tests/Tools/Reflection/ChildClazzesHelperTest.php @@ -13,9 +13,9 @@ namespace ollily\Tools\Reflection; -use PHPUnit\Framework\TestCase; use ollily\Tools\Test\TestData; use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\TestCase; class ChildClazzesHelperTest extends TestCase { diff --git a/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitDummyClazz.php b/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitDummyClazz.php index 1f344f6..0047bce 100644 --- a/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitDummyClazz.php +++ b/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitDummyClazz.php @@ -24,11 +24,11 @@ class UnavailableFieldsTraitDummyClazz { /** @var string */ - public $publicField = 'publicFieldValue'; + public string $publicField = 'publicFieldValue'; /** @var string */ - protected $protectedField = 'protectedFieldValue'; + protected string $protectedField = 'protectedFieldValue'; /** @var string */ - private $privateField = 'privateFieldValue'; + private string $privateField = 'privateFieldValue'; } diff --git a/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTest.php b/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTest.php index c2924c1..0cc38e5 100644 --- a/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTest.php +++ b/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTest.php @@ -24,10 +24,10 @@ class UnavailableFieldsTraitTest extends TestCase { /** @var UnavailableFieldsTraitTestO2tClazz */ - protected $o2t; + protected UnavailableFieldsTraitTestO2tClazz $o2t; /** @var string[] */ - private $fieldNames = ['publicField', 'protectedField', 'privateField']; + private array $fieldNames = ['publicField', 'protectedField', 'privateField']; public function setUp(): void { diff --git a/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTestO2tClazz.php b/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTestO2tClazz.php index 7b06c68..3e72a70 100644 --- a/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTestO2tClazz.php +++ b/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTestO2tClazz.php @@ -26,7 +26,7 @@ class UnavailableFieldsTraitTestO2tClazz use UnavailableFieldsTrait; /** @var mixed */ - protected $o2t; + protected mixed $o2t; public function __construct() { @@ -38,7 +38,7 @@ public function __construct() * * @return null|mixed */ - public function publicGetFieldFromO2t(string $fieldName) + public function publicGetFieldFromO2t(string $fieldName): mixed { return $this->getFieldFromO2t($fieldName); } @@ -48,7 +48,7 @@ public function publicGetFieldFromO2t(string $fieldName) * * @return null|mixed */ - public function publicGetFieldByReflection(string $fieldName) + public function publicGetFieldByReflection(string $fieldName): mixed { return $this->getFieldByReflection(UnavailableFieldsTraitDummyClazz::class, $fieldName, $this->o2t); } @@ -57,7 +57,7 @@ public function publicGetFieldByReflection(string $fieldName) * @param string $fieldName * @param null|mixed $newValue */ - public function publicSetFieldByReflection(string $fieldName, $newValue): void + public function publicSetFieldByReflection(string $fieldName, mixed $newValue): void { $this->setFieldByReflection(UnavailableFieldsTraitDummyClazz::class, $fieldName, $this->o2t, $newValue); } diff --git a/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTestWrongO2tClazz.php b/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTestWrongO2tClazz.php index 1e54356..be37d04 100644 --- a/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTestWrongO2tClazz.php +++ b/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTestWrongO2tClazz.php @@ -26,7 +26,7 @@ class UnavailableFieldsTraitTestWrongO2tClazz use UnavailableFieldsTrait; /** @var mixed */ - private $wrongO2t; + private mixed $wrongO2t; public function __construct() { @@ -38,7 +38,7 @@ public function __construct() * * @return null|mixed */ - public function publicGetFieldFromO2t(string $fieldName) + public function publicGetFieldFromO2t(string $fieldName): mixed { return $this->getFieldFromO2t($fieldName); } diff --git a/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTest.php b/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTest.php index d560672..304b28d 100644 --- a/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTest.php +++ b/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTest.php @@ -24,10 +24,10 @@ class UnavailableMethodsTraitTest extends TestCase { /** @var UnavailableMethodsTraitTestO2tClazz */ - protected $o2t; + protected UnavailableMethodsTraitTestO2tClazz $o2t; /** @var string[] */ - private $methodNames = ['publicFunc', 'protectedFunc', 'privateFunc']; + private array $methodNames = ['publicFunc', 'protectedFunc', 'privateFunc']; public function setUp(): void { diff --git a/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTestO2tClazz.php b/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTestO2tClazz.php index 30802aa..5fd3f50 100644 --- a/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTestO2tClazz.php +++ b/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTestO2tClazz.php @@ -26,7 +26,7 @@ class UnavailableMethodsTraitTestO2tClazz use UnavailableMethodsTrait; /** @var mixed */ - protected $o2t; + protected mixed $o2t; public function __construct() { @@ -38,7 +38,7 @@ public function __construct() * * @return null|mixed */ - public function publicCallMethodOnO2t(string $methodName) + public function publicCallMethodOnO2t(string $methodName): mixed { return $this->callMethodOnO2t($methodName); } @@ -48,7 +48,7 @@ public function publicCallMethodOnO2t(string $methodName) * * @return null|mixed */ - public function publicCallMethodByReflection(string $methodName) + public function publicCallMethodByReflection(string $methodName): mixed { return $this->callMethodByReflection(UnavailableMethodsTraitDummyClazz::class, $methodName, $this->o2t); } diff --git a/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTestWrongO2tClazz.php b/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTestWrongO2tClazz.php index fc07917..1cd4014 100644 --- a/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTestWrongO2tClazz.php +++ b/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTestWrongO2tClazz.php @@ -30,7 +30,7 @@ class UnavailableMethodsTraitTestWrongO2tClazz * * @SuppressWarnings("PHPMD.UnusedPrivateField") */ - private $wrongO2t; + private mixed $wrongO2t; public function __construct() { @@ -42,7 +42,7 @@ public function __construct() * * @return null|mixed */ - public function publicCallMethodOnO2t(string $methodName) + public function publicCallMethodOnO2t(string $methodName): mixed { return $this->callMethodOnO2t($methodName); } diff --git a/tests/Tools/String/ImplodeTraitTest.php b/tests/Tools/String/ImplodeTraitTest.php index c5a0799..db0b3af 100644 --- a/tests/Tools/String/ImplodeTraitTest.php +++ b/tests/Tools/String/ImplodeTraitTest.php @@ -13,9 +13,9 @@ namespace ollily\Tools\String; -use PHPUnit\Framework\TestCase; use ollily\Tools\Test\TestData; use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\TestCase; /** * This is the test clazz which will test the test clazz. @@ -99,10 +99,10 @@ public function verifyResult(mixed $actual, mixed $testData, int $expectedKeyCou if ($withClazz) { if (is_array($expected)) { foreach ($expected as $innerExpected) { - self::assertStringContainsString('' . get_class($innerExpected), $actual); + self::assertStringContainsString('' . $innerExpected::class, $actual); } } else { - self::assertStringContainsString('' . get_class($expected), $actual); + self::assertStringContainsString('' . $expected::class, $actual); } } else { self::assertStringContainsString($expected, $actual); diff --git a/tests/Tools/String/ToStringTraitTest.php b/tests/Tools/String/ToStringTraitTest.php index 10cd07e..682b756 100644 --- a/tests/Tools/String/ToStringTraitTest.php +++ b/tests/Tools/String/ToStringTraitTest.php @@ -13,10 +13,10 @@ namespace ollily\Tools\String; -use PHPUnit\Framework\TestCase; use ollily\Tools\Test\TestData; use ollily\Tools\Test\TestDataFoo; use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\TestCase; /** * This is the test clazz which will test the test clazz. diff --git a/tests/Tools/Test/TestDataTest.php b/tests/Tools/Test/TestDataTest.php index 2841d26..7ccd8e6 100644 --- a/tests/Tools/Test/TestDataTest.php +++ b/tests/Tools/Test/TestDataTest.php @@ -13,9 +13,9 @@ namespace ollily\Tools\Test; -use PHPUnit\Framework\TestCase; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\Attributes\Depends; +use PHPUnit\Framework\TestCase; /** * @SuppressWarnings("PHPMD.UnusedFormalParameter") @@ -23,7 +23,7 @@ class TestDataTest extends TestCase { /** @var string */ - private static $fileName; + private static string $fileName; /** * @param int $expectedCount @@ -84,7 +84,7 @@ public function verifyResult(int $expectedCount, string $pivot): void * @psalm-param mixed $value * @psalm-param mixed $key */ - function ($value, $key) use ($pivot): bool { + function (mixed $value, mixed $key) use ($pivot): bool { if (is_array($key)) { return false; } else { From a7758e3f509d5b51937d377a5d853e289ade9989 Mon Sep 17 00:00:00 2001 From: ollily <426229+ollily@users.noreply.github.com> Date: Sun, 24 May 2026 18:23:06 +0200 Subject: [PATCH 7/9] #1: switch to php 8.4 / untested --- src/PHPUnit/Framework/EasyGoingTestCase.php | 11 +- src/Tools/Batch/BatchTaskHelper.php | 5 +- src/Tools/Batch/ITaskItem.php | 4 +- src/Tools/Batch/TaskItem.php | 2 +- src/Tools/Test/TestData.php | 129 +++++++++--------- .../ConstantCheckTestCaseClazz.php | 7 +- .../EasyGoingTestCaseClazz.php | 8 +- 7 files changed, 81 insertions(+), 85 deletions(-) diff --git a/src/PHPUnit/Framework/EasyGoingTestCase.php b/src/PHPUnit/Framework/EasyGoingTestCase.php index 1338eb1..e8a9ff2 100644 --- a/src/PHPUnit/Framework/EasyGoingTestCase.php +++ b/src/PHPUnit/Framework/EasyGoingTestCase.php @@ -24,21 +24,20 @@ abstract class EasyGoingTestCase extends TestCase /** @var string All primitive datatypes */ protected const string C_PRIMITIVES = 'int|integer|bool|boolean|float'; - /** @var LoggerInterface */ private static LoggerInterface $logger; - /** @var mixed The object which will be tested. */ + /** @var The object which will be tested. */ protected mixed $o2t; /** - * @return mixed + * @return object new created instance */ - abstract protected static function prepareO2t(): mixed; + abstract protected static function prepareO2t(): object; /** - * @return mixed + * @return object current instance */ - abstract protected function getCasto2t(): mixed; + abstract protected function getCasto2t(): object; #[\Override] public static function setUpBeforeClass(): void diff --git a/src/Tools/Batch/BatchTaskHelper.php b/src/Tools/Batch/BatchTaskHelper.php index 0b1d0f1..aab318b 100644 --- a/src/Tools/Batch/BatchTaskHelper.php +++ b/src/Tools/Batch/BatchTaskHelper.php @@ -23,10 +23,9 @@ class BatchTaskHelper public const DEFAULT = 'DEFAULT'; /** @var \Ds\Map */ - private static \Ds\Map $tasklists; + private static ?\Ds\Map $tasklists = null; - /** @var LoggerInterface */ - private static LoggerInterface $logger; + private static ?LoggerInterface $logger = null; private function __construct() { diff --git a/src/Tools/Batch/ITaskItem.php b/src/Tools/Batch/ITaskItem.php index b070f53..9743443 100644 --- a/src/Tools/Batch/ITaskItem.php +++ b/src/Tools/Batch/ITaskItem.php @@ -34,7 +34,7 @@ public function getKey(): mixed; public function getData(): array; /** - * @return mixed + * @return string */ - public function __toString(): mixed; + public function __toString(): string; } diff --git a/src/Tools/Batch/TaskItem.php b/src/Tools/Batch/TaskItem.php index 87c9ce8..1c250e7 100644 --- a/src/Tools/Batch/TaskItem.php +++ b/src/Tools/Batch/TaskItem.php @@ -46,7 +46,7 @@ public function __construct(mixed $key, array $data) * @inheritDoc */ #[\Override] - public function getKey() + public function getKey(): mixed { return $this->key; } diff --git a/src/Tools/Test/TestData.php b/src/Tools/Test/TestData.php index d5ac256..e9d3865 100644 --- a/src/Tools/Test/TestData.php +++ b/src/Tools/Test/TestData.php @@ -24,115 +24,113 @@ class TestData // Unspecific test data // Single data - public const DATA_NUM1 = 11; + public const int DATA_NUM1 = 11; - public const DATA_NUM2 = 22; + public const int DATA_NUM2 = 22; - public const DATA_NUM3 = 33; + public const int DATA_NUM3 = 33; - public const DATA_NUM4 = 44; + public const int DATA_NUM4 = 44; - public const DATA_NUM5 = 55; + public const int DATA_NUM5 = 55; - public const DATA_ALPHA1 = 'DATA-ALPHA11'; + public const string DATA_ALPHA1 = 'DATA-ALPHA11'; - public const DATA_ALPHA2 = 'DATA-ALPHA22'; + public const string DATA_ALPHA2 = 'DATA-ALPHA22'; - public const DATA_ALPHA3 = 'DATA-ALPHA33'; + public const string DATA_ALPHA3 = 'DATA-ALPHA33'; - public const DATA_ALPHA4 = 'DATA-ALPHA44'; + public const string DATA_ALPHA4 = 'DATA-ALPHA44'; - public const DATA_ALPHA5 = 'DATA-ALPHA55'; + public const string DATA_ALPHA5 = 'DATA-ALPHA55'; - public const DATA_BOOL_T = true; + public const bool DATA_BOOL_T = true; - public const DATA_BOOL_F = false; + public const bool DATA_BOOL_F = false; - /** @var null|string */ - public const DATA_NULL = null; + public const ?object DATA_NULL = null; - public const DATA_EMPTY = ''; + public const string DATA_EMPTY = ''; - public const DATA_INVALID = 'INVALID'; + public const string DATA_INVALID = 'INVALID'; - public const DATA_NOTEXIST = 'NOT-EXIST'; + public const string DATA_NOTEXIST = 'NOT-EXIST'; // Misc Data - public const NOTEXIST_NAME = 'XXXName'; + public const string NOTEXIST_NAME = 'XXXName'; - public const NOTEXIST_ID = 99999; + public const int NOTEXIST_ID = 99999; - public const NOTEXIST_ARRAY = [self::NOTEXIST_ID => self::NOTEXIST_NAME]; + public const array NOTEXIST_ARRAY = [self::NOTEXIST_ID => self::NOTEXIST_NAME]; - public const NOTEXIST_CLAZZ = 'ollily/NotExistClazz'; + public const string NOTEXIST_CLAZZ = 'ollily/NotExistClazz'; - public const NOTEXIST_FILE = DIRECTORY_SEPARATOR . 'NotExistFile'; + public const string NOTEXIST_FILE = DIRECTORY_SEPARATOR . 'NotExistFile'; // Array Data - public const ARRAY_ITEM_SEP = ','; + public const string ARRAY_ITEM_SEP = ','; // Array keys - public const KEY_NUM1 = 1; + public const int KEY_NUM1 = 1; - public const KEY_NUM2 = 2; + public const int KEY_NUM2 = 2; - public const KEY_NUM3 = 3; + public const int KEY_NUM3 = 3; - public const KEY_NUM4 = 4; + public const int KEY_NUM4 = 4; - public const KEY_NUM5 = 5; + public const int KEY_NUM5 = 5; - public const KEY_ALPHA1 = 'KEY-ALPHA1'; + public const string KEY_ALPHA1 = 'KEY-ALPHA1'; - public const KEY_ALPHA2 = 'KEY-ALPHA2'; + public const string KEY_ALPHA2 = 'KEY-ALPHA2'; - public const KEY_ALPHA3 = 'KEY-ALPHA3'; + public const string KEY_ALPHA3 = 'KEY-ALPHA3'; // Arrays complete - public const ARRAY_EMPTY = []; + public const array ARRAY_EMPTY = []; - /** @var null|array */ - public const ARRAY_NULL = null; + public const ?array ARRAY_NULL = null; // Arrays with alphanumeric data - public const ARRAY_ALPHA1 = [self::DATA_ALPHA1]; + public const array ARRAY_ALPHA1 = [self::DATA_ALPHA1]; - public const ARRAY_ALPHA2 = [self::DATA_ALPHA1, self::DATA_ALPHA2]; + public const array ARRAY_ALPHA2 = [self::DATA_ALPHA1, self::DATA_ALPHA2]; - public const ARRAY_ALPHA3 = [self::DATA_ALPHA1, self::DATA_ALPHA2, self::DATA_ALPHA3]; + public const array ARRAY_ALPHA3 = [self::DATA_ALPHA1, self::DATA_ALPHA2, self::DATA_ALPHA3]; - public const ARRAY_ALPHA4 = [self::DATA_ALPHA1, self::DATA_ALPHA2, self::DATA_ALPHA3, self::DATA_ALPHA4]; + public const array ARRAY_ALPHA4 = [self::DATA_ALPHA1, self::DATA_ALPHA2, self::DATA_ALPHA3, self::DATA_ALPHA4]; - public const ARRAY_ALPHA5 = [self::DATA_ALPHA1, self::DATA_ALPHA2, self::DATA_ALPHA3, self::DATA_ALPHA4, self::DATA_ALPHA5]; + public const array ARRAY_ALPHA5 = [self::DATA_ALPHA1, self::DATA_ALPHA2, self::DATA_ALPHA3, self::DATA_ALPHA4, self::DATA_ALPHA5]; // Arrays with numeric data - public const ARRAY_NUM1 = [self::DATA_NUM1]; + public const array ARRAY_NUM1 = [self::DATA_NUM1]; - public const ARRAY_NUM2 = [self::DATA_NUM1, self::DATA_NUM2]; + public const array ARRAY_NUM2 = [self::DATA_NUM1, self::DATA_NUM2]; - public const ARRAY_NUM3 = [self::DATA_NUM1, self::DATA_NUM2, self::DATA_NUM3]; + public const array ARRAY_NUM3 = [self::DATA_NUM1, self::DATA_NUM2, self::DATA_NUM3]; // Arrays with bool data - public const ARRAY_BOOL1 = [self::DATA_BOOL_T]; + public const array ARRAY_BOOL1 = [self::DATA_BOOL_T]; - public const ARRAY_BOOL2 = [self::DATA_BOOL_T, self::DATA_BOOL_F]; + public const array ARRAY_BOOL2 = [self::DATA_BOOL_T, self::DATA_BOOL_F]; // Arrays with alphanumeric key - public const ARRAY_ALPHA_KEY1 = [self::KEY_ALPHA1 => self::DATA_ALPHA1]; + public const array ARRAY_ALPHA_KEY1 = [self::KEY_ALPHA1 => self::DATA_ALPHA1]; - public const ARRAY_ALPHA_KEY2 = [ + public const array ARRAY_ALPHA_KEY2 = [ self::KEY_ALPHA1 => self::DATA_ALPHA1, self::KEY_ALPHA2 => self::DATA_ALPHA2, ]; - public const ARRAY_ALPHA_KEY3 = [ + public const array ARRAY_ALPHA_KEY3 = [ self::KEY_ALPHA1 => self::DATA_ALPHA1, self::KEY_ALPHA2 => self::DATA_ALPHA2, self::KEY_ALPHA3 => self::DATA_ALPHA3, @@ -140,14 +138,14 @@ class TestData // Arrays with exlicit numeric key - public const ARRAY_NUM_KEY1 = [self::KEY_NUM1 => self::DATA_NUM1]; + public const array ARRAY_NUM_KEY1 = [self::KEY_NUM1 => self::DATA_NUM1]; - public const ARRAY_NUM_KEY2 = [ + public const array ARRAY_NUM_KEY2 = [ self::KEY_NUM1 => self::DATA_NUM1, self::KEY_NUM2 => self::DATA_NUM2, ]; - public const ARRAY_NUM_KEY3 = [ + public const array ARRAY_NUM_KEY3 = [ self::KEY_NUM1 => self::DATA_NUM1, self::KEY_NUM2 => self::DATA_NUM2, self::KEY_NUM3 => self::DATA_NUM3, @@ -180,40 +178,37 @@ class TestData // Foldernames - /** @var null|string */ - public const FILE_FOLDERNAME_NULL = null; + public const ?object FILE_FOLDERNAME_NULL = null; - public const FILE_FOLDERNAME_EMPTY = ''; + public const string FILE_FOLDERNAME_EMPTY = ''; - public const FILE_FOLDERNAME = 'FOLDER-EXIST'; + public const string FILE_FOLDERNAME = 'FOLDER-EXIST'; // Filenames - /** @var null|string */ - public const FILE_FILENAME_NULL = null; + public const ?object FILE_FILENAME_NULL = null; - public const FILE_FILENAME_EMPTY = ''; + public const string FILE_FILENAME_EMPTY = ''; - public const FILE_FILENAME = 'FILE-EXIST'; + public const string FILE_FILENAME = 'FILE-EXIST'; - public const FILE_FILENAME_PREFIX = 'teda-'; + public const string FILE_FILENAME_PREFIX = 'teda-'; // File Extensions - /** @var null|string */ - public const FILE_EXT_NULL = null; + public const ?object FILE_EXT_NULL = null; - public const FILE_EXT_EMPTY = ''; + public const string FILE_EXT_EMPTY = ''; - public const FILE_EXT_NAME = 'EXT-EXIST'; + public const string FILE_EXT_NAME = 'EXT-EXIST'; - public const FILE_EXT_PHP = '.php'; + public const string FILE_EXT_PHP = '.php'; - public const FILE_EXT_TXT = '.txt'; + public const string FILE_EXT_TXT = '.txt'; - public const FILE_EXT_JSON = '.json'; + public const string FILE_EXT_JSON = '.json'; - public const FILE_EXT_CSV = '.csv'; + public const string FILE_EXT_CSV = '.csv'; // Static functions diff --git a/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseClazz.php b/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseClazz.php index e9769b5..29fe161 100644 --- a/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseClazz.php +++ b/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseClazz.php @@ -35,6 +35,9 @@ public static function tearDownAfterClass(): void // Deactivate the check, will be called manually in testcase } + /** + * @inheritDoc + */ #[\Override] protected static function prepareO2t(): ConstantCheckTestCaseDummyClazz { @@ -42,10 +45,10 @@ protected static function prepareO2t(): ConstantCheckTestCaseDummyClazz } /** - * @return ConstantCheckTestCaseDummyClazz + * @inheritDoc */ #[\Override] - protected function getCasto2t() + protected function getCasto2t(): ConstantCheckTestCaseDummyClazz { return $this->o2t; } diff --git a/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseClazz.php b/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseClazz.php index b24a4c7..ac927ec 100644 --- a/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseClazz.php +++ b/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseClazz.php @@ -33,19 +33,19 @@ public static function tearDownAfterClass(): void } /** - * @return EasyGoingTestCaseDummyClazz + * @inheritDoc */ #[\Override] - protected static function prepareO2t() + protected static function prepareO2t(): EasyGoingTestCaseDummyClazz { return new EasyGoingTestCaseDummyClazz(); } /** - * @return EasyGoingTestCaseDummyClazz + * @inheritDoc */ #[\Override] - protected function getCasto2t() + protected function getCasto2t(): EasyGoingTestCaseDummyClazz { return $this->o2t; } From ca65f6d885d8f45eaf3d0da24ca000c6c48c8947 Mon Sep 17 00:00:00 2001 From: ollily <426229+ollily@users.noreply.github.com> Date: Sun, 24 May 2026 18:27:35 +0200 Subject: [PATCH 8/9] #1: switch to php 8.4 / untested --- tests/Tools/String/ToStringTraitTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Tools/String/ToStringTraitTest.php b/tests/Tools/String/ToStringTraitTest.php index 682b756..359fe33 100644 --- a/tests/Tools/String/ToStringTraitTest.php +++ b/tests/Tools/String/ToStringTraitTest.php @@ -50,6 +50,7 @@ class ToStringTraitTest extends TestCase #[\Override] protected function setUp(): void { + $this->markTestIncomplete('FIXME: Ignore 4 a moment'); parent::setUp(); $this->o2t = new ToStringTraitTestDummyClazz(); } From 7198bd46810d3e93c43639610f79d7b2305dbd9b Mon Sep 17 00:00:00 2001 From: ollily <426229+ollily@users.noreply.github.com> Date: Mon, 25 May 2026 00:04:43 +0200 Subject: [PATCH 9/9] #1: switch to php 8.4 / tested --- .php-cs-fixer.dist.php | 127 ++++++++++-------- .phpcs.xml.dist | 5 - composer.json | 6 +- psalm.xml.dist | 7 +- src/Monolog/EasyGoingLogger.php | 18 ++- .../Framework/ConstantCheckTestCase.php | 26 ++-- src/PHPUnit/Framework/EasyGoingTestCase.php | 42 ++---- src/Tools/Batch/BatchTaskHelper.php | 73 +++++----- src/Tools/Batch/ITaskItem.php | 7 - src/Tools/Batch/TaskItem.php | 10 +- src/Tools/Batch/TaskList.php | 31 +---- src/Tools/Emergency.php | 6 +- src/Tools/EnvironmentVariableTrait.php | 16 --- src/Tools/Reflection/ChildClazzesHelper.php | 2 +- .../Reflection/UnavailableFieldsTrait.php | 20 +-- .../Reflection/UnavailableMethodsTrait.php | 6 +- src/Tools/String/ToStringTrait.php | 10 +- src/Tools/Test/TestData.php | 25 ++-- src/Tools/Test/TestDataFoo.php | 14 +- .../ConstantCheckTestCaseClazz.php | 28 +++- .../ConstantCheckTestCaseDummyClazz.php | 12 +- .../ConstantCheckTestCaseTest.php | 33 ++--- .../EasyGoingTestCaseClazz.php | 37 +---- .../EasyGoingTestCaseDummyClazz.php | 12 +- .../EasyGoingTestCaseTest.php | 19 +-- tests/Tools/Batch/BatchTaskHelperTest.php | 21 +-- tests/Tools/Batch/TaskItemTest.php | 12 +- tests/Tools/Batch/TaskListTest.php | 36 +++-- tests/Tools/EmergencyTest.php | 25 ++-- tests/Tools/EnvironmentVariableTraitTest.php | 26 ++-- tests/Tools/PhpVersionTraitTest.php | 10 +- .../Reflection/ChildClazzesHelperTest.php | 3 - .../UnavailableFieldsTraitDummyClazz.php | 3 - .../UnavailableFieldsTraitTest.php | 5 +- .../UnavailableFieldsTraitTestO2tClazz.php | 17 +-- ...navailableFieldsTraitTestWrongO2tClazz.php | 8 +- .../UnavailableMethodsTraitTest.php | 5 +- .../UnavailableMethodsTraitTestO2tClazz.php | 13 +- ...availableMethodsTraitTestWrongO2tClazz.php | 13 +- tests/Tools/String/ImplodeTraitTest.php | 7 - tests/Tools/String/ToStringTraitTest.php | 24 ++-- .../String/ToStringTraitTestDummyClazz.php | 1 - tests/Tools/Test/TestDataTest.php | 7 +- 43 files changed, 304 insertions(+), 524 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index aa7ecf2..9a0858c 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -2,10 +2,10 @@ declare(strict_types=1); -$headerProjName = 'ezkoding'; +$headerProjName = 'ezkoding'; $headerProjAuthor = 'Oliver Glowa, coding.glowa.com'; -$headerProjYear = 2025; -$headerText = << true, - '@PSR12' => true, + '@PSR2' => true, + '@PSR12' => true, + '@PHP8x4Migration' => true, // Customizing - 'declare_strict_types' => true, - 'no_trailing_comma_in_singleline' => true, - 'no_unused_imports' => true, - 'protected_to_private' => false, - 'modifier_keywords' => true, - 'return_assignment' => true, + 'declare_strict_types' => true, + 'no_trailing_comma_in_singleline' => true, + 'no_unused_imports' => true, + 'protected_to_private' => false, + 'modifier_keywords' => true, + 'return_assignment' => true, // Blank lines / spacing - 'class_attributes_separation' => [ + 'class_attributes_separation' => [ 'elements' => [ - 'const' => 'one', - 'method' => 'one', - 'property' => 'one', + 'const' => 'one', + 'method' => 'one', + 'property' => 'one', 'trait_import' => 'none', - 'case' => 'none' + 'case' => 'none' ] ], - 'blank_line_before_statement' => [ + 'blank_line_before_statement' => [ 'statements' => [ 'declare', 'exit', @@ -48,7 +49,8 @@ 'try' ] ], - 'no_extra_blank_lines' => [ + 'no_unused_imports' => true, + 'no_extra_blank_lines' => [ 'tokens' => [ 'attribute', 'break', @@ -65,20 +67,29 @@ 'throw' ] ], - 'statement_indentation' => ['stick_comment_to_next_continuous_control_statement' => true], + 'ordered_imports' => [ + 'imports_order' => ['class', 'function', 'const'], + 'sort_algorithm' => 'alpha' + ], + 'single_import_per_statement' => [ + 'group_to_single_imports' => true + ], + 'statement_indentation' => ['stick_comment_to_next_continuous_control_statement' => true], // Comments - 'multiline_comment_opening_closing' => true, - 'no_empty_comment' => true, - 'single_line_comment_spacing' => true, - 'single_line_comment_style' => true, - 'align_multiline_comment' => ['comment_type' => 'phpdocs_like'], + 'multiline_comment_opening_closing' => true, + 'no_empty_comment' => true, + 'single_line_comment_spacing' => true, + 'single_line_comment_style' => true, + 'align_multiline_comment' => ['comment_type' => 'phpdocs_like'], // PHPDoc - 'no_blank_lines_after_phpdoc' => true, - 'no_empty_phpdoc' => true, - 'phpdoc_add_missing_param_annotation' => true, - 'phpdoc_align' => [ + 'no_blank_lines_after_phpdoc' => true, + 'no_empty_phpdoc' => true, + 'phpdoc_add_missing_param_annotation' => [ + 'only_untyped' => false, + ], + 'phpdoc_align' => [ 'align' => 'vertical', - 'tags' => [ + 'tags' => [ 'method', 'param', 'property', @@ -107,20 +118,21 @@ 'psalm-method' ] ], - 'phpdoc_annotation_without_dot' => true, - 'phpdoc_indent' => true, - 'phpdoc_inline_tag_normalizer' => true, - 'phpdoc_line_span' => ['property' => 'single', 'const' => 'single', 'method' => 'multi'], - 'phpdoc_no_access' => true, - 'phpdoc_no_alias_tag' => true, - 'phpdoc_no_empty_return' => true, - 'phpdoc_no_package' => true, - 'phpdoc_no_useless_inheritdoc' => true, - 'phpdoc_order' => ['order' => ['param', 'return', 'throws']], - 'phpdoc_param_order' => true, - 'phpdoc_return_self_reference' => true, - 'phpdoc_scalar' => true, - 'phpdoc_separation' => [ + 'phpdoc_annotation_without_dot' => true, + 'phpdoc_indent' => true, + 'phpdoc_inline_tag_normalizer' => true, + 'phpdoc_line_span' => ['property' => 'single', 'const' => 'single', 'method' => 'multi'], + 'phpdoc_no_access' => true, + 'phpdoc_no_alias_tag' => true, + 'phpdoc_no_duplicate_types' => true, + 'phpdoc_no_empty_return' => true, + 'phpdoc_no_package' => true, + 'phpdoc_no_useless_inheritdoc' => true, + 'phpdoc_order' => ['order' => ['param', 'return', 'throws']], + 'phpdoc_param_order' => true, + 'phpdoc_return_self_reference' => true, + 'phpdoc_scalar' => true, + 'phpdoc_separation' => [ 'groups' => [ ['author', 'copyright', 'license'], ['category', 'package', 'subpackage'], @@ -129,17 +141,26 @@ ['psalm-suppress', 'phpstan-ignore'] ], ], - 'phpdoc_single_line_var_spacing' => true, - 'phpdoc_summary' => true, - 'phpdoc_tag_type' => true, - 'phpdoc_to_comment' => ['ignored_tags' => ['phpstan-ignore', 'psalm-suppress']], + 'phpdoc_single_line_var_spacing' => true, + 'phpdoc_summary' => true, + 'phpdoc_tag_casing' => true, + 'phpdoc_tag_type' => true, + 'phpdoc_to_comment' => ['ignored_tags' => ['phpstan-ignore', 'psalm-suppress']], 'phpdoc_trim_consecutive_blank_line_separation' => true, - 'phpdoc_trim' => true, - 'phpdoc_types' => true, - 'phpdoc_types_order' => true, - 'phpdoc_var_annotation_correct_order' => true, - 'phpdoc_var_without_name' => true, - 'header_comment' => ['header' => $headerText] + 'phpdoc_trim' => true, + 'phpdoc_types' => true, + 'phpdoc_types_order' => true, + 'phpdoc_var_annotation_correct_order' => true, + 'phpdoc_var_without_name' => true, + // Risky + /* + '@PHP8x2Migration:risky' => true, + 'phpdoc_to_param_type' =>true, + 'phpdoc_to_property_type' =>true, + 'phpdoc_to_return_type' => true, + */ + // Header + 'header_comment' => ['header' => $headerText] ]; $finder = PhpCsFixer\Finder::create()->in(__DIR__ . '/src')->in(__DIR__ . '/tests'); diff --git a/.phpcs.xml.dist b/.phpcs.xml.dist index 2e55bc4..7fb292c 100644 --- a/.phpcs.xml.dist +++ b/.phpcs.xml.dist @@ -76,11 +76,6 @@ - - - - - + - + @@ -31,7 +32,7 @@ - + diff --git a/src/Monolog/EasyGoingLogger.php b/src/Monolog/EasyGoingLogger.php index 42f392e..8d51ed4 100644 --- a/src/Monolog/EasyGoingLogger.php +++ b/src/Monolog/EasyGoingLogger.php @@ -20,11 +20,11 @@ class EasyGoingLogger { - private const LOGGER_DEFAULT = 'Monolog\Logger'; + private const string LOGGER_DEFAULT = 'Monolog\Logger'; - private const LOGGER_CONSOLE = 'Monolog\ConsoleLogger'; + private const string LOGGER_CONSOLE = 'Monolog\ConsoleLogger'; - private const LOGGER_NULL = 'Psr\Log\NullLogger'; + private const string LOGGER_NULL = 'Psr\Log\NullLogger'; private function __construct() { @@ -32,13 +32,11 @@ private function __construct() } /** - * @param string $name - * @param string $level - * @param array $handlers - * @param array $processors - * @param null|DateTimeZone $timezone - * - * @return LoggerInterface + * @param string $name + * @param string $level + * @param array $handlers + * @param array $processors + * @param ?DateTimeZone $timezone * * @psalm-suppress InvalidNullableReturnType */ diff --git a/src/PHPUnit/Framework/ConstantCheckTestCase.php b/src/PHPUnit/Framework/ConstantCheckTestCase.php index f91d7c4..64d0dde 100644 --- a/src/PHPUnit/Framework/ConstantCheckTestCase.php +++ b/src/PHPUnit/Framework/ConstantCheckTestCase.php @@ -40,7 +40,7 @@ abstract class ConstantCheckTestCase extends EasyGoingTestCase */ private static int $expectedConstsCount = self::INIT_CONST_COUNT; - /** @var array Array of the names of all constants in the class. */ + /** @var array Array of the names of all constants in the class. */ private static array $actualConsts = []; private static LoggerInterface $logger; @@ -48,9 +48,6 @@ abstract class ConstantCheckTestCase extends EasyGoingTestCase /** * Inits the constants crosscheck. * - * @param bool $withConstCrossCheck - * @param int $expectedConstsCount - * * @see ConstantCheckTestCase::$withConstCrossCheck * @see ConstantCheckTestCase::$expectedConstsCount */ @@ -100,8 +97,8 @@ public static function isWithConstCrossCheck(): bool /** * Executes the constant crosscheck and fails if a constant is not found or not expected to exist. * - * @param mixed $clazz the clazz having the constants to check - * @param array $actualConsts an array of the already found constants + * @param mixed $clazz the clazz having the constants to check + * @param array $actualConsts an array of the already found constants * * @see ConstantCheckTestCase::$withConstCrossCheck */ @@ -115,11 +112,7 @@ protected static function crossCheckConstants(mixed $clazz, array $actualConsts) ksort($expected); $expected = array_keys($expected); - $callback = /** - * @param mixed $value - * - * @return string - */ + $callback = function (mixed $value): string { $res = ''; if (is_string($value) && str_contains($value, self::C_STATIC_SEP)) { @@ -137,7 +130,6 @@ function (mixed $value): string { }; self::$logger->info(' * Remove clazz prefix'); - /** @var string[] */ $actual = array_map($callback, $actualConsts); self::$logger->info(' * Flip constants'); $actual = array_flip($actual); @@ -165,7 +157,7 @@ function (mixed $value): string { /** * Adds an array of constants which have been found. * - * @param null|array $checkedConsts array of found constants + * @param null|array $checkedConsts array of found constants * * @see ConstantCheckTestCase::$withConstCrossCheck */ @@ -179,8 +171,8 @@ protected static function updateActualConsts(?array $checkedConsts): void /** * Checks, if {@link $allDefinedConsts) has the size of {@link $expectedCount}. * - * @param int $expectedCount count of constants which must exists - * @param array $allDefinedConsts an array with all defined constants + * @param int $expectedCount count of constants which must exists + * @param array $allDefinedConsts an array with all defined constants * * @return array [true|false, count($allDefinedConsts)] * @@ -231,7 +223,7 @@ public function testAllConstants(): void * Checks, if all constants exists. * ['CONST1','CONST2',...]. * - * @param array $constants an array with constants to check + * @param array $constants an array with constants to check */ protected function verifyConstAllExists(array $constants = []): void { @@ -248,7 +240,7 @@ protected function verifyConstAllExists(array $constants = []): void * Checks, if all constants exists are arrays and have the expected size. * ['CONST1'=>3,'CONST2'=>10,...]. * - * @param array $constants an array with constants and expected sizes to check + * @param array $constants an array with constants and expected sizes to check */ protected function verifyConstArrayAllExists(array $constants = []): void { diff --git a/src/PHPUnit/Framework/EasyGoingTestCase.php b/src/PHPUnit/Framework/EasyGoingTestCase.php index e8a9ff2..7b53caa 100644 --- a/src/PHPUnit/Framework/EasyGoingTestCase.php +++ b/src/PHPUnit/Framework/EasyGoingTestCase.php @@ -26,18 +26,18 @@ abstract class EasyGoingTestCase extends TestCase private static LoggerInterface $logger; - /** @var The object which will be tested. */ + /** @var mixed The object which will be tested. */ protected mixed $o2t; /** - * @return object new created instance + * @return mixed new created instance */ - abstract protected static function prepareO2t(): object; + abstract protected static function prepareO2t(): mixed; /** - * @return object current instance + * @return mixed current instance */ - abstract protected function getCasto2t(): object; + abstract protected function getCasto2t(): mixed; #[\Override] public static function setUpBeforeClass(): void @@ -84,11 +84,6 @@ protected static function get_called_clazz(): string return $calledClazz; } - /** - * @param mixed $var - * - * @return bool - */ protected static function isPrimitive(mixed $var): bool { $primitive = false; @@ -101,23 +96,17 @@ protected static function isPrimitive(mixed $var): bool } /** - * @param mixed $clazz + * @param mixed $clazzName * - * @return mixed[] + * @return array */ - protected static function getAllDefinedConsts(mixed $clazz): array + protected static function getAllDefinedConsts(mixed $clazzName): array { - $clazz = new \ReflectionClass($clazz); + $instance = new \ReflectionClass($clazzName); - return $clazz->getConstants(); // NOSONAR php:S3011 + return $instance->getConstants(); // NOSONAR php:S3011 } - /** - * @param mixed $clazz - * @param string $constantName - * - * @return bool - */ protected static function isConstExist(mixed $clazz, string $constantName): bool { self::$logger->debug('START'); @@ -156,12 +145,6 @@ public function testInit(): void // Misc functions - /** - * @param mixed $clazz - * @param string $constantName - * - * @return mixed - */ protected static function getConstValue(mixed $clazz, string $constantName): mixed { self::$logger->debug('START'); @@ -184,11 +167,6 @@ protected static function getConstValue(mixed $clazz, string $constantName): mix return $constantValue; } - /** - * @param string $constantName - * - * @SuppressWarnings("PHPMD.ElseExpression") - */ protected function verifyConstExists(string $constantName): void { self::$logger->debug('START'); diff --git a/src/Tools/Batch/BatchTaskHelper.php b/src/Tools/Batch/BatchTaskHelper.php index aab318b..ec4609c 100644 --- a/src/Tools/Batch/BatchTaskHelper.php +++ b/src/Tools/Batch/BatchTaskHelper.php @@ -20,10 +20,10 @@ class BatchTaskHelper { /** Default key for a tasklist. */ - public const DEFAULT = 'DEFAULT'; + public const string DEFAULT = 'DEFAULT'; - /** @var \Ds\Map */ - private static ?\Ds\Map $tasklists = null; + /** @var Map */ + private static ?Map $tasklists = null; private static ?LoggerInterface $logger = null; @@ -34,65 +34,72 @@ private function __construct() public static function init(): void { - /** - * @psalm-suppress DocblockTypeContradiction - * @phpstan-ignore function.impossibleType - */ if (is_null(self::$logger)) { self::$logger = EasyGoingLogger::init(BatchTaskHelper::class); } - /** - * @psalm-suppress DocblockTypeContradiction - * @phpstan-ignore function.impossibleType - */ if (is_null(self::$tasklists)) { self::$tasklists = new Map(); } } /** - * @param null|string $listKey + * @return LoggerInterface * - * @return TaskList + * @psalm-suppress InvalidNullableReturnType */ - public static function getTaskList(?string $listKey): TaskList + private static function logger(): LoggerInterface { - self::init(); + /** + * @psalm-suppress NullableReturnStatement + * @phpstan-ignore return.type + */ + return self::$logger; + } + + /** + * @return Map + * + * @psalm-suppress InvalidNullableReturnType + */ + private static function taskLists(): Map + { + /** + * @psalm-suppress NullableReturnStatement + * @phpstan-ignore return.type + */ + return self::$tasklists; + } - self::$logger->debug('START - listKey', [$listKey]); + public static function getTaskList(string $listKey = self::DEFAULT): TaskList + { + self::init(); + self::logger()->debug('START - listKey', [$listKey]); - $listKey ??= self::DEFAULT; - if (!self::$tasklists->hasKey($listKey)) { - self::$tasklists->put($listKey, new TaskList($listKey)); + $listKey = empty($listKey) ? self::DEFAULT : $listKey; + if (!self::taskLists()->hasKey($listKey)) { + self::taskLists()->put($listKey, new TaskList($listKey)); } - self::$logger->debug('END'); + self::logger()->debug('END'); - return self::$tasklists->get($listKey); + return self::taskLists()->get($listKey); } - /** - * @param string $fileName - * @param null|string $listKey - * - * @return TaskList - */ - public static function readTaskList(string $fileName, ?string $listKey): TaskList + public static function readTaskList(string $fileName, string $listKey = self::DEFAULT): TaskList { self::init(); + self::logger()->debug('START - listKey,fileName', [$listKey, $fileName]); - self::$logger->debug('START - listKey,fileName', [$listKey, $fileName]); - - $listKey ??= self::DEFAULT; + $listKey = empty($listKey) ? self::DEFAULT : $listKey; if (file_exists($fileName)) { $taskList = self::getTaskList($listKey); $taskList->readFile($fileName); } else { - self::$logger->warning('File does not exists!', [$fileName]); + self::logger()->warning('File does not exists!', [$fileName]); $taskList = self::getTaskList($listKey); } - self::$logger->debug('END'); + self::logger()->debug('END'); return $taskList; } diff --git a/src/Tools/Batch/ITaskItem.php b/src/Tools/Batch/ITaskItem.php index 9743443..cf5816d 100644 --- a/src/Tools/Batch/ITaskItem.php +++ b/src/Tools/Batch/ITaskItem.php @@ -20,21 +20,14 @@ interface ITaskItem { /** - * @return mixed - * * @phpstan-return TaskKey */ public function getKey(): mixed; /** - * @return array - * * @phpstan-return TaskData */ public function getData(): array; - /** - * @return string - */ public function __toString(): string; } diff --git a/src/Tools/Batch/TaskItem.php b/src/Tools/Batch/TaskItem.php index 1c250e7..d1e4e07 100644 --- a/src/Tools/Batch/TaskItem.php +++ b/src/Tools/Batch/TaskItem.php @@ -30,8 +30,8 @@ class TaskItem implements ITaskItem private array $data; /** - * @param mixed $key - * @param array $data + * @param mixed $key + * @param array $data * * @phpstan-param TaskKey $key * @phpstan-param TaskData $data @@ -42,18 +42,12 @@ public function __construct(mixed $key, array $data) $this->data = $data; } - /** - * @inheritDoc - */ #[\Override] public function getKey(): mixed { return $this->key; } - /** - * @inheritDoc - */ #[\Override] public function getData(): array { diff --git a/src/Tools/Batch/TaskList.php b/src/Tools/Batch/TaskList.php index 493d811..d0824ab 100644 --- a/src/Tools/Batch/TaskList.php +++ b/src/Tools/Batch/TaskList.php @@ -19,10 +19,8 @@ class TaskList { - /** @var LoggerInterface */ private static LoggerInterface $logger; - /** @var string */ private string $listKey; /** @var Queue */ @@ -45,9 +43,6 @@ public function addTask(ITaskItem $task): void $this->tasks->push($task); } - /** - * @return null|ITaskItem - */ public function nextTask(): ?ITaskItem { $task = null; @@ -68,11 +63,6 @@ public function isEmpty(): bool return $this->tasks->isEmpty(); } - /** - * @param string $fileName - * - * @return bool - */ public function readFile(string $fileName): bool { self::$logger->debug('START - fileName', [$fileName]); @@ -86,7 +76,6 @@ public function readFile(string $fileName): bool while ($line = fgets($fHandle, 1000)) { $convertedLine = mb_convert_encoding($line, 'UTF-8'); $itemKey = $this->listKey . $idx; - /** @var null|ITaskItem $newTask */ $newTask = $this->parseTaskData($itemKey, $convertedLine); if (!is_null($newTask)) { $this->addTask($newTask); @@ -102,17 +91,10 @@ public function readFile(string $fileName): bool return $fileRead; } - /** - * @param mixed $itemKey - * @param mixed $convertedLine - * - * @return null|ITaskItem - */ protected function parseTaskData(mixed $itemKey, mixed $convertedLine): ?ITaskItem { self::$logger->debug('START - itemKey', [$itemKey]); - /** @var null|ITaskItem $newTask */ $newTask = null; if (is_string($convertedLine)) { $newLine = preg_filter("/(\r|\n|\r\n)/", '', $convertedLine); @@ -128,11 +110,6 @@ protected function parseTaskData(mixed $itemKey, mixed $convertedLine): ?ITaskIt return $newTask; } - /** - * @param string $fileName - * - * @return bool - */ public function storeFile(string $fileName): bool { self::$logger->debug('START - fileName', [$fileName]); @@ -147,8 +124,12 @@ public function storeFile(string $fileName): bool if ($line instanceof ITaskItem) { $line = $line->__toString(); } - $convertedLine = mb_convert_encoding($line, 'UTF-8') . "\n"; - fwrite($fHandle, $convertedLine); + $convertedLine = mb_convert_encoding($line, 'UTF-8'); + /** @phpstan-ignore notIdentical.alwaysTrue */ + if ($convertedLine !== false) { + $convertedLine .= "\n"; + fwrite($fHandle, $convertedLine); + } } fclose($fHandle); $fileStored = true; diff --git a/src/Tools/Emergency.php b/src/Tools/Emergency.php index 880cc12..7d2d2e3 100644 --- a/src/Tools/Emergency.php +++ b/src/Tools/Emergency.php @@ -19,13 +19,13 @@ class Emergency { /** Default message */ - public const MSG_DEFAULT = 'Undefined reason to stop now!'; + public const string MSG_DEFAULT = 'Undefined reason to stop now!'; /** Default code */ - public const ERR_CODE_DEFAULT = 1; + public const int ERR_CODE_DEFAULT = 1; /** Maximum code which is allowed. */ - private const ERR_CODE_MAX = 254; + private const int ERR_CODE_MAX = 254; /** * Immediately stopping the application caused by an exception. As a hmomage to "Knight Rider". diff --git a/src/Tools/EnvironmentVariableTrait.php b/src/Tools/EnvironmentVariableTrait.php index 9f4c544..5be09e4 100644 --- a/src/Tools/EnvironmentVariableTrait.php +++ b/src/Tools/EnvironmentVariableTrait.php @@ -20,11 +20,6 @@ */ trait EnvironmentVariableTrait { - /** - * @param string $homeVariable - * - * @return string - */ final public static function getHome(string $homeVariable = 'HOME'): string { $home = getenv($homeVariable); @@ -40,9 +35,6 @@ final public static function getHome(string $homeVariable = 'HOME'): string return $home; } - /** - * @return string - */ final public static function getProjectRoot(): string { $projectRoot = self::getComposerFilePath(); @@ -53,9 +45,6 @@ final public static function getProjectRoot(): string return (string)realpath($projectRoot); } - /** - * @return string - */ private static function getComposerFilePath(): string { $composerFile = Factory::getComposerFile(); @@ -67,11 +56,6 @@ private static function getComposerFilePath(): string return $composerPath; } - /** - * @param int $folderOffset - * - * @return string - */ private static function getProjectRootFallback(int $folderOffset = 2): string { $rootClazz = new \ReflectionClass(EnvironmentVariableTrait::class); diff --git a/src/Tools/Reflection/ChildClazzesHelper.php b/src/Tools/Reflection/ChildClazzesHelper.php index ec83aba..21e1ceb 100644 --- a/src/Tools/Reflection/ChildClazzesHelper.php +++ b/src/Tools/Reflection/ChildClazzesHelper.php @@ -13,7 +13,7 @@ namespace ollily\Tools\Reflection; -final class ChildClazzesHelper +class ChildClazzesHelper { private function __construct() { diff --git a/src/Tools/Reflection/UnavailableFieldsTrait.php b/src/Tools/Reflection/UnavailableFieldsTrait.php index 62cbb06..fa17bcf 100644 --- a/src/Tools/Reflection/UnavailableFieldsTrait.php +++ b/src/Tools/Reflection/UnavailableFieldsTrait.php @@ -17,13 +17,6 @@ trait UnavailableFieldsTrait { - /** - * @param mixed $clazzName - * @param string $fieldName - * @param mixed $instance - * - * @return null|mixed - */ protected function getFieldByReflection(mixed $clazzName, string $fieldName, mixed $instance): mixed { $result = null; @@ -37,12 +30,6 @@ protected function getFieldByReflection(mixed $clazzName, string $fieldName, mix return $result; } - /** - * @param mixed $clazzName - * @param string $fieldName - * @param mixed $instance - * @param null|mixed $newValue - */ protected function setFieldByReflection(mixed $clazzName, string $fieldName, mixed $instance, mixed $newValue): void { if (!empty($clazzName)) { @@ -53,17 +40,12 @@ protected function setFieldByReflection(mixed $clazzName, string $fieldName, mix } } - /** - * @param string $fieldName - * - * @return null|mixed - */ protected function getFieldFromO2t(string $fieldName): mixed { $result = null; /** - * @psalm-suppress RedundantPropertyInitializationCheck + * @psalm-suppress RedundantPropertyInitializationCheck,UndefinedThisPropertyFetch * @phpstan-ignore isset.property,property.notFound */ if (isset($this->o2t)) { diff --git a/src/Tools/Reflection/UnavailableMethodsTrait.php b/src/Tools/Reflection/UnavailableMethodsTrait.php index 16e70d1..6db52ab 100644 --- a/src/Tools/Reflection/UnavailableMethodsTrait.php +++ b/src/Tools/Reflection/UnavailableMethodsTrait.php @@ -23,8 +23,6 @@ trait UnavailableMethodsTrait * @param mixed $clazzName * @param string $methodName * @param mixed $instance - * - * @return null|mixed */ protected function callMethodByReflection(mixed $clazzName, string $methodName, mixed $instance): mixed { @@ -43,15 +41,13 @@ protected function callMethodByReflection(mixed $clazzName, string $methodName, * Calls a hidden method on an object which shall be tested (o2t). * * @param string $methodName - * - * @return null|mixed */ protected function callMethodOnO2t(string $methodName): mixed { $result = null; /** - * @psalm-suppress RedundantPropertyInitializationCheck + * @psalm-suppress RedundantPropertyInitializationCheck,UndefinedThisPropertyFetch * @phpstan-ignore isset.property,property.notFound */ if (isset($this->o2t)) { diff --git a/src/Tools/String/ToStringTrait.php b/src/Tools/String/ToStringTrait.php index 41baf2c..aa9fb7d 100644 --- a/src/Tools/String/ToStringTrait.php +++ b/src/Tools/String/ToStringTrait.php @@ -22,9 +22,6 @@ trait ToStringTrait */ abstract protected function __toStringValues(): mixed; // NOSONAR: php:S100 - /** - * @inheritdoc - */ public function __toString(): string { $value = $this->__toStringValues(); @@ -41,9 +38,9 @@ public function __toString(): string $toString = sprintf('%s:[%s]', get_class($this), self::implode_recursive(',', $value)); } elseif (is_object($value)) { if ($this == $value) { - $toString = sprintf('{%s}', var_export($value, true)); + $toString = sprintf('{%s}', print_r($value, true)); } else { - $toString = sprintf('%s:{%s}', get_class($this), var_export($value, true)); + $toString = sprintf('%s:{%s}', get_class($this), print_r($value, true)); } } else { $toString = sprintf('%s', get_class($this)); @@ -52,9 +49,6 @@ public function __toString(): string return $toString; } - /** - * @inheritdoc - */ public function __wakeup(): void { throw new \BadMethodCallException("Cannot unserialize singleton"); diff --git a/src/Tools/Test/TestData.php b/src/Tools/Test/TestData.php index e9d3865..c90d8bd 100644 --- a/src/Tools/Test/TestData.php +++ b/src/Tools/Test/TestData.php @@ -89,6 +89,10 @@ class TestData public const string KEY_ALPHA3 = 'KEY-ALPHA3'; + public const ?object KEY_NULL = null; + + public const string KEY_EMPTY = ''; + // Arrays complete public const array ARRAY_EMPTY = []; @@ -156,21 +160,21 @@ class TestData /** * @see self::C_ARRAY_OBJECT1() * - * @var array + * @var array */ private static array $ARRAY_OBJECT1 = []; // NOSONAR: php:S100 /** * @see self::C_ARRAY_OBJECT2() * - * @var array + * @var array */ private static array $ARRAY_OBJECT2 = []; // NOSONAR: php:S100 /** * @see self::C_ARRAY_OBJECT3() * - * @var array + * @var array */ private static array $ARRAY_OBJECT3 = []; // NOSONAR: php:S100 @@ -220,7 +224,7 @@ public static function DATA_OBJECT1(): TestDataFoo // NOSONAR: php:S100 } /** - * @return array + * @return array */ public static function ARRAY_OBJECT1(): array // NOSONAR: php:S100 { @@ -232,7 +236,7 @@ public static function ARRAY_OBJECT1(): array // NOSONAR: php:S100 } /** - * @return array + * @return array */ public static function ARRAY_OBJECT2(): array // NOSONAR: php:S100 { @@ -247,7 +251,7 @@ public static function ARRAY_OBJECT2(): array // NOSONAR: php:S100 } /** - * @return array + * @return array */ public static function ARRAY_OBJECT3(): array // NOSONAR: php:S100 { @@ -278,7 +282,12 @@ private function __construct() */ public static function prepareTempFile(string $prefix = self::FILE_FILENAME_PREFIX): string { - return tempnam(sys_get_temp_dir(), $prefix); + $tmpFile = tempnam(sys_get_temp_dir(), $prefix); + if ($tmpFile == false) { + $tmpFile = ''; + } + + return $tmpFile; } /** @@ -287,7 +296,7 @@ public static function prepareTempFile(string $prefix = self::FILE_FILENAME_PREF public static function cleanupTempFile(?string $fileName): void { try { - if (!empty($fileName) && file_exists($fileName)) { + if (!is_null($fileName) && !empty($fileName) && file_exists($fileName)) { unlink($fileName); } } catch (\Throwable $ex) { diff --git a/src/Tools/Test/TestDataFoo.php b/src/Tools/Test/TestDataFoo.php index c9f7f53..7b59392 100644 --- a/src/Tools/Test/TestDataFoo.php +++ b/src/Tools/Test/TestDataFoo.php @@ -15,33 +15,25 @@ use ollily\Tools\String\ToStringTrait; +/** + * A simple object usable as test object. + */ class TestDataFoo { use ToStringTrait; private mixed $fooValue; - /** - * @param null|mixed $fooValue - * - * @return TestDataFoo - */ public static function init(mixed $fooValue = null): TestDataFoo { return new TestDataFoo($fooValue); } - /** - * @param null|mixed $fooValue - */ public function __construct(mixed $fooValue = null) { $this->fooValue = $fooValue; } - /** - * @return mixed - */ #[\Override] protected function __toStringValues(): mixed { diff --git a/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseClazz.php b/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseClazz.php index 29fe161..a1b9de0 100644 --- a/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseClazz.php +++ b/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseClazz.php @@ -35,18 +35,12 @@ public static function tearDownAfterClass(): void // Deactivate the check, will be called manually in testcase } - /** - * @inheritDoc - */ #[\Override] protected static function prepareO2t(): ConstantCheckTestCaseDummyClazz { return new ConstantCheckTestCaseDummyClazz(); } - /** - * @inheritDoc - */ #[\Override] protected function getCasto2t(): ConstantCheckTestCaseDummyClazz { @@ -55,26 +49,45 @@ protected function getCasto2t(): ConstantCheckTestCaseDummyClazz // Override the visibility for the test cases + /** + * @param mixed $clazz + * @param array $actualConstants + */ public static function publicCrossCheckConstants(mixed $clazz, array $actualConstants): void { parent::crossCheckConstants($clazz, $actualConstants); } + /** + * @param null|array $checkedConsts + */ public static function publicUpdateActualConsts(?array $checkedConsts): void { parent::updateActualConsts($checkedConsts); } + /** + * @param int $expectedCount + * @param array $allDefinedConsts + * + * @return array + */ public static function publicCheckConstantsCount(int $expectedCount, array $allDefinedConsts): array { return parent::checkConstantsCount($expectedCount, $allDefinedConsts); } + /** + * @param array $constants + */ public function publicVerifyConstAllExists(array $constants = []): void { parent::verifyConstAllExists($constants); } + /** + * @param array $constants + */ public function publicVerifyConstArrayAllExists(array $constants = []): void { parent::verifyConstArrayAllExists($constants); @@ -100,6 +113,9 @@ public function testConsts(): void // Misc functions + /** + * @return array + */ public static function prepareAllConsts(): array { return [ diff --git a/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseDummyClazz.php b/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseDummyClazz.php index 6c57e24..5ce1a55 100644 --- a/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseDummyClazz.php +++ b/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseDummyClazz.php @@ -20,15 +20,15 @@ */ class ConstantCheckTestCaseDummyClazz { - public const TEST_CLAZZ = self::class . '::'; + public const string TEST_CLAZZ = self::class . '::'; - public const TEST_CONST_PREFIX = self::TEST_CLAZZ . 'TEST_CONST'; + public const string TEST_CONST_PREFIX = self::TEST_CLAZZ . 'TEST_CONST'; - public const TEST_CONST_ARRAY = ['one', 'two']; + public const array TEST_CONST_ARRAY = ['one', 'two']; - public const TEST_CONST_PUBLIC = 'public'; + public const string TEST_CONST_PUBLIC = 'public'; - protected const TEST_CONST_PROTECTED = 'protected'; + protected const string TEST_CONST_PROTECTED = 'protected'; - private const TEST_CONST_PRIVATE = 'private'; + private const string TEST_CONST_PRIVATE = 'private'; } diff --git a/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseTest.php b/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseTest.php index 7a6d76a..98e402d 100644 --- a/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseTest.php +++ b/tests/PHPUnit/Framework/ConstantCheckTestCaseTest/ConstantCheckTestCaseTest.php @@ -32,15 +32,15 @@ class ConstantCheckTestCaseTest extends TestCase use UnavailableMethodsTrait; use UnavailableFieldsTrait; - private const TEST_CONST_PREFIX_NAME = 'TEST_CONST_PREFIX'; + private const string TEST_CONST_PREFIX_NAME = 'TEST_CONST_PREFIX'; - private const TEST_CONST_ARRAY_NAME = 'TEST_CONST_ARRAY'; + private const string TEST_CONST_ARRAY_NAME = 'TEST_CONST_ARRAY'; - private const TEST_CONST_ARRAY_SIZE = 2; + private const int TEST_CONST_ARRAY_SIZE = 2; - private const WRONG_CONST = 'WRONG_CONST'; + private const string WRONG_CONST = 'WRONG_CONST'; - private const WRONG_CONST_SIZE = 1; + private const int WRONG_CONST_SIZE = 1; protected ConstantCheckTestCaseClazz $o2t; @@ -53,8 +53,6 @@ public static function setUpBeforeClass(): void self::$logger->debug('START'); parent::setUpBeforeClass(); - // function must be called manually - $sO2t = self::prepareO2t(); self::$logger->debug('END'); } @@ -73,6 +71,9 @@ protected static function prepareO2t(): ConstantCheckTestCaseClazz return new ConstantCheckTestCaseClazz(ConstantCheckTestCaseClazz::class); } + /** + * @return array + */ protected static function prepareAllConsts(): array { return ConstantCheckTestCaseClazz::prepareAllConsts(); @@ -87,7 +88,7 @@ public function setUp(): void $this->o2t = self::prepareO2t(); // Must be called manually - $this->o2t->setUpBeforeClass(); + $this->o2t::setUpBeforeClass(); $this->o2t->setUp(); self::$logger->debug('END'); @@ -153,9 +154,6 @@ public function testIsWithConstCrossCheck(): void } /** - * @param bool $success - * @param bool $crossCheckActive - * @param string $clazz * @param array $actualConstants */ #[DataProvider('providerCrossCheck')] @@ -184,17 +182,15 @@ public function testCrossCheckConstants(bool $success, bool $crossCheckActive, s public function testUpdateActualConsts(): void { - $this->o2t->setUpBeforeClass(true); + $this->o2t::setUpBeforeClass(true); $checkedConsts = TestData::ARRAY_ALPHA5; - /** @var array */ $before = $this->getFieldByReflection(ConstantCheckTestCase::class, 'actualConsts', $this->o2t); $expected = count($before) + count($checkedConsts); $this->o2t::publicUpdateActualConsts($checkedConsts); - /** @var array */ $actual = $this->getFieldByReflection(ConstantCheckTestCase::class, 'actualConsts', $this->o2t); self::assertCount($expected, $actual); @@ -215,7 +211,6 @@ public function testCheckConstantsCountDisabled(): void } /** - * @param bool $success * @param array $constants */ #[DataProvider('providerConstants')] @@ -237,7 +232,6 @@ public function testVerifyConstAllExists(bool $success, array $constants): void } /** - * @param bool $success * @param array $constants */ #[DataProvider('providerConstantsArray')] @@ -258,11 +252,6 @@ public function testVerifyConstArrayAllExists(bool $success, array $constants): $this->verifyConstantsTestResult($success, $exception, [$success, $constants]); } - /** - * @param bool $success - * @param string $constantName - * @param int $expectedSize - */ #[DataProvider('providerConstantName')] public function testVerifyConstArraySize(bool $success, string $constantName, int $expectedSize): void { @@ -350,7 +339,7 @@ public static function providerCrossCheck(): array /** * @param bool $success - * @param null|\Exception $exception + * @param ?\Exception $exception * @param array $extraData */ protected function verifyConstantsTestResult(bool $success, ?\Exception $exception, array $extraData): void diff --git a/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseClazz.php b/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseClazz.php index ac927ec..a5d0496 100644 --- a/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseClazz.php +++ b/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseClazz.php @@ -24,7 +24,7 @@ */ class EasyGoingTestCaseClazz extends EasyGoingTestCase // NOSONAR: php:S3360 { - public const C_TEST = 1; + public const int C_TEST = 1; #[\Override] public static function tearDownAfterClass(): void @@ -32,18 +32,12 @@ public static function tearDownAfterClass(): void // Deactivate the check, will be called manually in testcase } - /** - * @inheritDoc - */ #[\Override] protected static function prepareO2t(): EasyGoingTestCaseDummyClazz { return new EasyGoingTestCaseDummyClazz(); } - /** - * @inheritDoc - */ #[\Override] protected function getCasto2t(): EasyGoingTestCaseDummyClazz { @@ -52,41 +46,21 @@ protected function getCasto2t(): EasyGoingTestCaseDummyClazz // Override the visibility for the test cases - /** - * @param mixed $clazz - * @param string $constantName - * - * @return bool - */ public static function publicIsConstExist(mixed $clazz, string $constantName): bool { return parent::isConstExist($clazz, $constantName); } - /** - * @param mixed $clazz - * @param string $constantName - * - * @return mixed - */ public static function publicGetConstValue(mixed $clazz, string $constantName): mixed { return parent::getConstValue($clazz, $constantName); } - /** - * @param mixed $var - * - * @return bool - */ public static function publicIsPrimitive(mixed $var): bool { return parent::isPrimitive($var); } - /** - * @return string - */ public static function publicGet_called_clazz(): string { return parent::get_called_clazz(); @@ -102,25 +76,16 @@ public static function publicGetAllDefinedConsts(string $clazz): array return parent::getAllDefinedConsts($clazz); } - /** - * @param string $constantName - */ public function publicVerifyConstExists(string $constantName): void { parent::verifyConstExists($constantName); } - /** - * @return string - */ public function publicGet_called_function(): string { return parent::get_called_function(); } - /** - * @return EasyGoingTestCaseDummyClazz - */ public function publicGetCastO2t(): EasyGoingTestCaseDummyClazz { return $this->getCasto2t(); diff --git a/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseDummyClazz.php b/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseDummyClazz.php index ead8886..2d502a6 100644 --- a/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseDummyClazz.php +++ b/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseDummyClazz.php @@ -20,15 +20,15 @@ */ class EasyGoingTestCaseDummyClazz { - public const TEST_CLAZZ = self::class . '::'; + public const string TEST_CLAZZ = self::class . '::'; - public const TEST_CONST_PREFIX = self::TEST_CLAZZ . 'TEST_CONST'; + public const string TEST_CONST_PREFIX = self::TEST_CLAZZ . 'TEST_CONST'; - public const TEST_CONST_ARRAY = ['one', 'two']; + public const array TEST_CONST_ARRAY = ['one', 'two']; - public const TEST_CONST_PUBLIC = 'public'; + public const string TEST_CONST_PUBLIC = 'public'; - protected const TEST_CONST_PROTECTED = 'protected'; + protected const string TEST_CONST_PROTECTED = 'protected'; - private const TEST_CONST_PRIVATE = 'private'; + private const string TEST_CONST_PRIVATE = 'private'; } diff --git a/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseTest.php b/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseTest.php index 6d1a3d0..aafd03a 100644 --- a/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseTest.php +++ b/tests/PHPUnit/Framework/EasyGoingTestCaseTest/EasyGoingTestCaseTest.php @@ -30,10 +30,8 @@ class EasyGoingTestCaseTest extends TestCase use UnavailableMethodsTrait; use UnavailableFieldsTrait; - /** @var EasyGoingTestCaseClazz */ protected EasyGoingTestCaseClazz $o2t; - /** @var LoggerInterface */ private static LoggerInterface $logger; #[\Override] @@ -47,9 +45,6 @@ public static function setUpBeforeClass(): void self::$logger->debug('END'); } - /** - * @return EasyGoingTestCaseClazz - */ protected static function prepareO2t(): EasyGoingTestCaseClazz { return new EasyGoingTestCaseClazz(EasyGoingTestCaseClazz::class); @@ -115,15 +110,10 @@ public function testTestInit(): void } } - /** - * @param bool $expectedBool - * @param string $constName - * @param string $expected - */ #[DataProvider('providerConstant')] public function testIsConstExist(bool $expectedBool, string $constName, string $expected): void { - self::$logger->debug('parameters', [$expectedBool, $constName]); + self::$logger->debug('parameters', [$expectedBool, $constName, $expected]); $actual = $this->o2t::publicIsConstExist($this->o2t->publicGetCastO2t(), $constName); @@ -132,15 +122,10 @@ public function testIsConstExist(bool $expectedBool, string $constName, string $ self::assertEquals($expectedBool, $actual, sprintf("Not equals: '%s'='%s'", "$expectedBool", "$actual")); } - /** - * @param bool $expectedBool - * @param string $constName - * @param string $expected - */ #[DataProvider('providerConstant')] public function testGetConstValue(bool $expectedBool, string $constName, string $expected): void { - self::$logger->debug('parameters', [$expectedBool, $constName]); + self::$logger->debug('parameters', [$expectedBool, $constName, $expected]); $actual = $this->o2t::publicGetConstValue($this->o2t->publicGetCastO2t(), $constName); diff --git a/tests/Tools/Batch/BatchTaskHelperTest.php b/tests/Tools/Batch/BatchTaskHelperTest.php index b99998a..bd35a91 100644 --- a/tests/Tools/Batch/BatchTaskHelperTest.php +++ b/tests/Tools/Batch/BatchTaskHelperTest.php @@ -19,14 +19,8 @@ class BatchTaskHelperTest extends TestCase { - /** - * @param string $expectedKey - * @param int $expectedCount - * @param bool $expectedEmpty - * @param null|string $listKey - */ #[DataProvider('providerTaskList')] - public function testGetTaskList(string $expectedKey, int $expectedCount, bool $expectedEmpty, ?string $listKey = null): void + public function testGetTaskList(string $expectedKey, int $expectedCount, bool $expectedEmpty, string $listKey): void { $actual = BatchTaskHelper::getTaskList($listKey); @@ -36,15 +30,8 @@ public function testGetTaskList(string $expectedKey, int $expectedCount, bool $e self::assertEquals($expectedEmpty, $actual->isEmpty()); } - /** - * @param string $expectedKey - * @param int $expectedCount - * @param bool $expectedEmpty - * @param string $fileName - * @param null|string $listKey - */ #[DataProvider('providerTaskListFile')] - public function testReadTaskList(string $expectedKey, int $expectedCount, bool $expectedEmpty, string $fileName, ?string $listKey = null): void + public function testReadTaskList(string $expectedKey, int $expectedCount, bool $expectedEmpty, string $fileName, string $listKey): void { $actual = BatchTaskHelper::readTaskList($fileName, $listKey); @@ -62,7 +49,7 @@ public function testReadTaskList(string $expectedKey, int $expectedCount, bool $ public static function providerTaskList(): array { return [ - 'empty' => [BatchTaskHelper::DEFAULT, 0, true], + 'empty' => [BatchTaskHelper::DEFAULT, 0, true, TestData::KEY_EMPTY], ]; } @@ -72,7 +59,7 @@ public static function providerTaskList(): array public static function providerTaskListFile(): array { return [ - 'empty' => [BatchTaskHelper::DEFAULT, 0, true, TestData::FILE_FILENAME_EMPTY], + 'empty' => [BatchTaskHelper::DEFAULT, 0, true, TestData::FILE_FILENAME_EMPTY, TestData::KEY_EMPTY], ]; } } diff --git a/tests/Tools/Batch/TaskItemTest.php b/tests/Tools/Batch/TaskItemTest.php index fbbce2a..2c2c917 100644 --- a/tests/Tools/Batch/TaskItemTest.php +++ b/tests/Tools/Batch/TaskItemTest.php @@ -18,21 +18,17 @@ class TaskItemTest extends EasyGoingTestCase { - public const KEY = TestData::KEY_NUM1; + public const int KEY = TestData::KEY_NUM1; - public const DATA = [TestData::DATA_ALPHA1, TestData::DATA_BOOL_T]; + public const array DATA = [TestData::DATA_ALPHA1, TestData::DATA_BOOL_T]; - /** - * @return ITaskItem - */ + #[\Override] protected static function prepareO2t(): ITaskItem { return new TaskItem(self::KEY, self::DATA); } - /** - * @return ITaskItem - */ + #[\Override] protected function getCasto2t(): ITaskItem { return $this->o2t; diff --git a/tests/Tools/Batch/TaskListTest.php b/tests/Tools/Batch/TaskListTest.php index 852ed05..f11a64e 100644 --- a/tests/Tools/Batch/TaskListTest.php +++ b/tests/Tools/Batch/TaskListTest.php @@ -19,41 +19,43 @@ class TaskListTest extends EasyGoingTestCase { - /** @var string */ - public const KEY = TestData::KEY_ALPHA1; + public const string KEY = TestData::KEY_ALPHA1; - /** @var string */ - public const DATA = TestData::DATA_ALPHA1; + public const string DATA = TestData::DATA_ALPHA1; - /** @var string */ private string $writeTaskListFile = ''; + #[\Override] protected function tearDown(): void { TestData::cleanupTempFile($this->writeTaskListFile); } + /** + * @return array + */ public static function prepareFiles(): array { $reflector = new \ReflectionClass(self::class); - $path = '' . realpath('' . $reflector->getFileName()); - $emptyFile = str_replace(TestData::FILE_EXT_PHP, 'Empty' . TestData::FILE_EXT_CSV, $path); - $existingFile = str_replace(TestData::FILE_EXT_PHP, TestData::FILE_EXT_CSV, $path); + $path = realpath('' . $reflector->getFileName()); + if ($path !== false) { + $emptyFile = str_replace(TestData::FILE_EXT_PHP, 'Empty' . TestData::FILE_EXT_CSV, $path); + $existingFile = str_replace(TestData::FILE_EXT_PHP, TestData::FILE_EXT_CSV, $path); + } else { + $emptyFile = ''; + $existingFile = ''; + } return [TestData::FILE_FILENAME_EMPTY,$emptyFile, $existingFile]; } - /** - * @return TaskList - */ + #[\Override] protected static function prepareO2t(): TaskList { return new TaskList(self::KEY); } - /** - * @return TaskList - */ + #[\Override] protected function getCasto2t(): TaskList { return $this->o2t; @@ -116,12 +118,8 @@ public function testNextTask(): void self::assertNull($item); } - /** - * @param bool $expected - * @param string $fileName - */ #[DataProvider('providerTaskListFile')] - public function testReadFileFile(bool $expected, int $expectedCount, ?string $fileName): void + public function testReadFileFile(bool $expected, int $expectedCount, string $fileName): void { $this->o2t = new TaskList(self::class); $actual = $this->getCasto2t()->readFile($fileName); diff --git a/tests/Tools/EmergencyTest.php b/tests/Tools/EmergencyTest.php index ed86e53..2678da3 100644 --- a/tests/Tools/EmergencyTest.php +++ b/tests/Tools/EmergencyTest.php @@ -18,27 +18,22 @@ class EmergencyTest extends TestCase { - public const CODE_NEG1 = -1; + public const int CODE_NEG1 = -1; - public const CODE_0 = 0; + public const int CODE_0 = 0; - public const CODE_89 = 89; + public const int CODE_89 = 89; - public const CODE_123 = 123; + public const int CODE_123 = 123; - public const CODE_255 = 255; + public const int CODE_255 = 255; - public const MSG_EMPTY = ''; + public const string MSG_EMPTY = ''; - public const MSG_01 = 'ERR-MSG'; + public const string MSG_01 = 'ERR-MSG'; - public const MSG_02 = 'There is something worried'; + public const string MSG_02 = 'There is something worried'; - /** - * @param int $errCode - * @param string $errMessage - * @param int $expected - */ #[DataProvider('providerBreakSystem')] public function testBreakSystem(int $errCode, string $errMessage, int $expected): void { @@ -47,10 +42,6 @@ public function testBreakSystem(int $errCode, string $errMessage, int $expected) self::assertEquals($expected, $actual); } - /** - * @param \Throwable $throwable - * @param int $expected - */ #[DataProvider('providerExceptionStop')] public function testExceptionStop(\Throwable $throwable, int $expected): void { diff --git a/tests/Tools/EnvironmentVariableTraitTest.php b/tests/Tools/EnvironmentVariableTraitTest.php index b424281..c04f2f8 100644 --- a/tests/Tools/EnvironmentVariableTraitTest.php +++ b/tests/Tools/EnvironmentVariableTraitTest.php @@ -20,19 +20,19 @@ class EnvironmentVariableTraitTest extends TestCase { use EnvironmentVariableTrait; - private const PROJECT_NAME = 'ezkoding'; + private const string PROJECT_NAME = 'ezkoding'; - private const HOME_WIN = 'USERPROFILE'; + private const string HOME_WIN = 'USERPROFILE'; - private const HOME_LINUX = 'HOME'; + private const string HOME_LINUX = 'HOME'; - private const HOME_NOTEXIST = 'NOTEXISTS'; + private const string HOME_NOTEXIST = 'NOTEXISTS'; public function testHomeDefault(): void { $actual = self::getHome(); - $this->validateActualContains($actual, DIRECTORY_SEPARATOR); + $this->validateActualContains(DIRECTORY_SEPARATOR, $actual); } public function testHomeUserProfileDirect(): void @@ -42,7 +42,7 @@ public function testHomeUserProfileDirect(): void $actual = self::getHome(self::HOME_LINUX); } - $this->validateActualContains($actual, DIRECTORY_SEPARATOR); + $this->validateActualContains(DIRECTORY_SEPARATOR, $actual); } public function testHomeUserProfileIndirect(): void @@ -56,30 +56,34 @@ public function testGetProjectRoot(): void { $actual = self::getProjectRoot(); - $this->validateActualEnds($actual, self::PROJECT_NAME); + $this->validateActualEnds(self::PROJECT_NAME, $actual); } public function testGetComposerFilePath(): void { $actual = self::getComposerFilePath(); - $this->validateActualEnds($actual, self::PROJECT_NAME); + $this->validateActualEnds(self::PROJECT_NAME, $actual); } public function testGetProjectRootFallback(): void { $actual = self::getProjectRootFallback(); - $this->validateActualEnds($actual, self::PROJECT_NAME); + $this->validateActualEnds(self::PROJECT_NAME, $actual); } - private function validateActualContains(string $actual, string $expected): void + private function validateActualContains(string $expected, string $actual): void { self::assertNotEmpty($actual); self::assertStringContainsString($expected, $actual); } - private function validateActualEnds(string $actual, string $expected): void + /** + * @param non-empty-string $expected + * @param string $actual + */ + private function validateActualEnds(string $expected, string $actual): void { self::assertNotEmpty($actual); self::assertStringEndsWith($expected, $actual); diff --git a/tests/Tools/PhpVersionTraitTest.php b/tests/Tools/PhpVersionTraitTest.php index cbff393..8542f20 100644 --- a/tests/Tools/PhpVersionTraitTest.php +++ b/tests/Tools/PhpVersionTraitTest.php @@ -21,16 +21,12 @@ class PhpVersionTraitTest extends TestCase { use PhpVersionTrait; - public const PHP_VERSION_MIN = '0.0.1'; + public const string PHP_VERSION_MIN = '0.0.1'; - public const PHP_VERSION_CURR = PHP_VERSION; + public const string PHP_VERSION_CURR = PHP_VERSION; - public const PHP_VERSION_MAX = '99.99.999'; + public const string PHP_VERSION_MAX = '99.99.999'; - /** - * @param bool $expected - * @param string $checkVersion - */ #[DataProvider('providerPhpVersion')] public function testIsPhpGreater(bool $expected, string $checkVersion): void { diff --git a/tests/Tools/Reflection/ChildClazzesHelperTest.php b/tests/Tools/Reflection/ChildClazzesHelperTest.php index 74af48f..b09b6e9 100644 --- a/tests/Tools/Reflection/ChildClazzesHelperTest.php +++ b/tests/Tools/Reflection/ChildClazzesHelperTest.php @@ -20,10 +20,7 @@ class ChildClazzesHelperTest extends TestCase { /** - * @param int $expected - * @param string $clazzName * @param array $childClazzes - * @param bool $isEqual */ #[DataProvider('providerChildClazzes')] public function testAllChildren(int $expected, string $clazzName, array $childClazzes, bool $isEqual = true): void diff --git a/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitDummyClazz.php b/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitDummyClazz.php index 0047bce..84445a5 100644 --- a/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitDummyClazz.php +++ b/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitDummyClazz.php @@ -23,12 +23,9 @@ */ class UnavailableFieldsTraitDummyClazz { - /** @var string */ public string $publicField = 'publicFieldValue'; - /** @var string */ protected string $protectedField = 'protectedFieldValue'; - /** @var string */ private string $privateField = 'privateFieldValue'; } diff --git a/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTest.php b/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTest.php index 0cc38e5..5a413f3 100644 --- a/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTest.php +++ b/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTest.php @@ -23,12 +23,12 @@ */ class UnavailableFieldsTraitTest extends TestCase { - /** @var UnavailableFieldsTraitTestO2tClazz */ protected UnavailableFieldsTraitTestO2tClazz $o2t; - /** @var string[] */ + /** @var array */ private array $fieldNames = ['publicField', 'protectedField', 'privateField']; + #[\Override] public function setUp(): void { parent::setUp(); @@ -62,7 +62,6 @@ public function testGetFieldFromO2t(): void public function testGetFieldFromO2tReturnNull(): void { - /** @var UnavailableFieldsTraitTestWrongO2tClazz $o2tb */ $o2tb = new UnavailableFieldsTraitTestWrongO2tClazz(); foreach ($this->fieldNames as $fieldName) { self::assertNull($o2tb->publicGetFieldFromO2t($fieldName)); diff --git a/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTestO2tClazz.php b/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTestO2tClazz.php index 3e72a70..30f26ec 100644 --- a/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTestO2tClazz.php +++ b/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTestO2tClazz.php @@ -25,38 +25,23 @@ class UnavailableFieldsTraitTestO2tClazz { use UnavailableFieldsTrait; - /** @var mixed */ - protected mixed $o2t; + protected UnavailableFieldsTraitDummyClazz $o2t; public function __construct() { $this->o2t = new UnavailableFieldsTraitDummyClazz(); } - /** - * @param string $fieldName - * - * @return null|mixed - */ public function publicGetFieldFromO2t(string $fieldName): mixed { return $this->getFieldFromO2t($fieldName); } - /** - * @param string $fieldName - * - * @return null|mixed - */ public function publicGetFieldByReflection(string $fieldName): mixed { return $this->getFieldByReflection(UnavailableFieldsTraitDummyClazz::class, $fieldName, $this->o2t); } - /** - * @param string $fieldName - * @param null|mixed $newValue - */ public function publicSetFieldByReflection(string $fieldName, mixed $newValue): void { $this->setFieldByReflection(UnavailableFieldsTraitDummyClazz::class, $fieldName, $this->o2t, $newValue); diff --git a/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTestWrongO2tClazz.php b/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTestWrongO2tClazz.php index be37d04..2ada326 100644 --- a/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTestWrongO2tClazz.php +++ b/tests/Tools/Reflection/UnavailableFieldsTraitTest/UnavailableFieldsTraitTestWrongO2tClazz.php @@ -25,19 +25,13 @@ class UnavailableFieldsTraitTestWrongO2tClazz { use UnavailableFieldsTrait; - /** @var mixed */ - private mixed $wrongO2t; + private UnavailableFieldsTraitDummyClazz $wrongO2t; public function __construct() { $this->wrongO2t = new UnavailableFieldsTraitDummyClazz(); } - /** - * @param string $fieldName - * - * @return null|mixed - */ public function publicGetFieldFromO2t(string $fieldName): mixed { return $this->getFieldFromO2t($fieldName); diff --git a/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTest.php b/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTest.php index 304b28d..c66a717 100644 --- a/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTest.php +++ b/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTest.php @@ -23,12 +23,12 @@ */ class UnavailableMethodsTraitTest extends TestCase { - /** @var UnavailableMethodsTraitTestO2tClazz */ protected UnavailableMethodsTraitTestO2tClazz $o2t; - /** @var string[] */ + /** @var array */ private array $methodNames = ['publicFunc', 'protectedFunc', 'privateFunc']; + #[\Override] public function setUp(): void { parent::setUp(); @@ -51,7 +51,6 @@ public function testCallMethodOnO2t(): void public function testCallMethodOnO2tReturnNull(): void { - /** @var UnavailableMethodsTraitTestWrongO2tClazz $o2tb */ $o2tb = new UnavailableMethodsTraitTestWrongO2tClazz(); foreach ($this->methodNames as $methodName) { self::assertNull($o2tb->publicCallMethodOnO2t($methodName)); diff --git a/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTestO2tClazz.php b/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTestO2tClazz.php index 5fd3f50..b8668cd 100644 --- a/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTestO2tClazz.php +++ b/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTestO2tClazz.php @@ -25,29 +25,18 @@ class UnavailableMethodsTraitTestO2tClazz { use UnavailableMethodsTrait; - /** @var mixed */ - protected mixed $o2t; + protected UnavailableMethodsTraitDummyClazz $o2t; public function __construct() { $this->o2t = new UnavailableMethodsTraitDummyClazz(); } - /** - * @param string $methodName - * - * @return null|mixed - */ public function publicCallMethodOnO2t(string $methodName): mixed { return $this->callMethodOnO2t($methodName); } - /** - * @param string $methodName - * - * @return null|mixed - */ public function publicCallMethodByReflection(string $methodName): mixed { return $this->callMethodByReflection(UnavailableMethodsTraitDummyClazz::class, $methodName, $this->o2t); diff --git a/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTestWrongO2tClazz.php b/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTestWrongO2tClazz.php index 1cd4014..ad85b68 100644 --- a/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTestWrongO2tClazz.php +++ b/tests/Tools/Reflection/UnavailableMethodsTraitTest/UnavailableMethodsTraitTestWrongO2tClazz.php @@ -25,23 +25,14 @@ class UnavailableMethodsTraitTestWrongO2tClazz { use UnavailableMethodsTrait; - /** - * @var mixed - * - * @SuppressWarnings("PHPMD.UnusedPrivateField") - */ - private mixed $wrongO2t; + /** @SuppressWarnings("PHPMD.UnusedPrivateField") */ + private UnavailableMethodsTraitDummyClazz $wrongO2t; public function __construct() { $this->wrongO2t = new UnavailableMethodsTraitDummyClazz(); } - /** - * @param string $methodName - * - * @return null|mixed - */ public function publicCallMethodOnO2t(string $methodName): mixed { return $this->callMethodOnO2t($methodName); diff --git a/tests/Tools/String/ImplodeTraitTest.php b/tests/Tools/String/ImplodeTraitTest.php index db0b3af..4e580d5 100644 --- a/tests/Tools/String/ImplodeTraitTest.php +++ b/tests/Tools/String/ImplodeTraitTest.php @@ -83,13 +83,6 @@ public function testArray_flatten(int $expectedCount, array $testData, int $pres self::assertCount($expectedCount, $actual); } - /** - * @param mixed $actual - * @param mixed $testData - * @param int $expectedKeyCount - * @param int $expectedItemCount - * @param bool $withClazz - */ public function verifyResult(mixed $actual, mixed $testData, int $expectedKeyCount, int $expectedItemCount, bool $withClazz = false): void { self::assertNotEmpty($actual); diff --git a/tests/Tools/String/ToStringTraitTest.php b/tests/Tools/String/ToStringTraitTest.php index 359fe33..66a218a 100644 --- a/tests/Tools/String/ToStringTraitTest.php +++ b/tests/Tools/String/ToStringTraitTest.php @@ -27,30 +27,30 @@ class ToStringTraitTest extends TestCase { use ImplodeTrait; - public const FORMAT_OBJECT = '{%s Object( [greeting] => %s)}'; + public const string FORMAT_OBJECT = '{%s Object( [greeting] => %s)}'; - public const FORMAT_OBJECT_IN_OBJECT = '{%s Object( [greeting] => %s Object ( [fooValue:%s:private] => %s ))}'; + public const string FORMAT_OBJECT_IN_OBJECT = '{%s Object( [greeting] => %s Object ( [fooValue:%s:private] => %s ))}'; - public const FORMAT_ARRAY_IN_OBJECT = '{%s Object( [greeting] => Array ( %s ))}'; + public const string FORMAT_ARRAY_IN_OBJECT = '{%s Object( [greeting] => Array ( %s ))}'; - public const FORMAT_ARRAY_IN_OBJECT_2 = '{%s Object( [greeting] => Array ( [%s] => %s Object ( [fooValue:%s:private] => %s ) ))}'; + public const string FORMAT_ARRAY_IN_OBJECT_2 = '{%s Object( [greeting] => Array ( [%s] => %s Object ( [fooValue:%s:private] => %s ) ))}'; - public const FORMAT_ARRAY_KEY_NUM_SEARCH = '/(\w*)=>/'; + public const string FORMAT_ARRAY_KEY_NUM_SEARCH = '/(\w*)=>/'; - public const FORMAT_ARRAY_KEY_ALPHA_SEARCH = "/'([\w\W]+?)'=>/"; + public const string FORMAT_ARRAY_KEY_ALPHA_SEARCH = "/'([\w\W]+?)'=>/"; - public const FORMAT_ARRAY_ELEM_REPLACE = '[$1] => '; + public const string FORMAT_ARRAY_ELEM_REPLACE = '[$1] => '; - public const FORMAT_ARRAY_SPACE_SEP = ' '; + public const string FORMAT_ARRAY_SPACE_SEP = ' '; - public const ILLEGAL_CHARS = [" \n", "\n ", "\n", " "]; + /** @var array */ + public const array ILLEGAL_CHARS = [" \n", "\n ", "\n", " "]; protected ToStringTraitTestDummyClazz $o2t; #[\Override] protected function setUp(): void { - $this->markTestIncomplete('FIXME: Ignore 4 a moment'); parent::setUp(); $this->o2t = new ToStringTraitTestDummyClazz(); } @@ -68,10 +68,6 @@ public function testWakeup(): void $this->o2t->__wakeup(); } - /** - * @param mixed $data - * @param string $expected - */ #[DataProvider('provideDataToString')] public function testToString(mixed $data, string $expected): void { diff --git a/tests/Tools/String/ToStringTraitTestDummyClazz.php b/tests/Tools/String/ToStringTraitTestDummyClazz.php index 30635d6..84a1b43 100644 --- a/tests/Tools/String/ToStringTraitTestDummyClazz.php +++ b/tests/Tools/String/ToStringTraitTestDummyClazz.php @@ -18,7 +18,6 @@ * * @see ToStringTraitTest */ - class ToStringTraitTestDummyClazz { use ToStringTrait; diff --git a/tests/Tools/Test/TestDataTest.php b/tests/Tools/Test/TestDataTest.php index 7ccd8e6..5183cc4 100644 --- a/tests/Tools/Test/TestDataTest.php +++ b/tests/Tools/Test/TestDataTest.php @@ -22,13 +22,8 @@ */ class TestDataTest extends TestCase { - /** @var string */ private static string $fileName; - /** - * @param int $expectedCount - * @param mixed $actual - */ #[DataProvider('providerData')] public function testData(int $expectedCount, mixed $actual): void { @@ -54,7 +49,7 @@ public static function providerData(): array public function testConstantsKey(): void { - $expectedCount = 14; + $expectedCount = 16; $this->verifyResult($expectedCount, 'key'); }