diff --git a/.laminas-ci.json b/.laminas-ci.json index 7dad22d9..2c63c085 100644 --- a/.laminas-ci.json +++ b/.laminas-ci.json @@ -1,6 +1,2 @@ { - "ignore_php_platform_requirements": { - "8.1": false, - "8.2": true - } } diff --git a/composer.json b/composer.json index aa296be6..5977b0cf 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "dealerdirect/phpcodesniffer-composer-installer": true }, "platform": { - "php": "8.0.99" + "php": "8.1.99" } }, "extra": { @@ -31,7 +31,7 @@ } }, "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0", + "php": "~8.1.0 || ~8.2.0", "laminas/laminas-stdlib": "^3.3", "webmozart/assert": "^1.10" }, @@ -40,11 +40,11 @@ "laminas/laminas-eventmanager": "^3.10", "laminas/laminas-modulemanager": "^2.14.0", "laminas/laminas-serializer": "^2.14.0", - "laminas/laminas-servicemanager": "^3.20", - "phpbench/phpbench": "^1.2.8", - "phpunit/phpunit": "^9.5.28", + "laminas/laminas-servicemanager": "^3.21", + "phpbench/phpbench": "^1.2.10", + "phpunit/phpunit": "^10.1.3", "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.6" + "vimeo/psalm": "^5.11" }, "suggest": { "laminas/laminas-eventmanager": "^3.2, to support aggregate hydrator usage", diff --git a/composer.lock b/composer.lock index baab6752..725ef4d1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,34 +4,34 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "fbcce04db557580f7639b4a6c842f0c0", + "content-hash": "9c887678a116d572457176503d28cfa9", "packages": [ { "name": "laminas/laminas-stdlib", - "version": "3.16.1", + "version": "3.17.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "f4f773641807c7ccee59b758bfe4ac4ba33ecb17" + "reference": "dd35c868075bad80b6718959740913e178eb4274" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/f4f773641807c7ccee59b758bfe4ac4ba33ecb17", - "reference": "f4f773641807c7ccee59b758bfe4ac4ba33ecb17", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/dd35c868075bad80b6718959740913e178eb4274", + "reference": "dd35c868075bad80b6718959740913e178eb4274", "shasum": "" }, "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + "php": "~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-stdlib": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "^2.4.0", - "phpbench/phpbench": "^1.2.7", - "phpunit/phpunit": "^9.5.26", - "psalm/plugin-phpunit": "^0.18.0", - "vimeo/psalm": "^5.0.0" + "laminas/laminas-coding-standard": "^2.5", + "phpbench/phpbench": "^1.2.9", + "phpunit/phpunit": "^10.0.16", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.8" }, "type": "library", "autoload": { @@ -63,7 +63,7 @@ "type": "community_bridge" } ], - "time": "2022-12-03T18:48:01+00:00" + "time": "2023-03-20T13:51:37+00:00" }, { "name": "webmozart/assert", @@ -745,16 +745,16 @@ }, { "name": "doctrine/annotations", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "d02c9f3742044e17d5fa8d28d8402a2d95c33302" + "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/d02c9f3742044e17d5fa8d28d8402a2d95c33302", - "reference": "d02c9f3742044e17d5fa8d28d8402a2d95c33302", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", + "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", "shasum": "" }, "require": { @@ -815,147 +815,33 @@ ], "support": { "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/2.0.0" + "source": "https://github.com/doctrine/annotations/tree/2.0.1" }, - "time": "2022-12-19T18:17:20+00:00" - }, - { - "name": "doctrine/deprecations", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/deprecations.git", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", - "shasum": "" - }, - "require": { - "php": "^7.1|^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "phpunit/phpunit": "^7.5|^8.5|^9.5", - "psr/log": "^1|^2|^3" - }, - "suggest": { - "psr/log": "Allows logging deprecations via PSR-3 logger implementation" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", - "homepage": "https://www.doctrine-project.org/", - "support": { - "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/v1.0.0" - }, - "time": "2022-05-02T15:47:09+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" + "time": "2023-02-02T22:02:53+00:00" }, { "name": "doctrine/lexer", - "version": "2.1.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" + "reference": "84a527db05647743d50373e0ec53a152f2cde568" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/84a527db05647743d50373e0ec53a152f2cde568", + "reference": "84a527db05647743d50373e0ec53a152f2cde568", "shasum": "" }, "require": { - "doctrine/deprecations": "^1.0", - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.9", + "phpunit/phpunit": "^9.5", "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^4.11 || ^5.0" + "vimeo/psalm": "^5.0" }, "type": "library", "autoload": { @@ -992,7 +878,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/2.1.0" + "source": "https://github.com/doctrine/lexer/tree/3.0.0" }, "funding": [ { @@ -1008,7 +894,7 @@ "type": "tidelift" } ], - "time": "2022-12-14T08:49:07+00:00" + "time": "2022-12-15T16:57:16+00:00" }, { "name": "felixfbecker/advanced-json-rpc", @@ -1113,16 +999,16 @@ }, { "name": "fidry/cpu-core-counter", - "version": "0.4.1", + "version": "0.5.1", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "79261cc280aded96d098e1b0e0ba0c4881b432c2" + "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/79261cc280aded96d098e1b0e0ba0c4881b432c2", - "reference": "79261cc280aded96d098e1b0e0ba0c4881b432c2", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/b58e5a3933e541dc286cc91fc4f3898bbc6f1623", + "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623", "shasum": "" }, "require": { @@ -1162,7 +1048,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/0.4.1" + "source": "https://github.com/theofidry/cpu-core-counter/tree/0.5.1" }, "funding": [ { @@ -1170,7 +1056,7 @@ "type": "github" } ], - "time": "2022-12-16T22:01:02+00:00" + "time": "2022-12-24T12:35:10+00:00" }, { "name": "laminas/laminas-coding-standard", @@ -1569,26 +1455,26 @@ }, { "name": "laminas/laminas-servicemanager", - "version": "3.20.0", + "version": "3.21.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-servicemanager.git", - "reference": "bc2c2cbe2dd90db8b9d16b0618f542692b76ab59" + "reference": "625f2aa3bc6dd02688b2da5155b3a69870812bda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/bc2c2cbe2dd90db8b9d16b0618f542692b76ab59", - "reference": "bc2c2cbe2dd90db8b9d16b0618f542692b76ab59", + "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/625f2aa3bc6dd02688b2da5155b3a69870812bda", + "reference": "625f2aa3bc6dd02688b2da5155b3a69870812bda", "shasum": "" }, "require": { - "laminas/laminas-stdlib": "^3.2.1", - "php": "~8.0.0 || ~8.1.0 || ~8.2.0", + "laminas/laminas-stdlib": "^3.17", + "php": "~8.1.0 || ~8.2.0", "psr/container": "^1.0" }, "conflict": { "ext-psr": "*", - "laminas/laminas-code": "<3.3.1", + "laminas/laminas-code": "<4.10.0", "zendframework/zend-code": "<3.3.1", "zendframework/zend-servicemanager": "*" }, @@ -1600,18 +1486,19 @@ }, "require-dev": { "composer/package-versions-deprecated": "^1.11.99.5", - "laminas/laminas-coding-standard": "~2.4.0", + "friendsofphp/proxy-manager-lts": "^1.0.14", + "laminas/laminas-code": "^4.10.0", + "laminas/laminas-coding-standard": "~2.5.0", "laminas/laminas-container-config-test": "^0.8", "laminas/laminas-dependency-plugin": "^2.2", - "mikey179/vfsstream": "^1.6.11@alpha", - "ocramius/proxy-manager": "^2.14.1", - "phpbench/phpbench": "^1.2.7", - "phpunit/phpunit": "^9.5.26", - "psalm/plugin-phpunit": "^0.18.0", - "vimeo/psalm": "^5.0.0" + "mikey179/vfsstream": "^1.6.11", + "phpbench/phpbench": "^1.2.9", + "phpunit/phpunit": "^10.0.17", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.8.0" }, "suggest": { - "ocramius/proxy-manager": "ProxyManager ^2.1.1 to handle lazy initialization of services" + "friendsofphp/proxy-manager-lts": "ProxyManager ^2.1.1 to handle lazy initialization of services" }, "bin": [ "bin/generate-deps-for-config-factory", @@ -1655,20 +1542,20 @@ "type": "community_bridge" } ], - "time": "2022-12-01T17:03:38+00:00" + "time": "2023-05-14T12:24:54+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.11.0", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "shasum": "" }, "require": { @@ -1706,7 +1593,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" }, "funding": [ { @@ -1714,20 +1601,20 @@ "type": "tidelift" } ], - "time": "2022-03-03T13:19:32+00:00" + "time": "2023-03-08T13:26:56+00:00" }, { "name": "netresearch/jsonmapper", - "version": "v4.1.0", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "cfa81ea1d35294d64adb9c68aa4cb9e92400e53f" + "reference": "f60565f8c0566a31acf06884cdaa591867ecc956" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/cfa81ea1d35294d64adb9c68aa4cb9e92400e53f", - "reference": "cfa81ea1d35294d64adb9c68aa4cb9e92400e53f", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/f60565f8c0566a31acf06884cdaa591867ecc956", + "reference": "f60565f8c0566a31acf06884cdaa591867ecc956", "shasum": "" }, "require": { @@ -1763,22 +1650,22 @@ "support": { "email": "cweiske@cweiske.de", "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.1.0" + "source": "https://github.com/cweiske/jsonmapper/tree/v4.2.0" }, - "time": "2022-12-08T20:46:14+00:00" + "time": "2023-04-09T17:37:40+00:00" }, { "name": "nikic/php-parser", - "version": "v4.15.3", + "version": "v4.15.4", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039" + "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/570e980a201d8ed0236b0a62ddf2c9cbb2034039", - "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290", + "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290", "shasum": "" }, "require": { @@ -1819,9 +1706,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.3" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4" }, - "time": "2023-01-16T22:05:37+00:00" + "time": "2023-03-05T19:49:14+00:00" }, { "name": "phar-io/manifest", @@ -1987,25 +1874,25 @@ }, { "name": "phpbench/dom", - "version": "0.3.2", + "version": "0.3.3", "source": { "type": "git", "url": "https://github.com/phpbench/dom.git", - "reference": "b013b717832ddbaadf2a40984b04bc66af9a7110" + "reference": "786a96db538d0def931f5b19225233ec42ec7a72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpbench/dom/zipball/b013b717832ddbaadf2a40984b04bc66af9a7110", - "reference": "b013b717832ddbaadf2a40984b04bc66af9a7110", + "url": "https://api.github.com/repos/phpbench/dom/zipball/786a96db538d0def931f5b19225233ec42ec7a72", + "reference": "786a96db538d0def931f5b19225233ec42ec7a72", "shasum": "" }, "require": { "ext-dom": "*", - "php": "^7.2||^8.0" + "php": "^7.3||^8.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.18", - "phpstan/phpstan": "^0.12.83", + "friendsofphp/php-cs-fixer": "^3.14", + "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^8.0||^9.0" }, "type": "library", @@ -2032,22 +1919,22 @@ "description": "DOM wrapper to simplify working with the PHP DOM implementation", "support": { "issues": "https://github.com/phpbench/dom/issues", - "source": "https://github.com/phpbench/dom/tree/0.3.2" + "source": "https://github.com/phpbench/dom/tree/0.3.3" }, - "time": "2021-09-24T15:26:07+00:00" + "time": "2023-03-06T23:46:57+00:00" }, { "name": "phpbench/phpbench", - "version": "1.2.8", + "version": "1.2.10", "source": { "type": "git", "url": "https://github.com/phpbench/phpbench.git", - "reference": "3f7b3c200f86727de7a14bde94adb68a88e1bafc" + "reference": "95206f92479674599a75e02b74b9933e2d9883aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpbench/phpbench/zipball/3f7b3c200f86727de7a14bde94adb68a88e1bafc", - "reference": "3f7b3c200f86727de7a14bde94adb68a88e1bafc", + "url": "https://api.github.com/repos/phpbench/phpbench/zipball/95206f92479674599a75e02b74b9933e2d9883aa", + "reference": "95206f92479674599a75e02b74b9933e2d9883aa", "shasum": "" }, "require": { @@ -2058,9 +1945,9 @@ "ext-reflection": "*", "ext-spl": "*", "ext-tokenizer": "*", - "php": "^7.3 || ^8.0", + "php": "^7.4 || ^8.0", "phpbench/container": "^2.1", - "phpbench/dom": "~0.3.1", + "phpbench/dom": "~0.3.3", "psr/log": "^1.1 || ^2.0 || ^3.0", "seld/jsonlint": "^1.1", "symfony/console": "^4.2 || ^5.0 || ^6.0", @@ -2078,7 +1965,7 @@ "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^1.0", "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^8.5.8 || ^9.0", + "phpunit/phpunit": "^9.0", "symfony/error-handler": "^5.2 || ^6.0", "symfony/var-dumper": "^4.0 || ^5.0 || ^6.0" }, @@ -2116,7 +2003,7 @@ "description": "PHP Benchmarking Framework", "support": { "issues": "https://github.com/phpbench/phpbench/issues", - "source": "https://github.com/phpbench/phpbench/tree/1.2.8" + "source": "https://github.com/phpbench/phpbench/tree/1.2.10" }, "funding": [ { @@ -2124,7 +2011,7 @@ "type": "github" } ], - "time": "2023-01-14T13:08:42+00:00" + "time": "2023-03-24T08:52:55+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -2337,44 +2224,44 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.24", + "version": "10.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed" + "reference": "884a0da7f9f46f28b2cb69134217fd810b793974" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed", - "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/884a0da7f9f46f28b2cb69134217fd810b793974", + "reference": "884a0da7f9f46f28b2cb69134217fd810b793974", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.14", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", + "nikic/php-parser": "^4.15", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-text-template": "^3.0", + "sebastian/code-unit-reverse-lookup": "^3.0", + "sebastian/complexity": "^3.0", + "sebastian/environment": "^6.0", + "sebastian/lines-of-code": "^2.0", + "sebastian/version": "^4.0", "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.1" }, "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "10.1-dev" } }, "autoload": { @@ -2402,7 +2289,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24" + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.1" }, "funding": [ { @@ -2410,32 +2298,32 @@ "type": "github" } ], - "time": "2023-01-26T08:26:55+00:00" + "time": "2023-04-17T12:15:40+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "4.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "5647d65443818959172645e7ed999217360654b6" }, "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/5647d65443818959172645e7ed999217360654b6", + "reference": "5647d65443818959172645e7ed999217360654b6", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2462,7 +2350,8 @@ ], "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/4.0.2" }, "funding": [ { @@ -2470,28 +2359,28 @@ "type": "github" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2023-05-07T09:13:23+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.1.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" }, "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/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-pcntl": "*" @@ -2499,7 +2388,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2525,7 +2414,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" }, "funding": [ { @@ -2533,32 +2422,32 @@ "type": "github" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2023-02-03T06:56:09+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d" }, "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/9f3d3709577a527025f55bcf0f7ab8052c8bb37d", + "reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2584,7 +2473,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.0" }, "funding": [ { @@ -2592,32 +2481,32 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2023-02-03T06:56:46+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" }, "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/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -2643,7 +2532,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" }, "funding": [ { @@ -2651,24 +2540,23 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2023-02-03T06:57:52+00:00" }, { "name": "phpunit/phpunit", - "version": "9.5.28", + "version": "10.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "954ca3113a03bf780d22f07bf055d883ee04b65e" + "reference": "2379ebafc1737e71cdc84f402acb6b7f04198b9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/954ca3113a03bf780d22f07bf055d883ee04b65e", - "reference": "954ca3113a03bf780d22f07bf055d883ee04b65e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2379ebafc1737e71cdc84f402acb6b7f04198b9d", + "reference": "2379ebafc1737e71cdc84f402acb6b7f04198b9d", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -2678,27 +2566,26 @@ "myclabs/deep-copy": "^1.10.1", "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.13", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", - "sebastian/version": "^3.0.2" + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.1.1", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-invoker": "^4.0", + "phpunit/php-text-template": "^3.0", + "phpunit/php-timer": "^6.0", + "sebastian/cli-parser": "^2.0", + "sebastian/code-unit": "^2.0", + "sebastian/comparator": "^5.0", + "sebastian/diff": "^5.0", + "sebastian/environment": "^6.0", + "sebastian/exporter": "^5.0", + "sebastian/global-state": "^6.0", + "sebastian/object-enumerator": "^5.0", + "sebastian/recursion-context": "^5.0", + "sebastian/type": "^4.0", + "sebastian/version": "^4.0" }, "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -2706,7 +2593,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.5-dev" + "dev-main": "10.1-dev" } }, "autoload": { @@ -2737,7 +2624,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.28" + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.1.3" }, "funding": [ { @@ -2753,7 +2641,7 @@ "type": "tidelift" } ], - "time": "2023-01-14T12:32:24+00:00" + "time": "2023-05-11T05:16:22+00:00" }, { "name": "psalm/plugin-phpunit", @@ -2964,28 +2852,28 @@ }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efdc130dbbbb8ef0b545a994fd811725c5282cae", + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -3008,7 +2896,7 @@ "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.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.0" }, "funding": [ { @@ -3016,32 +2904,32 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2023-02-03T06:58:15+00:00" }, { "name": "sebastian/code-unit", - "version": "1.0.8", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -3064,7 +2952,7 @@ "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" + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" }, "funding": [ { @@ -3072,32 +2960,32 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2023-02-03T06:58:43+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -3119,7 +3007,7 @@ "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" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" }, "funding": [ { @@ -3127,34 +3015,36 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2023-02-03T06:59:15+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.8", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "72f01e6586e0caf6af81297897bd112eb7e9627c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/72f01e6586e0caf6af81297897bd112eb7e9627c", + "reference": "72f01e6586e0caf6af81297897bd112eb7e9627c", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -3193,7 +3083,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.0" }, "funding": [ { @@ -3201,33 +3091,33 @@ "type": "github" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2023-02-03T07:07:16+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/e67d240970c9dc7ea7b2123a6d520e334dd61dc6", + "reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" + "nikic/php-parser": "^4.10", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -3250,7 +3140,7 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "source": "https://github.com/sebastianbergmann/complexity/tree/3.0.0" }, "funding": [ { @@ -3258,33 +3148,33 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-02-03T06:59:47+00:00" }, { "name": "sebastian/diff", - "version": "4.0.4", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b", + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3", + "phpunit/phpunit": "^10.0", "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -3316,7 +3206,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.0.3" }, "funding": [ { @@ -3324,27 +3215,27 @@ "type": "github" } ], - "time": "2020-10-26T13:10:38+00:00" + "time": "2023-05-01T07:48:21+00:00" }, { "name": "sebastian/environment", - "version": "5.1.4", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/43c751b41d74f96cbbd4e07b7aec9675651e2951", + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-posix": "*" @@ -3352,7 +3243,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -3371,7 +3262,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", @@ -3379,7 +3270,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.0.1" }, "funding": [ { @@ -3387,34 +3279,34 @@ "type": "github" } ], - "time": "2022-04-03T09:37:03+00:00" + "time": "2023-04-11T05:39:26+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0", + "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -3456,7 +3348,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/exporter/tree/5.0.0" }, "funding": [ { @@ -3464,38 +3356,35 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2023-02-03T07:06:49+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.5", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + "reference": "aab257c712de87b90194febd52e4d184551c2d44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/aab257c712de87b90194febd52e4d184551c2d44", + "reference": "aab257c712de87b90194febd52e4d184551c2d44", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -3520,7 +3409,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.0" }, "funding": [ { @@ -3528,33 +3417,33 @@ "type": "github" } ], - "time": "2022-02-14T08:28:10+00:00" + "time": "2023-02-03T07:07:38+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/17c4d940ecafb3d15d2cf916f4108f664e28b130", + "reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" + "nikic/php-parser": "^4.10", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -3577,7 +3466,7 @@ "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.3" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.0" }, "funding": [ { @@ -3585,34 +3474,34 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-02-03T07:08:02+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" }, "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/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -3634,7 +3523,7 @@ "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" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" }, "funding": [ { @@ -3642,32 +3531,32 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2023-02-03T07:08:32+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" }, "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/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -3689,7 +3578,7 @@ "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" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" }, "funding": [ { @@ -3697,32 +3586,32 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2023-02-03T07:06:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -3749,65 +3638,10 @@ } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "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.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:17:30+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "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": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" }, "funding": [ { @@ -3815,32 +3649,32 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2023-02-03T07:05:40+00:00" }, { "name": "sebastian/type", - "version": "3.2.0", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -3863,7 +3697,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" }, "funding": [ { @@ -3871,29 +3705,29 @@ "type": "github" } ], - "time": "2022-09-12T14:47:03+00:00" + "time": "2023-02-03T07:10:45+00:00" }, { "name": "sebastian/version", - "version": "3.0.2", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -3916,7 +3750,7 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" }, "funding": [ { @@ -3924,20 +3758,20 @@ "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2023-02-07T11:34:05+00:00" }, { "name": "seld/jsonlint", - "version": "1.9.0", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "4211420d25eba80712bff236a98960ef68b866b7" + "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/4211420d25eba80712bff236a98960ef68b866b7", - "reference": "4211420d25eba80712bff236a98960ef68b866b7", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/594fd6462aad8ecee0b45ca5045acea4776667f1", + "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1", "shasum": "" }, "require": { @@ -3976,7 +3810,7 @@ ], "support": { "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.9.0" + "source": "https://github.com/Seldaek/jsonlint/tree/1.10.0" }, "funding": [ { @@ -3988,7 +3822,7 @@ "type": "tidelift" } ], - "time": "2022-04-01T13:37:23+00:00" + "time": "2023-05-11T13:16:46+00:00" }, { "name": "slevomat/coding-standard", @@ -4053,26 +3887,25 @@ }, { "name": "spatie/array-to-xml", - "version": "2.17.1", + "version": "3.1.6", "source": { "type": "git", "url": "https://github.com/spatie/array-to-xml.git", - "reference": "5cbec9c6ab17e320c58a259f0cebe88bde4a7c46" + "reference": "e210b98957987c755372465be105d32113f339a4" }, "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/e210b98957987c755372465be105d32113f339a4", + "reference": "e210b98957987c755372465be105d32113f339a4", "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", @@ -4101,7 +3934,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.1.6" }, "funding": [ { @@ -4113,20 +3946,20 @@ "type": "github" } ], - "time": "2022-12-26T08:22:07+00:00" + "time": "2023-05-11T14:04:07+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.7.1", + "version": "3.7.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", "shasum": "" }, "require": { @@ -4162,31 +3995,33 @@ "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", "keywords": [ "phpcs", - "standards" + "standards", + "static analysis" ], "support": { "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", "source": "https://github.com/squizlabs/PHP_CodeSniffer", "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "time": "2022-06-18T07:21:10+00:00" + "time": "2023-02-22T23:07:41+00:00" }, { "name": "symfony/console", - "version": "v6.0.19", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed" + "reference": "12288d9f4500f84a4d02254d4aa968b15488476f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c3ebc83d031b71c39da318ca8b7a07ecc67507ed", - "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed", + "url": "https://api.github.com/repos/symfony/console/zipball/12288d9f4500f84a4d02254d4aa968b15488476f", + "reference": "12288d9f4500f84a4d02254d4aa968b15488476f", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^1.1|^2|^3", "symfony/string": "^5.4|^6.0" @@ -4243,12 +4078,12 @@ "homepage": "https://symfony.com", "keywords": [ "cli", - "command line", + "command-line", "console", "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.0.19" + "source": "https://github.com/symfony/console/tree/v6.2.10" }, "funding": [ { @@ -4264,29 +4099,29 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:36:10+00:00" + "time": "2023-04-28T13:37:43+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.0.2", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" + "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", + "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.3-dev" }, "thanks": { "name": "symfony/contracts", @@ -4315,7 +4150,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.1" }, "funding": [ { @@ -4331,24 +4166,24 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2023-03-01T10:25:55+00:00" }, { "name": "symfony/filesystem", - "version": "v6.0.19", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214" + "reference": "fd588debf7d1bc16a2c84b4b3b71145d9946b894" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/3d49eec03fda1f0fc19b7349fbbe55ebc1004214", - "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/fd588debf7d1bc16a2c84b4b3b71145d9946b894", + "reference": "fd588debf7d1bc16a2c84b4b3b71145d9946b894", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, @@ -4378,7 +4213,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.0.19" + "source": "https://github.com/symfony/filesystem/tree/v6.2.10" }, "funding": [ { @@ -4394,24 +4229,27 @@ "type": "tidelift" } ], - "time": "2023-01-20T17:44:14+00:00" + "time": "2023-04-18T13:46:08+00:00" }, { "name": "symfony/finder", - "version": "v6.0.19", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "5cc9cac6586fc0c28cd173780ca696e419fefa11" + "reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/5cc9cac6586fc0c28cd173780ca696e419fefa11", - "reference": "5cc9cac6586fc0c28cd173780ca696e419fefa11", + "url": "https://api.github.com/repos/symfony/finder/zipball/20808dc6631aecafbe67c186af5dcb370be3a0eb", + "reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" + }, + "require-dev": { + "symfony/filesystem": "^6.0" }, "type": "library", "autoload": { @@ -4439,7 +4277,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.0.19" + "source": "https://github.com/symfony/finder/tree/v6.2.7" }, "funding": [ { @@ -4455,24 +4293,24 @@ "type": "tidelift" } ], - "time": "2023-01-20T17:44:14+00:00" + "time": "2023-02-16T09:57:23+00:00" }, { "name": "symfony/options-resolver", - "version": "v6.0.19", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "6a180d1c45e0d9797470ca9eb46215692de00fa3" + "reference": "aa0e85b53bbb2b4951960efd61d295907eacd629" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/6a180d1c45e0d9797470ca9eb46215692de00fa3", - "reference": "6a180d1c45e0d9797470ca9eb46215692de00fa3", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/aa0e85b53bbb2b4951960efd61d295907eacd629", + "reference": "aa0e85b53bbb2b4951960efd61d295907eacd629", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/deprecation-contracts": "^2.1|^3" }, "type": "library", @@ -4506,7 +4344,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v6.0.19" + "source": "https://github.com/symfony/options-resolver/tree/v6.2.7" }, "funding": [ { @@ -4522,7 +4360,7 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:36:10+00:00" + "time": "2023-02-14T08:44:56+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4856,20 +4694,20 @@ }, { "name": "symfony/process", - "version": "v6.0.19", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "2114fd60f26a296cc403a7939ab91478475a33d4" + "reference": "b34cdbc9c5e75d45a3703e63a48ad07aafa8bf2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/2114fd60f26a296cc403a7939ab91478475a33d4", - "reference": "2114fd60f26a296cc403a7939ab91478475a33d4", + "url": "https://api.github.com/repos/symfony/process/zipball/b34cdbc9c5e75d45a3703e63a48ad07aafa8bf2e", + "reference": "b34cdbc9c5e75d45a3703e63a48ad07aafa8bf2e", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, "type": "library", "autoload": { @@ -4897,7 +4735,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.0.19" + "source": "https://github.com/symfony/process/tree/v6.2.10" }, "funding": [ { @@ -4913,7 +4751,7 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:36:10+00:00" + "time": "2023-04-18T13:56:57+00:00" }, { "name": "symfony/service-contracts", @@ -5000,20 +4838,20 @@ }, { "name": "symfony/string", - "version": "v6.0.19", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a" + "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/d9e72497367c23e08bf94176d2be45b00a9d232a", - "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a", + "url": "https://api.github.com/repos/symfony/string/zipball/193e83bbd6617d6b2151c37fff10fa7168ebddef", + "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -5025,6 +4863,7 @@ "require-dev": { "symfony/error-handler": "^5.4|^6.0", "symfony/http-client": "^5.4|^6.0", + "symfony/intl": "^6.2", "symfony/translation-contracts": "^2.0|^3.0", "symfony/var-exporter": "^5.4|^6.0" }, @@ -5065,7 +4904,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.0.19" + "source": "https://github.com/symfony/string/tree/v6.2.8" }, "funding": [ { @@ -5081,7 +4920,7 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:36:10+00:00" + "time": "2023-03-20T16:06:02+00:00" }, { "name": "theseer/tokenizer", @@ -5135,22 +4974,22 @@ }, { "name": "vimeo/psalm", - "version": "5.6.0", + "version": "5.11.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "e784128902dfe01d489c4123d69918a9f3c1eac5" + "reference": "c9b192ab8400fdaf04b2b13d110575adc879aa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/e784128902dfe01d489c4123d69918a9f3c1eac5", - "reference": "e784128902dfe01d489c4123d69918a9f3c1eac5", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/c9b192ab8400fdaf04b2b13d110575adc879aa90", + "reference": "c9b192ab8400fdaf04b2b13d110575adc879aa90", "shasum": "" }, "require": { "amphp/amp": "^2.4.2", "amphp/byte-stream": "^1.5", - "composer/package-versions-deprecated": "^1.10.0", + "composer-runtime-api": "^2", "composer/semver": "^1.4 || ^2.0 || ^3.0", "composer/xdebug-handler": "^2.0 || ^3.0", "dnoegel/php-xdg-base-dir": "^0.1.1", @@ -5163,12 +5002,12 @@ "ext-tokenizer": "*", "felixfbecker/advanced-json-rpc": "^3.1", "felixfbecker/language-server-protocol": "^1.5.2", - "fidry/cpu-core-counter": "^0.4.0", + "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1", "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "nikic/php-parser": "^4.13", + "nikic/php-parser": "^4.14", "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0", "sebastian/diff": "^4.0 || ^5.0", - "spatie/array-to-xml": "^2.17.0", + "spatie/array-to-xml": "^2.17.0 || ^3.0", "symfony/console": "^4.1.6 || ^5.0 || ^6.0", "symfony/filesystem": "^5.4 || ^6.0" }, @@ -5176,14 +5015,15 @@ "psalm/psalm": "self.version" }, "require-dev": { + "amphp/phpunit-util": "^2.0", "bamarni/composer-bin-plugin": "^1.4", - "brianium/paratest": "^6.0", + "brianium/paratest": "^6.9", "ext-curl": "*", "mockery/mockery": "^1.5", "nunomaduro/mock-final-classes": "^1.1", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/phpdoc-parser": "^1.6", - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^9.6", "psalm/plugin-mockery": "^1.1", "psalm/plugin-phpunit": "^0.18", "slevomat/coding-standard": "^8.4", @@ -5229,34 +5069,35 @@ "keywords": [ "code", "inspection", - "php" + "php", + "static analysis" ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/5.6.0" + "source": "https://github.com/vimeo/psalm/tree/5.11.0" }, - "time": "2023-01-23T20:32:47+00:00" + "time": "2023-05-04T21:35:44+00:00" }, { "name": "webimpress/coding-standard", - "version": "1.2.4", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/webimpress/coding-standard.git", - "reference": "cd0c4b0b97440c337c1f7da17b524674ca2f9ca9" + "reference": "b26557e2386711ecb74f22718f4b4bde5ddbc899" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/cd0c4b0b97440c337c1f7da17b524674ca2f9ca9", - "reference": "cd0c4b0b97440c337c1f7da17b524674ca2f9ca9", + "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/b26557e2386711ecb74f22718f4b4bde5ddbc899", + "reference": "b26557e2386711ecb74f22718f4b4bde5ddbc899", "shasum": "" }, "require": { "php": "^7.3 || ^8.0", - "squizlabs/php_codesniffer": "^3.6.2" + "squizlabs/php_codesniffer": "^3.7.2" }, "require-dev": { - "phpunit/phpunit": "^9.5.13" + "phpunit/phpunit": "^9.6.4" }, "type": "phpcodesniffer-standard", "extra": { @@ -5282,7 +5123,7 @@ ], "support": { "issues": "https://github.com/webimpress/coding-standard/issues", - "source": "https://github.com/webimpress/coding-standard/tree/1.2.4" + "source": "https://github.com/webimpress/coding-standard/tree/1.3.1" }, "funding": [ { @@ -5290,7 +5131,7 @@ "type": "github" } ], - "time": "2022-02-15T19:52:12+00:00" + "time": "2023-03-09T15:05:18+00:00" }, { "name": "webimpress/safe-writer", @@ -5407,11 +5248,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + "php": "~8.1.0 || ~8.2.0" }, "platform-dev": [], "platform-overrides": { - "php": "8.0.99" + "php": "8.1.99" }, "plugin-api-version": "2.3.0" } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 86d1d007..13ed110b 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,26 +1,31 @@ - - - - ./src - - - - - ./test/ - - - - - disable - - - - - - - + + + + + ./test/ + + + + + + + + ./src + + diff --git a/psalm-baseline.xml b/psalm-baseline.xml index b2bb6a7f..8870c366 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,8 +1,8 @@ - + - null === $this->eventManager + eventManager]]> $eventManager @@ -52,12 +52,12 @@ $options instanceof Traversable - null === $this->extractionMethodsCache[$objectClass] + extractionMethodsCache[$objectClass]]]> $options - $options['methodExistsCheck'] - $options['underscoreSeparatedKeys'] + + $property @@ -68,15 +68,18 @@ $values[$realAttributeName] - $this->hydrationMethodsCache[$propertyFqn] + hydrationMethodsCache[$propertyFqn]]]> + + getMethodExistsCheck + HydratorInterface - $this->hydrators->get($object::class) + hydrators->get($object::class)]]> @@ -84,9 +87,9 @@ ContainerInterface - $container->get('HydratorManager') - $container->get('Zend\Hydrator\HydratorPluginManager') - $container->get(HydratorPluginManager::class) + get('HydratorManager')]]> + get('Zend\Hydrator\HydratorPluginManager')]]> + get(HydratorPluginManager::class)]]> @@ -99,6 +102,16 @@ $filter + + + hasFilter + + + + + HydratorAwareInterface + + ArraySerializable::class @@ -106,6 +119,22 @@ ObjectProperty::class Reflection::class + + $shareByDefault + + + + + + + + $name + + + + + getHydratorConfig + @@ -124,6 +153,9 @@ addServiceManager get + + Module + @@ -143,8 +175,8 @@ - $this->mbStringSupport === null - $this->pcreUnicodeSupport === null + mbStringSupport === null]]> + pcreUnicodeSupport === null]]> $mbStringSupport @@ -168,7 +200,7 @@ $value[0] - $pcreInfo->replacement + replacement]]> $matches[2] @@ -192,7 +224,7 @@ $value - $properties = &self::$skippedPropertiesCache[$object::class] + @@ -221,24 +253,16 @@ new $class() - - - T - - - $this->enumClass::from($value) - - - $this->enumClass - $value->value - string - + + + $container + - ! is_int($falseValue) && ! is_string($falseValue) - ! is_int($trueValue) && ! is_string($trueValue) - ! is_string($value) && ! is_int($value) + + + is_bool($value) @@ -248,7 +272,7 @@ - $this->objectClassName + objectClassName]]> is_array($value) @@ -287,7 +311,7 @@ - $this->objectClassName + objectClassName]]> gettype($value) @@ -308,7 +332,7 @@ iterator_to_array($serializerOptions) - null === $this->serializer + serializer]]> $serializerOptions @@ -324,6 +348,16 @@ $value + + + removeStrategy + + + + + getHydratorSet + + onExtract @@ -332,25 +366,30 @@ - 'thisIsNotAnObject' - 'thisIsNotAnObject' + + + + arrayDataProvider + + ArraySerializable::class new ArraySerializable() $options - 'invalid options' - 'non-object' - 'non-object' + + + + ClassMethods::class new ClassMethods() @@ -360,33 +399,54 @@ $orFilters - $andFilters $andFilters $andFilters $name $orFilters $orFilters - $orFilters $andFilters $orFilters $value - - - - HydratorAwareTrait::class - HydratorAwareTrait::class - - - getHydrator - getHydrator - getHydrator - getHydrator - setHydrator - setHydrator - + + invalidFiltersProvider + providerCompositionFiltering + validFiltersProvider + + + + + providerFilter + + + + + methodWithNoParameters + methodWithOptionalParameters + + + $parameter + + + + + methodProvider + methodWithMultipleMandatoryParameters + methodWithMultipleOptionalParameters + methodWithSingleMandatoryParameter + methodWithSingleOptionalParameter + methodWithoutParameters + + + $otherParameter + $otherParameter + $parameter + $parameter + $parameter + $parameter + @@ -421,7 +481,7 @@ removeStrategy - $entity->field3 + field3]]> @@ -431,12 +491,15 @@ - $attributes['entities'] - $attributes['entities'] + + - $attributes['entities'][] + + + underscoreHandlingDataProvider + addStrategy addStrategy @@ -467,17 +530,31 @@ $property $property + + filterProvider + - 'not a real class' + - 'not a real class' + + + + getTestedNames + + + + + invalidKeyArrays + invalidMapValues + + new CamelCaseToUnderscoreFilter() @@ -489,6 +566,11 @@ filter filter + + nonUnicodeProvider + unicodeProvider + unicodeProviderWithoutMbStrings + @@ -501,15 +583,21 @@ filter filter + + nonUnicodeProvider + unicodeProvider + unicodeWithoutMbStringsProvider + - 'thisIsNotAnObject' - 'thisIsNotAnObject' + + + ObjectProperty::class new ObjectProperty() @@ -521,6 +609,7 @@ + Reflection::class new Reflection() @@ -547,7 +636,6 @@ $factories - $factories[$class] $factories[Hydrator\DelegatingHydrator::class] @@ -555,36 +643,9 @@ $factories $instance - - - - TestBackedEnum::class - TestBackedEnum::class - TestBackedEnum::class - TestBackedEnum::class - TestBackedEnum::class - TestBackedEnum::class - - - $expected - - - TestBackedEnum::class - - - TestBackedEnum - TestBackedEnum - TestBackedEnum - TestBackedEnum - TestBackedEnum - TestBackedEnum - TestBackedEnum - TestBackedEnum - TestBackedEnum - TestBackedEnum - TestBackedEnum - TestUnitEnum - + + knownServices + @@ -606,6 +667,12 @@ hydrate + + providerInvalidObjectClassName + providerInvalidObjectForExtraction + providerInvalidValueForExtraction + providerInvalidValueForHydration + @@ -620,11 +687,24 @@ getName getTimezone + + formatsWithSpecialCharactersProvider + invalidValuesForHydration + validUnHydratableValues + format + + dataProviderForInvalidDateValues + + + + + getValidHydratedValues + @@ -642,6 +722,13 @@ hydrate + + providerEmptyOrSameObjects + providerInvalidObjectClassName + providerInvalidObjectForExtraction + providerInvalidValueForExtraction + providerInvalidValueForHydration + diff --git a/psalm.xml b/psalm.xml index bebd58a9..e7efa5b0 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,11 +1,13 @@ diff --git a/src/Exception/ExtensionNotLoadedException.php b/src/Exception/ExtensionNotLoadedException.php index 0659ea1f..250cd762 100644 --- a/src/Exception/ExtensionNotLoadedException.php +++ b/src/Exception/ExtensionNotLoadedException.php @@ -6,6 +6,10 @@ /** * Extension not loaded exception + * + * @deprecated This class is not used anywhere and will be removed in version 5.0 + * + * @psalm-suppress UnusedClass */ class ExtensionNotLoadedException extends RuntimeException { diff --git a/src/Exception/InvalidCallbackException.php b/src/Exception/InvalidCallbackException.php index 14d6dc2c..560f2f1a 100644 --- a/src/Exception/InvalidCallbackException.php +++ b/src/Exception/InvalidCallbackException.php @@ -6,6 +6,10 @@ /** * Invalid callback exception + * + * @deprecated This class is not used anywhere and will be removed in version 5.0 + * + * @psalm-suppress UnusedClass */ class InvalidCallbackException extends DomainException { diff --git a/src/Exception/LogicException.php b/src/Exception/LogicException.php index 64a9c398..e7dd3a7e 100644 --- a/src/Exception/LogicException.php +++ b/src/Exception/LogicException.php @@ -6,6 +6,10 @@ /** * Logic exception + * + * @deprecated This class is not used anywhere and will be removed in version 5.0 + * + * @psalm-suppress UnusedClass */ class LogicException extends \LogicException implements ExceptionInterface { diff --git a/src/HydratorPluginManager.php b/src/HydratorPluginManager.php index 6c276307..4f81e0e9 100644 --- a/src/HydratorPluginManager.php +++ b/src/HydratorPluginManager.php @@ -5,7 +5,6 @@ namespace Laminas\Hydrator; use Laminas\ServiceManager\AbstractPluginManager; -use Laminas\ServiceManager\ConfigInterface; use Laminas\ServiceManager\Exception\InvalidServiceException; use Laminas\ServiceManager\Factory\InvokableFactory; @@ -18,7 +17,6 @@ * * Enforces that adapters retrieved are instances of HydratorInterface * - * @psalm-import-type FactoriesConfigurationType from ConfigInterface * @extends AbstractPluginManager */ class HydratorPluginManager extends AbstractPluginManager implements HydratorPluginManagerInterface @@ -26,7 +24,7 @@ class HydratorPluginManager extends AbstractPluginManager implements HydratorPlu /** * Default aliases * - * @var string[] + * @inheritDoc */ protected $aliases = [ ArraySerializable::class => ArraySerializableHydrator::class, @@ -75,7 +73,7 @@ class HydratorPluginManager extends AbstractPluginManager implements HydratorPlu /** * Default factory-based adapters * - * @var FactoriesConfigurationType + * @inheritDoc */ protected $factories = [ ArraySerializableHydrator::class => InvokableFactory::class, diff --git a/src/HydratorPluginManagerFactory.php b/src/HydratorPluginManagerFactory.php index 8365f356..eb831845 100644 --- a/src/HydratorPluginManagerFactory.php +++ b/src/HydratorPluginManagerFactory.php @@ -34,7 +34,7 @@ class HydratorPluginManagerFactory */ public function __invoke(ContainerInterface $container, string $name, ?array $options = []): HydratorPluginManager { - if (! class_exists(Config::class)) { + if (! class_exists(ServiceManager::class)) { throw new Exception\DomainException(sprintf( '%s requires the laminas/laminas-servicemanager package, which is not installed.' . ' If you do not want to install that package, you can use the %s instead;' diff --git a/src/ReflectionHydrator.php b/src/ReflectionHydrator.php index 84d7adfc..97187434 100644 --- a/src/ReflectionHydrator.php +++ b/src/ReflectionHydrator.php @@ -73,7 +73,6 @@ protected static function getReflProperties(object $input): array $reflProperties = $reflClass->getProperties(); foreach ($reflProperties as $property) { - $property->setAccessible(true); static::$reflProperties[$class][$property->getName()] = $property; } diff --git a/src/StandaloneHydratorPluginManager.php b/src/StandaloneHydratorPluginManager.php index 3bbcf5f1..bf614667 100644 --- a/src/StandaloneHydratorPluginManager.php +++ b/src/StandaloneHydratorPluginManager.php @@ -66,7 +66,6 @@ final class StandaloneHydratorPluginManager implements HydratorPluginManagerInte public function __construct() { - /** @psalm-suppress UnusedClosureParam */ $invokableFactory = static fn(ContainerInterface $container, string $class): object => new $class(); $this->factories = [ diff --git a/test/Aggregate/AggregateHydratorFunctionalTest.php b/test/Aggregate/AggregateHydratorFunctionalTest.php index 0d903b5a..b71db64b 100644 --- a/test/Aggregate/AggregateHydratorFunctionalTest.php +++ b/test/Aggregate/AggregateHydratorFunctionalTest.php @@ -12,12 +12,12 @@ use Laminas\Hydrator\ClassMethodsHydrator; use Laminas\Hydrator\HydratorInterface; use LaminasTest\Hydrator\TestAsset\AggregateObject; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use stdClass; -/** - * Integration tests {@see AggregateHydrator} - */ +#[CoversClass(AggregateHydrator::class)] class AggregateHydratorFunctionalTest extends TestCase { protected AggregateHydrator $hydrator; @@ -45,9 +45,8 @@ public function testEmptyAggregate(): void /** * Verifies that using a single hydrator will have the aggregate hydrator behave like that single hydrator - * - * @dataProvider getHydratorSet */ + #[DataProvider('getHydratorSet')] public function testSingleHydratorExtraction(HydratorInterface $comparisonHydrator, object $object): void { $blueprint = clone $object; @@ -59,9 +58,8 @@ public function testSingleHydratorExtraction(HydratorInterface $comparisonHydrat /** * Verifies that using a single hydrator will have the aggregate hydrator behave like that single hydrator - * - * @dataProvider getHydratorSet */ + #[DataProvider('getHydratorSet')] public function testSingleHydratorHydration( HydratorInterface $comparisonHydrator, object $object, @@ -163,7 +161,7 @@ public function testStoppedPropagationInHydration(): void * * @return list */ - public function getHydratorSet(): array + public static function getHydratorSet(): array { return [ [new ArraySerializableHydrator(), new ArrayObject(['zaphod' => 'beeblebrox']), ['arthur' => 'dent']], diff --git a/test/Aggregate/AggregateHydratorTest.php b/test/Aggregate/AggregateHydratorTest.php index f2529456..07d39669 100644 --- a/test/Aggregate/AggregateHydratorTest.php +++ b/test/Aggregate/AggregateHydratorTest.php @@ -9,27 +9,17 @@ use Laminas\Hydrator\Aggregate\ExtractEvent; use Laminas\Hydrator\Aggregate\HydrateEvent; use Laminas\Hydrator\HydratorInterface; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use stdClass; -/** - * Unit tests for {@see AggregateHydrator} - */ +#[CoversClass(AggregateHydrator::class)] class AggregateHydratorTest extends TestCase { - /** @var AggregateHydrator */ - protected $hydrator; - - /** - * @var EventManager|MockObject - * @psalm-var EventManager&MockObject - */ - protected $eventManager; - - /** - * {@inheritDoc} - */ + protected AggregateHydrator $hydrator; + protected EventManager&MockObject $eventManager; + protected function setUp(): void { $this->eventManager = $this->createMock(EventManager::class); @@ -38,27 +28,38 @@ protected function setUp(): void $this->hydrator->setEventManager($this->eventManager); } - /** - * @covers \Laminas\Hydrator\Aggregate\AggregateHydrator::add - */ public function testAdd(): void { $attached = $this->createMock(HydratorInterface::class); $this->eventManager - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('attach') - ->withConsecutive( - [HydrateEvent::EVENT_HYDRATE, $this->isType('callable'), 123], - [ExtractEvent::EVENT_EXTRACT, $this->isType('callable'), 123], + ->with( + self::callback(function (mixed $event): bool { + self::assertIsString($event); + self::assertContains($event, [ + HydrateEvent::EVENT_HYDRATE, + ExtractEvent::EVENT_EXTRACT, + ]); + + return true; + }), + self::callback(function (mixed $listener): bool { + self::assertIsCallable($listener); + + return true; + }), + self::callback(function (mixed $priority): bool { + self::assertSame(123, $priority); + + return true; + }), ); $this->hydrator->add($attached, 123); } - /** - * @covers \Laminas\Hydrator\Aggregate\AggregateHydrator::hydrate - */ public function testHydrate(): void { $object = new stdClass(); @@ -71,9 +72,6 @@ public function testHydrate(): void $this->assertSame($object, $this->hydrator->hydrate(['foo' => 'bar'], $object)); } - /** - * @covers \Laminas\Hydrator\Aggregate\AggregateHydrator::extract - */ public function testExtract(): void { $object = new stdClass(); @@ -86,10 +84,6 @@ public function testExtract(): void $this->assertSame([], $this->hydrator->extract($object)); } - /** - * @covers \Laminas\Hydrator\Aggregate\AggregateHydrator::getEventManager - * @covers \Laminas\Hydrator\Aggregate\AggregateHydrator::setEventManager - */ public function testGetSetManager(): void { $hydrator = new AggregateHydrator(); diff --git a/test/Aggregate/ExtractEventTest.php b/test/Aggregate/ExtractEventTest.php index 9bc9f3e2..a30faaf4 100644 --- a/test/Aggregate/ExtractEventTest.php +++ b/test/Aggregate/ExtractEventTest.php @@ -5,17 +5,13 @@ namespace LaminasTest\Hydrator\Aggregate; use Laminas\Hydrator\Aggregate\ExtractEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use stdClass; -/** - * Unit tests for {@see ExtractEvent} - */ +#[CoversClass(ExtractEvent::class)] class ExtractEventTest extends TestCase { - /** - * @covers \Laminas\Hydrator\Aggregate\ExtractEvent - */ public function testEvent(): void { $target = new stdClass(); diff --git a/test/Aggregate/HydrateEventTest.php b/test/Aggregate/HydrateEventTest.php index 4dd103a3..96f20816 100644 --- a/test/Aggregate/HydrateEventTest.php +++ b/test/Aggregate/HydrateEventTest.php @@ -5,17 +5,13 @@ namespace LaminasTest\Hydrator\Aggregate; use Laminas\Hydrator\Aggregate\HydrateEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use stdClass; -/** - * Unit tests for {@see HydrateEvent} - */ +#[CoversClass(HydrateEvent::class)] class HydrateEventTest extends TestCase { - /** - * @covers \Laminas\Hydrator\Aggregate\HydrateEvent - */ public function testEvent(): void { $target = new stdClass(); diff --git a/test/Aggregate/HydratorListenerTest.php b/test/Aggregate/HydratorListenerTest.php index b84fbdc0..fa4ea755 100644 --- a/test/Aggregate/HydratorListenerTest.php +++ b/test/Aggregate/HydratorListenerTest.php @@ -9,35 +9,23 @@ use Laminas\Hydrator\Aggregate\HydrateEvent; use Laminas\Hydrator\Aggregate\HydratorListener; use Laminas\Hydrator\HydratorInterface; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use stdClass; -/** - * Unit tests for {@see HydratorListener} - */ +#[CoversClass(HydratorListener::class)] class HydratorListenerTest extends TestCase { - /** @var HydratorInterface&MockObject */ - protected $hydrator; + private HydratorInterface&MockObject $hydrator; + private HydratorListener $listener; - /** @var HydratorListener */ - protected $listener; - - /** - * {@inheritDoc} - * - * @covers \Laminas\Hydrator\Aggregate\HydratorListener::__construct - */ protected function setUp(): void { $this->hydrator = $this->createMock(HydratorInterface::class); $this->listener = new HydratorListener($this->hydrator); } - /** - * @covers \Laminas\Hydrator\Aggregate\HydratorListener::attach - */ public function testAttach(): void { $eventManager = $this->createMock(EventManagerInterface::class); @@ -56,9 +44,6 @@ public function testAttach(): void $this->listener->attach($eventManager); } - /** - * @covers \Laminas\Hydrator\Aggregate\HydratorListener::onHydrate - */ public function testOnHydrate(): void { $object = new stdClass(); @@ -83,9 +68,6 @@ public function testOnHydrate(): void $this->assertSame($hydrated, $this->listener->onHydrate($event)); } - /** - * @covers \Laminas\Hydrator\Aggregate\HydratorListener::onExtract - */ public function testOnExtract(): void { $object = new stdClass(); diff --git a/test/ArraySerializableHydratorTest.php b/test/ArraySerializableHydratorTest.php index 807596b5..10e1cfe3 100644 --- a/test/ArraySerializableHydratorTest.php +++ b/test/ArraySerializableHydratorTest.php @@ -8,16 +8,15 @@ use Laminas\Hydrator\ArraySerializableHydrator; use LaminasTest\Hydrator\TestAsset\ArraySerializable as ArraySerializableAsset; use LaminasTest\Hydrator\TestAsset\ArraySerializableNoGetArrayCopy; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; use TypeError; use function array_merge; -/** - * Unit tests for {@see ArraySerializableHydrator} - * - * @covers \Laminas\Hydrator\ArraySerializableHydrator - */ +#[CoversClass(ArraySerializableHydrator::class)] class ArraySerializableHydratorTest extends TestCase { use HydratorTestTrait; @@ -89,9 +88,8 @@ public function testCanHydrateToArraySerializableObject(): void * Verifies that when an object already has properties, * these properties are preserved when it's hydrated with new data * existing properties should get overwritten - * - * @group 65 */ + #[Group('65')] public function testWillPreserveOriginalPropsAtHydration(): void { $original = new ArraySerializableAsset(); @@ -110,9 +108,8 @@ public function testWillPreserveOriginalPropsAtHydration(): void /** * To preserve backwards compatibility, if getArrayCopy() is not implemented * by the to-be hydrated object, simply exchange the array - * - * @group 65 */ + #[Group('65')] public function testWillReplaceArrayIfNoGetArrayCopy(): void { $original = new ArraySerializableNoGetArrayCopy(); @@ -131,7 +128,7 @@ public function testWillReplaceArrayIfNoGetArrayCopy(): void * @return string[][][] * @psalm-return array */ - public function arrayDataProvider(): array + public static function arrayDataProvider(): array { // @codingStandardsIgnoreStart return [ @@ -150,12 +147,12 @@ public function arrayDataProvider(): array * one _removes_ data, then no change occurs. Ideally, in these cases, the * submitted value should _replace_ the original. * - * @group 66 - * @dataProvider arrayDataProvider * @param string[] $start * @param string[] $submit * @param string[] $expected */ + #[DataProvider('arrayDataProvider')] + #[Group('66')] public function testHydrationWillReplaceNestedArrayData( array $start, array $submit, diff --git a/test/ArraySerializableTest.php b/test/ArraySerializableTest.php index e4e5dfc5..5069f88f 100644 --- a/test/ArraySerializableTest.php +++ b/test/ArraySerializableTest.php @@ -6,6 +6,7 @@ use Laminas\Hydrator\ArraySerializable; use Laminas\Hydrator\ArraySerializableHydrator; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use function restore_error_handler; @@ -13,6 +14,7 @@ use const E_USER_DEPRECATED; +#[CoversClass(ArraySerializable::class)] class ArraySerializableTest extends TestCase { public function testTriggerUserDeprecatedError(): void @@ -22,7 +24,6 @@ public function testTriggerUserDeprecatedError(): void public $message = false; }; - /** @psalm-suppress UnusedClosureParam */ set_error_handler(static function ($errno, $errstr) use ($test): bool { $test->message = $errstr; return true; diff --git a/test/ClassMethodsHydratorTest.php b/test/ClassMethodsHydratorTest.php index abb88e58..15e2c157 100644 --- a/test/ClassMethodsHydratorTest.php +++ b/test/ClassMethodsHydratorTest.php @@ -10,14 +10,11 @@ use LaminasTest\Hydrator\TestAsset\ClassMethodsCamelCase; use LaminasTest\Hydrator\TestAsset\ClassMethodsCamelCaseMissing; use LaminasTest\Hydrator\TestAsset\ClassMethodsOptionalParameters; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use TypeError; -/** - * Unit tests for {@see ClassMethodsHydrator} - * - * @covers \Laminas\Hydrator\ClassMethodsHydrator - */ +#[CoversClass(ClassMethodsHydrator::class)] class ClassMethodsHydratorTest extends TestCase { use HydratorTestTrait; diff --git a/test/ClassMethodsTest.php b/test/ClassMethodsTest.php index 20b1e8ec..6112ed80 100644 --- a/test/ClassMethodsTest.php +++ b/test/ClassMethodsTest.php @@ -6,6 +6,7 @@ use Laminas\Hydrator\ClassMethods; use Laminas\Hydrator\ClassMethodsHydrator; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use function restore_error_handler; @@ -13,6 +14,7 @@ use const E_USER_DEPRECATED; +#[CoversClass(ClassMethods::class)] class ClassMethodsTest extends TestCase { public function testTriggerUserDeprecatedError(): void @@ -22,7 +24,6 @@ public function testTriggerUserDeprecatedError(): void public $message = false; }; - /** @psalm-suppress UnusedClosureParam */ set_error_handler(static function ($errno, $errstr) use ($test): bool { $test->message = $errstr; return true; diff --git a/test/DelegatingHydratorFactoryTest.php b/test/DelegatingHydratorFactoryTest.php index 3d4f8622..9c65b7f1 100644 --- a/test/DelegatingHydratorFactoryTest.php +++ b/test/DelegatingHydratorFactoryTest.php @@ -7,13 +7,13 @@ use Laminas\Hydrator\DelegatingHydrator; use Laminas\Hydrator\DelegatingHydratorFactory; use Laminas\Hydrator\HydratorPluginManager; +use LaminasTest\Hydrator\TestAsset\InMemoryContainer; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Psr\Container\ContainerInterface; use ReflectionProperty; -/** - * @covers Laminas\Hydrator\DelegatingHydratorFactory - */ +#[CoversClass(DelegatingHydratorFactory::class)] class DelegatingHydratorFactoryTest extends TestCase { public function testFactoryUsesContainerToSeedDelegatingHydratorWhenItIsAHydratorPluginManager(): void @@ -43,22 +43,8 @@ public function testFactoryUsesHydratorPluginManagerServiceFromContainerToSeedDe public function testFactoryUsesHydratorManagerServiceFromContainerToSeedDelegatingHydratorWhenAvailable(): void { $hydrators = $this->createMock(HydratorPluginManager::class); - $container = $this->createMock(ContainerInterface::class); - $container - ->expects($this->exactly(3)) - ->method('has') - ->withConsecutive( - [HydratorPluginManager::class], - ['Zend\Hydrator\HydratorPluginManager'], - ['HydratorManager'] - ) - ->willReturnOnConsecutiveCalls( - false, - false, - true - ); - $container->expects($this->once())->method('get')->with('HydratorManager')->willReturn($hydrators); - + $container = new InMemoryContainer(); + $container->set('HydratorManager', $hydrators); $factory = new DelegatingHydratorFactory(); $hydrator = $factory($container); @@ -67,29 +53,13 @@ public function testFactoryUsesHydratorManagerServiceFromContainerToSeedDelegati public function testFactoryCreatesHydratorPluginManagerToSeedDelegatingHydratorAsFallback(): void { - $container = $this->createMock(ContainerInterface::class); - $container - ->expects($this->exactly(3)) - ->method('has') - ->withConsecutive( - [HydratorPluginManager::class], - ['Zend\Hydrator\HydratorPluginManager'], - ['HydratorManager'] - ) - ->willReturnOnConsecutiveCalls( - false, - false, - false - ); - $container->expects($this->never())->method('get'); - - $factory = new DelegatingHydratorFactory(); + $container = new InMemoryContainer(); + $factory = new DelegatingHydratorFactory(); $hydrator = $factory($container); $this->assertInstanceOf(DelegatingHydrator::class, $hydrator); - $r = new ReflectionProperty($hydrator, 'hydrators'); - $r->setAccessible(true); + $r = new ReflectionProperty($hydrator, 'hydrators'); $hydrators = $r->getValue($hydrator); $this->assertInstanceOf(HydratorPluginManager::class, $hydrators); diff --git a/test/DelegatingHydratorTest.php b/test/DelegatingHydratorTest.php index d42af9eb..8e8a5678 100644 --- a/test/DelegatingHydratorTest.php +++ b/test/DelegatingHydratorTest.php @@ -7,15 +7,12 @@ use ArrayObject; use Laminas\Hydrator\DelegatingHydrator; use Laminas\Hydrator\HydratorInterface; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Psr\Container\ContainerInterface; -/** - * Unit tests for {@see DelegatingHydrator} - * - * @covers \Laminas\Hydrator\DelegatingHydrator - */ +#[CoversClass(DelegatingHydrator::class)] class DelegatingHydratorTest extends TestCase { /** @var DelegatingHydrator */ diff --git a/test/Filter/FilterCompositeTest.php b/test/Filter/FilterCompositeTest.php index a70d079e..97923841 100644 --- a/test/Filter/FilterCompositeTest.php +++ b/test/Filter/FilterCompositeTest.php @@ -12,21 +12,17 @@ use Laminas\Hydrator\Filter\HasFilter; use Laminas\Hydrator\Filter\IsFilter; use Laminas\Hydrator\Filter\NumberOfParameterFilter; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use function array_keys; use function sprintf; -/** - * Unit tests for {@see FilterComposite} - * - * @covers \Laminas\Hydrator\Filter\FilterComposite - */ +#[CoversClass(FilterComposite::class)] class FilterCompositeTest extends TestCase { - /** - * @dataProvider validFiltersProvider - */ + #[DataProvider('validFiltersProvider')] public function testFilters(array $orFilters, array $andFilters): void { $filter = new FilterComposite($orFilters, $andFilters); @@ -37,7 +33,7 @@ public function testFilters(array $orFilters, array $andFilters): void } /** @return list */ - public function validFiltersProvider(): array + public static function validFiltersProvider(): array { return [ [ @@ -58,7 +54,7 @@ public function validFiltersProvider(): array } /** @return list */ - public function invalidFiltersProvider(): array + public static function invalidFiltersProvider(): array { $callback = static fn(): bool => true; @@ -91,9 +87,7 @@ public function invalidFiltersProvider(): array ]; } - /** - * @dataProvider invalidFiltersProvider - */ + #[DataProvider('invalidFiltersProvider')] public function testConstructWithInvalidFilter(array $orFilters, array $andFilters, string $expectedKey): void { $this->expectException(InvalidArgumentException::class); @@ -112,7 +106,11 @@ public function testNoFilters(): void self::assertTrue($filter->filter('any_value')); } - private function buildFilters(array $values): array + /** + * @param array $values + * @return list + */ + private static function buildFilters(array $values): array { $filters = []; foreach ($values as $value) { @@ -132,9 +130,13 @@ public function filter(string $property, ?object $instance = null): bool } /** - * @psalm-return Generator + * @psalm-return Generator, + * andFilters: list, + * expected: bool, + * }, mixed, void> */ - private function generateFilters( + private static function generateFilters( array $orCompositionFilters, array $andCompositionFilters, bool $expected @@ -142,8 +144,8 @@ private function generateFilters( foreach ($orCompositionFilters as $orFilters) { foreach ($andCompositionFilters as $andFilters) { yield [ - 'orFilters' => $this->buildFilters($orFilters), // boolean sum : true - 'andFilters' => $this->buildFilters($andFilters), + 'orFilters' => self::buildFilters($orFilters), // boolean sum : true + 'andFilters' => self::buildFilters($andFilters), 'expected' => $expected, ]; } @@ -153,7 +155,7 @@ private function generateFilters( /** * @psalm-return Generator */ - public function providerCompositionFiltering(): Generator + public static function providerCompositionFiltering(): Generator { $orCompositionFilters = [ 'truthy' => [ @@ -183,22 +185,22 @@ public function providerCompositionFiltering(): Generator ], ]; - yield from $this->generateFilters( + yield from self::generateFilters( $orCompositionFilters['truthy'], $andCompositionFilters['truthy'], true ); - yield from $this->generateFilters( + yield from self::generateFilters( $orCompositionFilters['truthy'], $andCompositionFilters['falsy'], false ); - yield from $this->generateFilters( + yield from self::generateFilters( $orCompositionFilters['falsy'], $andCompositionFilters['truthy'], false ); - yield from $this->generateFilters( + yield from self::generateFilters( $orCompositionFilters['falsy'], $andCompositionFilters['falsy'], false @@ -206,8 +208,10 @@ public function providerCompositionFiltering(): Generator } /** - * @dataProvider providerCompositionFiltering + * @param list $orFilters + * @param list $andFilters */ + #[DataProvider('providerCompositionFiltering')] public function testCompositionFiltering(array $orFilters, array $andFilters, bool $expected): void { $filter = new FilterComposite($orFilters, $andFilters); diff --git a/test/Filter/MethodMatchFilterTest.php b/test/Filter/MethodMatchFilterTest.php index 9373e6b0..eb72e56e 100644 --- a/test/Filter/MethodMatchFilterTest.php +++ b/test/Filter/MethodMatchFilterTest.php @@ -5,15 +5,18 @@ namespace LaminasTest\Hydrator\Filter; use Laminas\Hydrator\Filter\MethodMatchFilter; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; +#[CoversClass(MethodMatchFilter::class)] class MethodMatchFilterTest extends TestCase { /** * @return (bool|string)[][] * @psalm-return list */ - public function providerFilter(): array + public static function providerFilter(): array { return [ ['foo', true], @@ -23,9 +26,7 @@ public function providerFilter(): array ]; } - /** - * @dataProvider providerFilter - */ + #[DataProvider('providerFilter')] public function testFilter(string $methodName, bool $expected): void { $testedInstance = new MethodMatchFilter('foo', false); diff --git a/test/Filter/NumberOfParameterFilterTest.php b/test/Filter/NumberOfParameterFilterTest.php index 1a90e9b6..500628a9 100644 --- a/test/Filter/NumberOfParameterFilterTest.php +++ b/test/Filter/NumberOfParameterFilterTest.php @@ -6,18 +6,14 @@ use Laminas\Hydrator\Exception\InvalidArgumentException; use Laminas\Hydrator\Filter\NumberOfParameterFilter; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; -/** - * Unit tests for {@see NumberOfParameterFilter} - * - * @covers \Laminas\Hydrator\Filter\NumberOfParameterFilter - */ +#[CoversClass(NumberOfParameterFilter::class)] class NumberOfParameterFilterTest extends TestCase { - /** - * @group 6083 - */ + #[Group('6083')] public function testArityZero(): void { $filter = new NumberOfParameterFilter(); @@ -25,9 +21,7 @@ public function testArityZero(): void $this->assertFalse($filter->filter(self::class . '::methodWithOptionalParameters')); } - /** - * @group 6083 - */ + #[Group('6083')] public function testArityOne(): void { $filter = new NumberOfParameterFilter(1); diff --git a/test/Filter/OptionalParametersFilterTest.php b/test/Filter/OptionalParametersFilterTest.php index fb109917..e6ba7270 100644 --- a/test/Filter/OptionalParametersFilterTest.php +++ b/test/Filter/OptionalParametersFilterTest.php @@ -6,13 +6,11 @@ use InvalidArgumentException; use Laminas\Hydrator\Filter\OptionalParametersFilter; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -/** - * Unit tests for {@see OptionalParametersFilter} - * - * @covers \Laminas\Hydrator\Filter\OptionalParametersFilter - */ +#[CoversClass(OptionalParametersFilter::class)] class OptionalParametersFilterTest extends TestCase { /** @var OptionalParametersFilter */ @@ -28,9 +26,8 @@ protected function setUp(): void /** * Verifies a list of methods against expected results - * - * @dataProvider methodProvider */ + #[DataProvider('methodProvider')] public function testMethods(string $method, bool $expectedResult): void { $this->assertSame($expectedResult, $this->filter->filter($method)); @@ -39,9 +36,8 @@ public function testMethods(string $method, bool $expectedResult): void /** * Verifies a list of methods against expected results over subsequent calls, checking * that the filter behaves consistently regardless of cache optimizations - * - * @dataProvider methodProvider */ + #[DataProvider('methodProvider')] public function testMethodsOnSubsequentCalls(string $method, bool $expectedResult): void { for ($i = 0; $i < 5; $i += 1) { @@ -63,7 +59,7 @@ public function testTriggersExceptionOnUnknownMethod(): void * 1: bool * }> */ - public function methodProvider(): array + public static function methodProvider(): array { return [ [self::class . '::methodWithoutParameters', true], diff --git a/test/HydratorAwareTraitTest.php b/test/HydratorAwareTraitTest.php index 6b8cf3f4..dba7b488 100644 --- a/test/HydratorAwareTraitTest.php +++ b/test/HydratorAwareTraitTest.php @@ -4,38 +4,27 @@ namespace LaminasTest\Hydrator; -use Laminas\Hydrator\AbstractHydrator; -use Laminas\Hydrator\HydratorAwareTrait; +use Laminas\Hydrator\HydratorInterface; +use LaminasTest\Hydrator\TestAsset\HydratorAwareTraitImplementor; use PHPUnit\Framework\TestCase; -/** - * @covers Laminas\Hydrator\HydratorAwareTrait - */ class HydratorAwareTraitTest extends TestCase { public function testSetHydrator(): void { - $object = $this->getObjectForTrait(HydratorAwareTrait::class); - - $this->assertSame(null, $object->getHydrator()); - - $hydrator = $this->getMockForAbstractClass(AbstractHydrator::class); - + $object = new HydratorAwareTraitImplementor(); + self::assertNull($object->getHydrator()); + $hydrator = $this->createMock(HydratorInterface::class); $object->setHydrator($hydrator); - - $this->assertSame($hydrator, $object->getHydrator()); + self::assertSame($hydrator, $object->getHydrator()); } public function testGetHydrator(): void { - $object = $this->getObjectForTrait(HydratorAwareTrait::class); - - $this->assertNull($object->getHydrator()); - - $hydrator = $this->getMockForAbstractClass(AbstractHydrator::class); - + $object = new HydratorAwareTraitImplementor(); + self::assertNull($object->getHydrator()); + $hydrator = $this->createMock(HydratorInterface::class); $object->setHydrator($hydrator); - - $this->assertEquals($hydrator, $object->getHydrator()); + self::assertSame($hydrator, $object->getHydrator()); } } diff --git a/test/HydratorClosureStrategyTest.php b/test/HydratorClosureStrategyTest.php index 08a456dc..ef4da0aa 100644 --- a/test/HydratorClosureStrategyTest.php +++ b/test/HydratorClosureStrategyTest.php @@ -7,10 +7,12 @@ use Laminas\Hydrator\HydratorInterface; use Laminas\Hydrator\ObjectPropertyHydrator; use Laminas\Hydrator\Strategy\ClosureStrategy; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use function sprintf; +#[CoversClass(ClosureStrategy::class)] class HydratorClosureStrategyTest extends TestCase { /** diff --git a/test/HydratorObjectPropertyTest.php b/test/HydratorObjectPropertyTest.php index fdf1ab0c..f7a343ea 100644 --- a/test/HydratorObjectPropertyTest.php +++ b/test/HydratorObjectPropertyTest.php @@ -5,8 +5,10 @@ namespace LaminasTest\Hydrator; use Laminas\Hydrator\ObjectPropertyHydrator; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +#[CoversClass(ObjectPropertyHydrator::class)] class HydratorObjectPropertyTest extends TestCase { private ObjectPropertyHydrator $hydrator; diff --git a/test/HydratorPluginManagerCompatibilityTest.php b/test/HydratorPluginManagerCompatibilityTest.php index c6edd414..9bbf6a8a 100644 --- a/test/HydratorPluginManagerCompatibilityTest.php +++ b/test/HydratorPluginManagerCompatibilityTest.php @@ -8,14 +8,16 @@ use Laminas\Hydrator\HydratorPluginManager; use Laminas\ServiceManager\ServiceManager; use Laminas\ServiceManager\Test\CommonPluginManagerTrait; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +#[CoversClass(HydratorPluginManager::class)] class HydratorPluginManagerCompatibilityTest extends TestCase { use CommonPluginManagerTrait; /** @return HydratorPluginManager */ - protected function getPluginManager() + protected static function getPluginManager() { return new HydratorPluginManager(new ServiceManager()); } diff --git a/test/HydratorPluginManagerFactoryTest.php b/test/HydratorPluginManagerFactoryTest.php index 7bd92cb6..3df5aa80 100644 --- a/test/HydratorPluginManagerFactoryTest.php +++ b/test/HydratorPluginManagerFactoryTest.php @@ -8,10 +8,13 @@ use Laminas\Hydrator\HydratorPluginManager; use Laminas\Hydrator\HydratorPluginManagerFactory; use Laminas\Hydrator\ReflectionHydrator; -use Laminas\ServiceManager\ServiceLocatorInterface; +use LaminasTest\Hydrator\TestAsset\InMemoryContainer; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Depends; use PHPUnit\Framework\TestCase; use Psr\Container\ContainerInterface; +#[CoversClass(HydratorPluginManagerFactory::class)] class HydratorPluginManagerFactoryTest extends TestCase { public function testFactoryReturnsPluginManager(): void @@ -23,9 +26,7 @@ public function testFactoryReturnsPluginManager(): void $this->assertInstanceOf(HydratorPluginManager::class, $hydrators); } - /** - * @depends testFactoryReturnsPluginManager - */ + #[Depends('testFactoryReturnsPluginManager')] public function testFactoryConfiguresPluginManagerUnderContainerInterop(): void { $container = $this->createMock(ContainerInterface::class); @@ -42,8 +43,8 @@ public function testFactoryConfiguresPluginManagerUnderContainerInterop(): void public function testConfiguresHydratorServicesWhenFound(): void { - $hydrator = $this->createMock(HydratorInterface::class); - $config = [ + $hydrator = $this->createMock(HydratorInterface::class); + $config = [ 'hydrators' => [ 'aliases' => [ 'test' => ReflectionHydrator::class, @@ -54,24 +55,8 @@ public function testConfiguresHydratorServicesWhenFound(): void ], ], ]; - - $container = $this->createMock(ServiceLocatorInterface::class); - $container - ->expects($this->exactly(2)) - ->method('has') - ->withConsecutive( - ['ServiceListener'], - ['config'] - ) - ->willReturnOnConsecutiveCalls( - false, - true - ); - $container - ->expects($this->once()) - ->method('get') - ->with('config') - ->willReturn($config); + $container = new InMemoryContainer(); + $container->set('config', $config); $factory = new HydratorPluginManagerFactory(); $hydrators = $factory($container, 'HydratorManager'); @@ -85,22 +70,7 @@ public function testConfiguresHydratorServicesWhenFound(): void public function testDoesNotConfigureHydratorServicesWhenServiceListenerPresent(): void { - $container = $this->createMock(ServiceLocatorInterface::class); - $container - ->expects($this->exactly(2)) - ->method('has') - ->withConsecutive( - ['ServiceListener'], - ['config'] - ) - ->willReturnOnConsecutiveCalls( - false, - false - ); - $container - ->expects($this->never()) - ->method('get'); - + $container = new InMemoryContainer(); $factory = new HydratorPluginManagerFactory(); $hydrators = $factory($container, 'HydratorManager'); @@ -111,22 +81,7 @@ public function testDoesNotConfigureHydratorServicesWhenServiceListenerPresent() public function testDoesNotConfigureHydratorServicesWhenConfigServiceNotPresent(): void { - $container = $this->createMock(ServiceLocatorInterface::class); - $container - ->expects($this->exactly(2)) - ->method('has') - ->withConsecutive( - ['ServiceListener'], - ['config'] - ) - ->willReturnOnConsecutiveCalls( - false, - false - ); - $container - ->expects($this->never()) - ->method('get'); - + $container = new InMemoryContainer(); $factory = new HydratorPluginManagerFactory(); $hydrators = $factory($container, 'HydratorManager'); @@ -135,23 +90,8 @@ public function testDoesNotConfigureHydratorServicesWhenConfigServiceNotPresent( public function testDoesNotConfigureHydratorServicesWhenConfigServiceDoesNotContainHydratorsConfig(): void { - $container = $this->createMock(ServiceLocatorInterface::class); - $container - ->expects($this->exactly(2)) - ->method('has') - ->withConsecutive( - ['ServiceListener'], - ['config'] - ) - ->willReturnOnConsecutiveCalls( - false, - true - ); - $container - ->expects($this->once()) - ->method('get') - ->with('config') - ->willReturn(['foo' => 'bar']); + $container = new InMemoryContainer(); + $container->set('config', ['foo' => 'bar']); $factory = new HydratorPluginManagerFactory(); $hydrators = $factory($container, 'HydratorManager'); diff --git a/test/HydratorStrategyTest.php b/test/HydratorStrategyTest.php index 9aca7141..439cacce 100644 --- a/test/HydratorStrategyTest.php +++ b/test/HydratorStrategyTest.php @@ -7,6 +7,7 @@ use Laminas\Hydrator\ClassMethodsHydrator; use Laminas\Hydrator\HydratorInterface; use Laminas\Hydrator\Strategy\StrategyInterface; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class HydratorStrategyTest extends TestCase @@ -92,9 +93,7 @@ public function testHydratingObjects(): void $this->assertCount(3, $entities); } - /** - * @dataProvider underscoreHandlingDataProvider - */ + #[DataProvider('underscoreHandlingDataProvider')] public function testWhenUsingUnderscoreSeparatedKeysHydratorStrategyIsAlwaysConsideredUnderscoreSeparatedToo( bool $underscoreSeparatedKeys, string $formFieldKey @@ -131,7 +130,7 @@ public function testWhenUsingUnderscoreSeparatedKeysHydratorStrategyIsAlwaysCons * 1: string * }> */ - public function underscoreHandlingDataProvider(): array + public static function underscoreHandlingDataProvider(): array { return [ [true, 'foo_bar'], diff --git a/test/HydratorTest.php b/test/HydratorTest.php index 5f4da419..93e4d64c 100644 --- a/test/HydratorTest.php +++ b/test/HydratorTest.php @@ -24,6 +24,7 @@ use LaminasTest\Hydrator\TestAsset\ObjectProperty as ObjectPropertyAsset; use LaminasTest\Hydrator\TestAsset\Reflection as ReflectionAsset; use LaminasTest\Hydrator\TestAsset\ReflectionFilter; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use function explode; @@ -371,9 +372,7 @@ static function ($property): bool { self::assertArrayNotHaskey('hasFoo', $datas); } - /** - * @dataProvider filterProvider - */ + #[DataProvider('filterProvider')] public function testArraySerializableFilter( AbstractHydrator $hydrator, object $serializable @@ -436,7 +435,7 @@ public function testArraySerializableFilter( /** * @psalm-return list */ - public function filterProvider(): array + public static function filterProvider(): array { return [ [new ObjectPropertyHydrator(), new ObjectPropertyAsset()], diff --git a/test/Iterator/HydratingArrayIteratorTest.php b/test/Iterator/HydratingArrayIteratorTest.php index 9e58d7e4..4cd2a790 100644 --- a/test/Iterator/HydratingArrayIteratorTest.php +++ b/test/Iterator/HydratingArrayIteratorTest.php @@ -8,11 +8,10 @@ use Laminas\Hydrator\ArraySerializableHydrator; use Laminas\Hydrator\Exception\InvalidArgumentException; use Laminas\Hydrator\Iterator\HydratingArrayIterator; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers Laminas\Hydrator\Iterator\HydratingArrayIterator - */ +#[CoversClass(HydratingArrayIterator::class)] class HydratingArrayIteratorTest extends TestCase { public function testHydratesObjectAndClonesOnCurrent(): void diff --git a/test/Iterator/HydratingIteratorIteratorTest.php b/test/Iterator/HydratingIteratorIteratorTest.php index ce6cf7b7..bb772036 100644 --- a/test/Iterator/HydratingIteratorIteratorTest.php +++ b/test/Iterator/HydratingIteratorIteratorTest.php @@ -9,11 +9,10 @@ use Laminas\Hydrator\ArraySerializableHydrator; use Laminas\Hydrator\Exception\InvalidArgumentException; use Laminas\Hydrator\Iterator\HydratingIteratorIterator; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers Laminas\Hydrator\Iterator\HydratingIteratorIterator - */ +#[CoversClass(HydratingIteratorIterator::class)] class HydratingIteratorIteratorTest extends TestCase { public function testHydratesObjectAndClonesOnCurrent(): void diff --git a/test/NamingStrategy/CompositeNamingStrategyTest.php b/test/NamingStrategy/CompositeNamingStrategyTest.php index e4c09e92..45e368af 100644 --- a/test/NamingStrategy/CompositeNamingStrategyTest.php +++ b/test/NamingStrategy/CompositeNamingStrategyTest.php @@ -6,14 +6,11 @@ use Laminas\Hydrator\NamingStrategy\CompositeNamingStrategy; use Laminas\Hydrator\NamingStrategy\NamingStrategyInterface; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -/** - * Tests for {@see CompositeNamingStrategy} - * - * @covers \Laminas\Hydrator\NamingStrategy\CompositeNamingStrategy - */ +#[CoversClass(CompositeNamingStrategy::class)] class CompositeNamingStrategyTest extends TestCase { public function testGetSameNameWhenNoNamingStrategyExistsForTheName(): void diff --git a/test/NamingStrategy/IdentityNamingStrategyTest.php b/test/NamingStrategy/IdentityNamingStrategyTest.php index 6031263b..9a4bdfce 100644 --- a/test/NamingStrategy/IdentityNamingStrategyTest.php +++ b/test/NamingStrategy/IdentityNamingStrategyTest.php @@ -5,19 +5,17 @@ namespace LaminasTest\Hydrator\NamingStrategy; use Laminas\Hydrator\NamingStrategy\IdentityNamingStrategy; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -/** - * Tests for {@see IdentityNamingStrategy} - * - * @covers \Laminas\Hydrator\NamingStrategy\IdentityNamingStrategy - */ +#[CoversClass(IdentityNamingStrategy::class)] class IdentityNamingStrategyTest extends TestCase { /** - * @dataProvider getTestedNames * @param string $name */ + #[DataProvider('getTestedNames')] public function testHydrate($name): void { $namingStrategy = new IdentityNamingStrategy(); @@ -26,9 +24,9 @@ public function testHydrate($name): void } /** - * @dataProvider getTestedNames * @param string $name */ + #[DataProvider('getTestedNames')] public function testExtract($name): void { $namingStrategy = new IdentityNamingStrategy(); @@ -41,7 +39,7 @@ public function testExtract($name): void * * @return string[][] */ - public function getTestedNames() + public static function getTestedNames() { return [ 'foo' => ['foo'], diff --git a/test/NamingStrategy/MapNamingStrategyTest.php b/test/NamingStrategy/MapNamingStrategyTest.php index 2c57409c..8f5b9a76 100644 --- a/test/NamingStrategy/MapNamingStrategyTest.php +++ b/test/NamingStrategy/MapNamingStrategyTest.php @@ -7,17 +7,15 @@ use Generator; use Laminas\Hydrator\Exception; use Laminas\Hydrator\NamingStrategy\MapNamingStrategy; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -/** - * Tests for {@see MapNamingStrategy} - * - * @covers \Laminas\Hydrator\NamingStrategy\MapNamingStrategy - */ +#[CoversClass(MapNamingStrategy::class)] class MapNamingStrategyTest extends TestCase { /** @return Generator> */ - public function invalidMapValues(): Generator + public static function invalidMapValues(): Generator { yield 'null' => [null]; yield 'true' => [true]; @@ -29,7 +27,7 @@ public function invalidMapValues(): Generator } /** @psalm-return Generator}> */ - public function invalidKeyArrays(): Generator + public static function invalidKeyArrays(): Generator { yield 'int' => [ 'invalidKeyArray' => [1 => 'foo'], @@ -39,9 +37,7 @@ public function invalidKeyArrays(): Generator ]; } - /** - * @dataProvider invalidMapValues - */ + #[DataProvider('invalidMapValues')] public function testExtractionMapConstructorRaisesExceptionWhenFlippingHydrationMapForInvalidValues( mixed $invalidValue ): void { @@ -52,9 +48,7 @@ public function testExtractionMapConstructorRaisesExceptionWhenFlippingHydration MapNamingStrategy::createFromExtractionMap(['foo' => $invalidValue]); } - /** - * @dataProvider invalidKeyArrays - */ + #[DataProvider('invalidKeyArrays')] public function testExtractionMapConstructorRaisesExceptionWhenFlippingHydrationMapForInvalidKeys( array $invalidKeyArray ): void { @@ -65,9 +59,7 @@ public function testExtractionMapConstructorRaisesExceptionWhenFlippingHydration MapNamingStrategy::createFromExtractionMap($invalidKeyArray); } - /** - * @dataProvider invalidMapValues - */ + #[DataProvider('invalidMapValues')] public function testHydrationMapConstructorRaisesExceptionWhenFlippingExtractionMapForInvalidValues( mixed $invalidValue ): void { @@ -78,9 +70,7 @@ public function testHydrationMapConstructorRaisesExceptionWhenFlippingExtraction MapNamingStrategy::createFromHydrationMap(['foo' => $invalidValue]); } - /** - * @dataProvider invalidKeyArrays - */ + #[DataProvider('invalidKeyArrays')] public function testHydrationMapConstructorRaisesExceptionWhenFlippingExtractionMapForInvalidKeys( array $invalidKeyArray ): void { diff --git a/test/NamingStrategy/UnderscoreNamingStrategy/CamelCaseToUnderscoreFilterTest.php b/test/NamingStrategy/UnderscoreNamingStrategy/CamelCaseToUnderscoreFilterTest.php index f72fbbac..04d0ad57 100644 --- a/test/NamingStrategy/UnderscoreNamingStrategy/CamelCaseToUnderscoreFilterTest.php +++ b/test/NamingStrategy/UnderscoreNamingStrategy/CamelCaseToUnderscoreFilterTest.php @@ -5,30 +5,27 @@ namespace LaminasTest\Hydrator\NamingStrategy\UnderscoreNamingStrategy; use Laminas\Hydrator\NamingStrategy\UnderscoreNamingStrategy\CamelCaseToUnderscoreFilter; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use ReflectionClass; use function extension_loaded; -/** - * Tests for {@see CamelCaseToUnderscoreFilter} - * - * @covers Laminas\Hydrator\NamingStrategy\UnderscoreNamingStrategy\CamelCaseToUnderscoreFilter - */ +#[CoversClass(CamelCaseToUnderscoreFilter::class)] class CamelCaseToUnderscoreFilterTest extends TestCase { /** - * @dataProvider nonUnicodeProvider * @param string $string * @param string $expected */ + #[DataProvider('nonUnicodeProvider')] public function testFilterUnderscoresNonUnicodeStrings($string, $expected): void { $filter = new CamelCaseToUnderscoreFilter(); $reflectionClass = new ReflectionClass($filter); $property = $reflectionClass->getProperty('pcreUnicodeSupport'); - $property->setAccessible(true); $property->setValue($filter, false); $filtered = $filter->filter($string); @@ -38,10 +35,10 @@ public function testFilterUnderscoresNonUnicodeStrings($string, $expected): void } /** - * @dataProvider unicodeProvider * @param string $string * @param string $expected */ + #[DataProvider('unicodeProvider')] public function testFilterUnderscoresUnicodeStrings($string, $expected): void { if (! extension_loaded('mbstring')) { @@ -57,17 +54,16 @@ public function testFilterUnderscoresUnicodeStrings($string, $expected): void } /** - * @dataProvider unicodeProviderWithoutMbStrings * @param string $string * @param string $expected */ + #[DataProvider('unicodeProviderWithoutMbStrings')] public function testFilterUnderscoresUnicodeStringsWithoutMbStrings($string, $expected): void { $filter = new CamelCaseToUnderscoreFilter(); $reflectionClass = new ReflectionClass($filter); $property = $reflectionClass->getProperty('mbStringSupport'); - $property->setAccessible(true); $property->setValue($filter, false); $filtered = $filter->filter($string); @@ -80,7 +76,7 @@ public function testFilterUnderscoresUnicodeStringsWithoutMbStrings($string, $ex * @return string[][] * @psalm-return array */ - public function nonUnicodeProvider(): array + public static function nonUnicodeProvider(): array { return [ 'upcased first letter' => [ @@ -114,7 +110,7 @@ public function nonUnicodeProvider(): array * @return string[][] * @psalm-return array */ - public function unicodeProvider(): array + public static function unicodeProvider(): array { return [ 'upcased first letter' => [ @@ -148,7 +144,7 @@ public function unicodeProvider(): array * @return string[][] * @psalm-return array */ - public function unicodeProviderWithoutMbStrings(): array + public static function unicodeProviderWithoutMbStrings(): array { return [ 'upcased first letter' => [ diff --git a/test/NamingStrategy/UnderscoreNamingStrategy/UnderscoreToCamelCaseFilterTest.php b/test/NamingStrategy/UnderscoreNamingStrategy/UnderscoreToCamelCaseFilterTest.php index 28e54067..808a26cd 100644 --- a/test/NamingStrategy/UnderscoreNamingStrategy/UnderscoreToCamelCaseFilterTest.php +++ b/test/NamingStrategy/UnderscoreNamingStrategy/UnderscoreToCamelCaseFilterTest.php @@ -5,30 +5,27 @@ namespace LaminasTest\Hydrator\NamingStrategy\UnderscoreNamingStrategy; use Laminas\Hydrator\NamingStrategy\UnderscoreNamingStrategy\UnderscoreToCamelCaseFilter; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use ReflectionClass; use function extension_loaded; -/** - * Tests for {@see UnderscoreToCamelCaseFilter} - * - * @covers Laminas\Hydrator\NamingStrategy\UnderscoreNamingStrategy\UnderscoreToCamelCaseFilter - */ +#[CoversClass(UnderscoreToCamelCaseFilter::class)] class UnderscoreToCamelCaseFilterTest extends TestCase { /** - * @dataProvider nonUnicodeProvider * @param string $string * @param string $expected */ + #[DataProvider('nonUnicodeProvider')] public function testFilterCamelCasesNonUnicodeStrings($string, $expected): void { $filter = new UnderscoreToCamelCaseFilter(); $reflectionClass = new ReflectionClass($filter); $property = $reflectionClass->getProperty('pcreUnicodeSupport'); - $property->setAccessible(true); $property->setValue($filter, false); $filtered = $filter->filter($string); @@ -41,7 +38,7 @@ public function testFilterCamelCasesNonUnicodeStrings($string, $expected): void * @return string[][] * @psalm-return array */ - public function nonUnicodeProvider(): array + public static function nonUnicodeProvider(): array { return [ 'one word' => [ @@ -64,10 +61,10 @@ public function nonUnicodeProvider(): array } /** - * @dataProvider unicodeProvider * @param string $string * @param string $expected */ + #[DataProvider('unicodeProvider')] public function testFilterCamelCasesUnicodeStrings($string, $expected): void { if (! extension_loaded('mbstring')) { @@ -85,7 +82,7 @@ public function testFilterCamelCasesUnicodeStrings($string, $expected): void * @return string[][] * @psalm-return array */ - public function unicodeProvider(): array + public static function unicodeProvider(): array { return [ 'uppercase first letter' => [ @@ -116,10 +113,10 @@ public function unicodeProvider(): array } /** - * @dataProvider unicodeWithoutMbStringsProvider * @param string $string * @param string $expected */ + #[DataProvider('unicodeWithoutMbStringsProvider')] public function testFilterCamelCasesUnicodeStringsWithoutMbStrings( $string, $expected @@ -128,7 +125,6 @@ public function testFilterCamelCasesUnicodeStringsWithoutMbStrings( $reflectionClass = new ReflectionClass($filter); $property = $reflectionClass->getProperty('mbStringSupport'); - $property->setAccessible(true); $property->setValue($filter, false); $filtered = $filter->filter($string); @@ -139,7 +135,7 @@ public function testFilterCamelCasesUnicodeStringsWithoutMbStrings( * @return string[][] * @psalm-return array */ - public function unicodeWithoutMbStringsProvider(): array + public static function unicodeWithoutMbStringsProvider(): array { return [ 'multiple words' => [ diff --git a/test/NamingStrategy/UnderscoreNamingStrategyTest.php b/test/NamingStrategy/UnderscoreNamingStrategyTest.php index 81d1a6d5..a698bd3c 100644 --- a/test/NamingStrategy/UnderscoreNamingStrategyTest.php +++ b/test/NamingStrategy/UnderscoreNamingStrategyTest.php @@ -5,13 +5,11 @@ namespace LaminasTest\Hydrator\NamingStrategy; use Laminas\Hydrator\NamingStrategy\UnderscoreNamingStrategy; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; -/** - * Unit tests for {@see UnderscoreNamingStrategy} - * - * @covers \Laminas\Hydrator\NamingStrategy\UnderscoreNamingStrategy - */ +#[CoversClass(UnderscoreNamingStrategy::class)] class UnderscoreNamingStrategyTest extends TestCase { public function testNameHydratesToCamelCase(): void @@ -26,10 +24,8 @@ public function testNameExtractsToUnderscore(): void $this->assertEquals('foo_bar_baz', $strategy->extract('fooBarBaz')); } - /** - * @group 6422 - * @group 6420 - */ + #[Group('6422')] + #[Group('6420')] public function testNameHydratesToStudlyCaps(): void { $strategy = new UnderscoreNamingStrategy(); diff --git a/test/ObjectPropertyHydratorTest.php b/test/ObjectPropertyHydratorTest.php index bca501eb..0396cb21 100644 --- a/test/ObjectPropertyHydratorTest.php +++ b/test/ObjectPropertyHydratorTest.php @@ -7,15 +7,12 @@ use Laminas\Hydrator\ObjectPropertyHydrator; use LaminasTest\Hydrator\TestAsset\ClassWithPublicStaticProperties; use LaminasTest\Hydrator\TestAsset\ObjectProperty as ObjectPropertyTestAsset; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use stdClass; use TypeError; -/** - * Unit tests for {@see ObjectPropertyHydrator} - * - * @covers \Laminas\Hydrator\ObjectPropertyHydrator - */ +#[CoversClass(ObjectPropertyHydrator::class)] class ObjectPropertyHydratorTest extends TestCase { use HydratorTestTrait; @@ -100,7 +97,7 @@ public function testCanHydrateAdditionalPropertiesToStdClass(): void $object = $this->hydrator->hydrate(['foo' => 'baz', 'bar' => 'baz'], $object); $this->assertEquals('baz', $object->foo); - $this->assertObjectHasAttribute('bar', $object); + $this->assertObjectHasProperty('bar', $object); $this->assertSame('baz', $object->bar); } diff --git a/test/ObjectPropertyTest.php b/test/ObjectPropertyTest.php index 33e193ad..f3c02cfb 100644 --- a/test/ObjectPropertyTest.php +++ b/test/ObjectPropertyTest.php @@ -6,6 +6,7 @@ use Laminas\Hydrator\ObjectProperty; use Laminas\Hydrator\ObjectPropertyHydrator; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use function restore_error_handler; @@ -13,6 +14,7 @@ use const E_USER_DEPRECATED; +#[CoversClass(ObjectProperty::class)] class ObjectPropertyTest extends TestCase { public function testTriggerUserDeprecatedError(): void @@ -22,7 +24,6 @@ public function testTriggerUserDeprecatedError(): void public $message = false; }; - /** @psalm-suppress UnusedClosureParam */ set_error_handler(static function ($errno, $errstr) use ($test): bool { $test->message = $errstr; return true; diff --git a/test/ReflectionHydratorTest.php b/test/ReflectionHydratorTest.php index 57775324..4b2fff8f 100644 --- a/test/ReflectionHydratorTest.php +++ b/test/ReflectionHydratorTest.php @@ -5,16 +5,13 @@ namespace LaminasTest\Hydrator; use Laminas\Hydrator\ReflectionHydrator; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use ReflectionProperty; use stdClass; use TypeError; -/** - * Unit tests for {@see ReflectionHydrator} - * - * @covers \Laminas\Hydrator\ReflectionHydrator - */ +#[CoversClass(ReflectionHydrator::class)] class ReflectionHydratorTest extends TestCase { use HydratorTestTrait; @@ -84,7 +81,6 @@ public function testCanHydrateAnonymousObject(): void $this->assertSame($instance, $hydrated); $r = new ReflectionProperty($hydrated, 'foo'); - $r->setAccessible(true); $this->assertSame('bar', $r->getValue($hydrated)); } } diff --git a/test/ReflectionTest.php b/test/ReflectionTest.php index a986999c..53b16437 100644 --- a/test/ReflectionTest.php +++ b/test/ReflectionTest.php @@ -6,6 +6,7 @@ use Laminas\Hydrator\Reflection; use Laminas\Hydrator\ReflectionHydrator; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use function restore_error_handler; @@ -13,6 +14,7 @@ use const E_USER_DEPRECATED; +#[CoversClass(Reflection::class)] class ReflectionTest extends TestCase { public function testTriggerUserDeprecatedError(): void @@ -22,7 +24,6 @@ public function testTriggerUserDeprecatedError(): void public $message = false; }; - /** @psalm-suppress UnusedClosureParam */ set_error_handler(static function ($errno, $errstr) use ($test): bool { $test->message = $errstr; return true; diff --git a/test/StandaloneHydratorPluginManagerFactoryTest.php b/test/StandaloneHydratorPluginManagerFactoryTest.php index 2deb58a9..83714f2b 100644 --- a/test/StandaloneHydratorPluginManagerFactoryTest.php +++ b/test/StandaloneHydratorPluginManagerFactoryTest.php @@ -15,12 +15,14 @@ use Laminas\Hydrator\ReflectionHydrator; use Laminas\Hydrator\StandaloneHydratorPluginManager; use Laminas\Hydrator\StandaloneHydratorPluginManagerFactory; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Psr\Container\ContainerInterface; use function sprintf; +#[CoversClass(StandaloneHydratorPluginManagerFactory::class)] class StandaloneHydratorPluginManagerFactoryTest extends TestCase { private const MESSAGE_DEFAULT_SERVICES = 'Missing the service %s'; diff --git a/test/StandaloneHydratorPluginManagerTest.php b/test/StandaloneHydratorPluginManagerTest.php index 038a3df1..7986fd82 100644 --- a/test/StandaloneHydratorPluginManagerTest.php +++ b/test/StandaloneHydratorPluginManagerTest.php @@ -8,12 +8,15 @@ use Generator; use Laminas\Hydrator; use Laminas\Hydrator\StandaloneHydratorPluginManager; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use ReflectionProperty; use function array_pop; use function sprintf; +#[CoversClass(StandaloneHydratorPluginManager::class)] class StandaloneHydratorPluginManagerTest extends TestCase { private StandaloneHydratorPluginManager $manager; @@ -23,20 +26,16 @@ protected function setUp(): void $this->manager = new StandaloneHydratorPluginManager(); } - /** - * @return mixed - */ - public function reflectProperty(object $class, string $property) + public function reflectProperty(object $class, string $property): mixed { $r = new ReflectionProperty($class, $property); - $r->setAccessible(true); return $r->getValue($class); } /** * @psalm-return Generator */ - public function hydratorsWithoutConstructors(): Generator + public static function hydratorsWithoutConstructors(): Generator { yield 'ArraySerializable' => [Hydrator\ArraySerializableHydrator::class]; yield 'ArraySerializableHydrator' => [Hydrator\ArraySerializableHydrator::class]; @@ -52,9 +51,7 @@ public function hydratorsWithoutConstructors(): Generator yield 'Reflection' => [Hydrator\ReflectionHydrator::class]; } - /** - * @dataProvider hydratorsWithoutConstructors - */ + #[DataProvider('hydratorsWithoutConstructors')] public function testInstantiationInitializesFactoriesForHydratorsWithoutConstructorArguments(string $class): void { $factories = $this->reflectProperty($this->manager, 'factories'); @@ -78,9 +75,9 @@ public function testHasReturnsFalseForUnknownNames(): void } /** @return Generator */ - public function knownServices(): Generator + public static function knownServices(): Generator { - foreach ($this->hydratorsWithoutConstructors() as $key => $data) { + foreach (self::hydratorsWithoutConstructors() as $key => $data) { $class = array_pop($data); $alias = sprintf('%s alias', $key); $fqcn = sprintf('%s class', $key); @@ -93,9 +90,7 @@ public function knownServices(): Generator yield 'DelegatingHydrator class' => [Hydrator\DelegatingHydrator::class, Hydrator\DelegatingHydrator::class]; } - /** - * @dataProvider knownServices - */ + #[DataProvider('knownServices')] public function testHasReturnsTrueForKnownServices(string $service): void { self::assertTrue($this->manager->has($service)); @@ -108,10 +103,10 @@ public function testGetRaisesExceptionForUnknownService(): void } /** - * @dataProvider knownServices * @param string|class-string $service * @param class-string $expectedType */ + #[DataProvider('knownServices')] public function testGetReturnsExpectedTypesForKnownServices(string $service, string $expectedType): void { $instance = $this->manager->get($service); diff --git a/test/Strategy/BackedEnumStrategyTest.php b/test/Strategy/BackedEnumStrategyTest.php index 72adca8b..f8a8e73e 100644 --- a/test/Strategy/BackedEnumStrategyTest.php +++ b/test/Strategy/BackedEnumStrategyTest.php @@ -8,17 +8,13 @@ use Laminas\Hydrator\Strategy\Exception\InvalidArgumentException; use LaminasTest\Hydrator\Strategy\TestAsset\TestBackedEnum; use LaminasTest\Hydrator\Strategy\TestAsset\TestUnitEnum; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use const PHP_VERSION_ID; -/** - * @uses \Laminas\Hydrator\Exception\DomainException - * @uses \Laminas\Hydrator\Strategy\Exception\InvalidArgumentException - * - * @covers \Laminas\Hydrator\Strategy\BackedEnumStrategy - */ -final class BackedEnumStrategyTest extends TestCase +#[CoversClass(BackedEnumStrategy::class)] +class BackedEnumStrategyTest extends TestCase { protected function setUp(): void { diff --git a/test/Strategy/BooleanStrategyTest.php b/test/Strategy/BooleanStrategyTest.php index afb51d38..75b500e4 100644 --- a/test/Strategy/BooleanStrategyTest.php +++ b/test/Strategy/BooleanStrategyTest.php @@ -6,14 +6,11 @@ use Laminas\Hydrator\Exception\InvalidArgumentException; use Laminas\Hydrator\Strategy\BooleanStrategy; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use stdClass; -/** - * Tests for {@see BooleanStrategy} - * - * @covers \Laminas\Hydrator\Strategy\BooleanStrategy - */ +#[CoversClass(BooleanStrategy::class)] class BooleanStrategyTest extends TestCase { public function testConstructorWithValidInteger(): void diff --git a/test/Strategy/CollectionStrategyTest.php b/test/Strategy/CollectionStrategyTest.php index 18055483..510d4527 100644 --- a/test/Strategy/CollectionStrategyTest.php +++ b/test/Strategy/CollectionStrategyTest.php @@ -10,6 +10,8 @@ use Laminas\Hydrator\ReflectionHydrator; use Laminas\Hydrator\Strategy\CollectionStrategy; use LaminasTest\Hydrator\TestAsset; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use stdClass; @@ -26,17 +28,13 @@ use function spl_object_hash; use function sprintf; -/** - * Tests for {@see CollectionStrategy} - * - * @covers \Laminas\Hydrator\Strategy\CollectionStrategy - */ +#[CoversClass(CollectionStrategy::class)] class CollectionStrategyTest extends TestCase { /** - * @dataProvider providerInvalidObjectClassName * @param class-string $expectedExceptionType */ + #[DataProvider('providerInvalidObjectClassName')] public function testConstructorRejectsInvalidObjectClassName( mixed $objectClassName, string $expectedExceptionType, @@ -53,7 +51,7 @@ public function testConstructorRejectsInvalidObjectClassName( } /** @return array, 2: string}> */ - public function providerInvalidObjectClassName(): array + public static function providerInvalidObjectClassName(): array { // @codingStandardsIgnoreStart return [ @@ -70,9 +68,7 @@ public function providerInvalidObjectClassName(): array // @codingStandardsIgnoreEnd } - /** - * @dataProvider providerInvalidValueForExtraction - */ + #[DataProvider('providerInvalidValueForExtraction')] public function testExtractRejectsInvalidValue(mixed $value): void { $strategy = new CollectionStrategy( @@ -93,7 +89,7 @@ public function testExtractRejectsInvalidValue(mixed $value): void /** * @return Generator> */ - public function providerInvalidValueForExtraction(): Generator + public static function providerInvalidValueForExtraction(): Generator { $values = [ 'boolean-false' => false, @@ -111,9 +107,7 @@ public function providerInvalidValueForExtraction(): Generator } } - /** - * @dataProvider providerInvalidObjectForExtraction - */ + #[DataProvider('providerInvalidObjectForExtraction')] public function testExtractRejectsInvalidObject(mixed $object): void { $value = [$object]; @@ -136,7 +130,7 @@ public function testExtractRejectsInvalidObject(mixed $object): void /** * @return Generator> */ - public function providerInvalidObjectForExtraction(): Generator + public static function providerInvalidObjectForExtraction(): Generator { $values = [ 'boolean-false' => false, @@ -187,9 +181,7 @@ public function testExtractUsesHydratorToExtractValues(): void self::assertSame($expected, $strategy->extract($value)); } - /** - * @dataProvider providerInvalidValueForHydration - */ + #[DataProvider('providerInvalidValueForHydration')] public function testHydrateRejectsInvalidValue(mixed $value): void { $strategy = new CollectionStrategy( @@ -210,7 +202,7 @@ public function testHydrateRejectsInvalidValue(mixed $value): void /** * @return Generator> */ - public function providerInvalidValueForHydration(): Generator + public static function providerInvalidValueForHydration(): Generator { $values = [ 'boolean-false' => false, diff --git a/test/Strategy/DateTimeFormatterStrategyTest.php b/test/Strategy/DateTimeFormatterStrategyTest.php index 979f0d02..a7da9276 100644 --- a/test/Strategy/DateTimeFormatterStrategyTest.php +++ b/test/Strategy/DateTimeFormatterStrategyTest.php @@ -10,14 +10,12 @@ use DateTimeZone; use Laminas\Hydrator\Strategy\DateTimeFormatterStrategy; use Laminas\Hydrator\Strategy\Exception\InvalidArgumentException; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use stdClass; -/** - * Tests for {@see DateTimeFormatterStrategy} - * - * @covers \Laminas\Hydrator\Strategy\DateTimeFormatterStrategy - */ +#[CoversClass(DateTimeFormatterStrategy::class)] class DateTimeFormatterStrategyTest extends TestCase { public function testHydrate(): void @@ -86,10 +84,10 @@ public function testCanExtractAnyDateTimeInterface(): void } /** - * @dataProvider formatsWithSpecialCharactersProvider * @param string $format * @param string $expectedValue */ + #[DataProvider('formatsWithSpecialCharactersProvider')] public function testAcceptsCreateFromFormatSpecialCharacters($format, $expectedValue): void { $strategy = new DateTimeFormatterStrategy($format); @@ -99,9 +97,7 @@ public function testAcceptsCreateFromFormatSpecialCharacters($format, $expectedV self::assertEquals($expectedValue, $hydrated->format('Y-m-d')); } - /** - * @dataProvider formatsWithSpecialCharactersProvider - */ + #[DataProvider('formatsWithSpecialCharactersProvider')] public function testCanExtractWithCreateFromFormatSpecialCharacters(string $format, string $expectedValue): void { $date = DateTime::createFromFormat($format, $expectedValue); @@ -123,7 +119,7 @@ public function testCanExtractWithCreateFromFormatEscapedSpecialCharacters(): vo * @return string[][] * @psalm-return array */ - public function formatsWithSpecialCharactersProvider(): array + public static function formatsWithSpecialCharactersProvider(): array { return [ '!-prepended' => ['!Y-m-d', '2018-02-05'], @@ -148,7 +144,7 @@ public function testCanHydrateWithDateTimeFallback(): void } /** @return array> */ - public function invalidValuesForHydration(): array + public static function invalidValuesForHydration(): array { return [ 'zero' => [0], @@ -160,9 +156,7 @@ public function invalidValuesForHydration(): array ]; } - /** - * @dataProvider invalidValuesForHydration - */ + #[DataProvider('invalidValuesForHydration')] public function testHydrateRaisesExceptionIfValueIsInvalid(mixed $value): void { $strategy = new DateTimeFormatterStrategy('Y-m-d'); @@ -173,7 +167,7 @@ public function testHydrateRaisesExceptionIfValueIsInvalid(mixed $value): void } /** @return array> */ - public function validUnHydratableValues(): array + public static function validUnHydratableValues(): array { return [ 'empty string' => [''], @@ -182,9 +176,7 @@ public function validUnHydratableValues(): array ]; } - /** - * @dataProvider validUnHydratableValues - */ + #[DataProvider('validUnHydratableValues')] public function testReturnsValueVerbatimUnderSpecificConditions(mixed $value): void { $strategy = new DateTimeFormatterStrategy('Y-m-d'); diff --git a/test/Strategy/DateTimeImmutableFormatterStrategyTest.php b/test/Strategy/DateTimeImmutableFormatterStrategyTest.php index 33609051..6a31b386 100644 --- a/test/Strategy/DateTimeImmutableFormatterStrategyTest.php +++ b/test/Strategy/DateTimeImmutableFormatterStrategyTest.php @@ -7,8 +7,11 @@ use DateTimeImmutable; use Laminas\Hydrator\Strategy\DateTimeFormatterStrategy; use Laminas\Hydrator\Strategy\DateTimeImmutableFormatterStrategy; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; +#[CoversClass(DateTimeImmutableFormatterStrategy::class)] class DateTimeImmutableFormatterStrategyTest extends TestCase { private DateTimeImmutableFormatterStrategy $strategy; @@ -50,16 +53,14 @@ public function testHydrationShouldReturnDateTimeObjectWithSameValue(): void ); } - /** - * @dataProvider dataProviderForInvalidDateValues - */ + #[DataProvider('dataProviderForInvalidDateValues')] public function testHydrationShouldReturnInvalidDateValuesAsIs(string|null $value): void { self::assertSame($value, $this->strategy->hydrate($value)); } /** @return array */ - public function dataProviderForInvalidDateValues(): array + public static function dataProviderForInvalidDateValues(): array { return [ 'null' => [null], diff --git a/test/Strategy/ExplodeStrategyTest.php b/test/Strategy/ExplodeStrategyTest.php index c56403e0..0d06fb1f 100644 --- a/test/Strategy/ExplodeStrategyTest.php +++ b/test/Strategy/ExplodeStrategyTest.php @@ -6,23 +6,21 @@ use Laminas\Hydrator\Strategy\Exception\InvalidArgumentException; use Laminas\Hydrator\Strategy\ExplodeStrategy; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use stdClass; use function is_numeric; -/** - * Tests for {@see ExplodeStrategy} - * - * @covers \Laminas\Hydrator\Strategy\ExplodeStrategy - */ +#[CoversClass(ExplodeStrategy::class)] class ExplodeStrategyTest extends TestCase { /** - * @dataProvider getValidHydratedValues * @param non-empty-string $delimiter * @param string[] $extractValue */ + #[DataProvider('getValidHydratedValues')] public function testExtract(mixed $expected, string $delimiter, array $extractValue): void { $strategy = new ExplodeStrategy($delimiter); @@ -111,9 +109,9 @@ public function testExtractWithInvalidObjectType(): void } /** - * @dataProvider getValidHydratedValues * @param non-empty-string $delimiter */ + #[DataProvider('getValidHydratedValues')] public function testHydration(mixed $value, string $delimiter, array $expected): void { $strategy = new ExplodeStrategy($delimiter); @@ -125,7 +123,7 @@ public function testHydration(mixed $value, string $delimiter, array $expected): /** * @return array}> */ - public function getValidHydratedValues(): array + public static function getValidHydratedValues(): array { // @codingStandardsIgnoreStart return [ diff --git a/test/Strategy/HydratorStrategyTest.php b/test/Strategy/HydratorStrategyTest.php index 7e7f5b94..95890591 100644 --- a/test/Strategy/HydratorStrategyTest.php +++ b/test/Strategy/HydratorStrategyTest.php @@ -10,6 +10,8 @@ use Laminas\Hydrator\Strategy\Exception\InvalidArgumentException; use Laminas\Hydrator\Strategy\HydratorStrategy; use LaminasTest\Hydrator\TestAsset; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use stdClass; @@ -25,12 +27,13 @@ use function spl_object_hash; use function sprintf; +#[CoversClass(HydratorStrategy::class)] class HydratorStrategyTest extends TestCase { /** - * @dataProvider providerInvalidObjectClassName * @param class-string $expectedExceptionType */ + #[DataProvider('providerInvalidObjectClassName')] public function testConstructorRejectsInvalidObjectClassName( mixed $objectClassName, string $expectedExceptionType, @@ -46,7 +49,7 @@ public function testConstructorRejectsInvalidObjectClassName( } /** @return non-empty-array, string}> */ - public function providerInvalidObjectClassName(): array + public static function providerInvalidObjectClassName(): array { return [ 'array' => [[], TypeError::class, 'type string'], @@ -65,9 +68,7 @@ public function providerInvalidObjectClassName(): array ]; } - /** - * @dataProvider providerInvalidValueForExtraction - */ + #[DataProvider('providerInvalidValueForExtraction')] public function testExtractRejectsInvalidValue(mixed $value): void { $strategy = new HydratorStrategy( @@ -88,7 +89,7 @@ public function testExtractRejectsInvalidValue(mixed $value): void } /** @return Generator */ - public function providerInvalidValueForExtraction(): Generator + public static function providerInvalidValueForExtraction(): Generator { $values = [ 'boolean-false' => false, @@ -106,9 +107,7 @@ public function providerInvalidValueForExtraction(): Generator } } - /** - * @dataProvider providerInvalidObjectForExtraction - */ + #[DataProvider('providerInvalidObjectForExtraction')] public function testExtractRejectsInvalidObject(mixed $object): void { $strategy = new HydratorStrategy( @@ -129,7 +128,7 @@ public function testExtractRejectsInvalidObject(mixed $object): void } /** @return Generator */ - public function providerInvalidObjectForExtraction(): Generator + public static function providerInvalidObjectForExtraction(): Generator { $values = [ 'boolean-false' => false, @@ -173,9 +172,7 @@ public function testExtractUsesHydratorToExtractValues(): void self::assertSame($extraction($value), $strategy->extract($value)); } - /** - * @dataProvider providerInvalidValueForHydration - */ + #[DataProvider('providerInvalidValueForHydration')] public function testHydrateRejectsInvalidValue(mixed $value): void { $strategy = new HydratorStrategy( @@ -195,7 +192,7 @@ public function testHydrateRejectsInvalidValue(mixed $value): void } /** @return Generator */ - public function providerInvalidValueForHydration(): Generator + public static function providerInvalidValueForHydration(): Generator { $values = [ 'boolean-false' => false, @@ -212,9 +209,7 @@ public function providerInvalidValueForHydration(): Generator } } - /** - * @dataProvider providerEmptyOrSameObjects - */ + #[DataProvider('providerEmptyOrSameObjects')] public function testHydrateShouldReturnEmptyOrSameObjects(mixed $value): void { $strategy = new HydratorStrategy( @@ -226,7 +221,7 @@ public function testHydrateShouldReturnEmptyOrSameObjects(mixed $value): void } /** @return Generator */ - public function providerEmptyOrSameObjects(): Generator + public static function providerEmptyOrSameObjects(): Generator { $values = [ 'null' => null, diff --git a/test/Strategy/NullableStrategyTest.php b/test/Strategy/NullableStrategyTest.php index 463d9beb..608632a1 100644 --- a/test/Strategy/NullableStrategyTest.php +++ b/test/Strategy/NullableStrategyTest.php @@ -6,8 +6,10 @@ use Laminas\Hydrator\Strategy\NullableStrategy; use Laminas\Hydrator\Strategy\StrategyInterface; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +#[CoversClass(NullableStrategy::class)] class NullableStrategyTest extends TestCase { public function testExtractNonNullAndNonEmptyValue(): void diff --git a/test/Strategy/ScalarTypeStrategyTest.php b/test/Strategy/ScalarTypeStrategyTest.php index fe0e5203..c33a10a9 100644 --- a/test/Strategy/ScalarTypeStrategyTest.php +++ b/test/Strategy/ScalarTypeStrategyTest.php @@ -5,12 +5,11 @@ namespace LaminasTest\Hydrator\Strategy; use Laminas\Hydrator\Strategy\ScalarTypeStrategy; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \Laminas\Hydrator\Strategy\ScalarTypeStrategy - */ -final class ScalarTypeStrategyTest extends TestCase +#[CoversClass(ScalarTypeStrategy::class)] +class ScalarTypeStrategyTest extends TestCase { public function testHydrate(): void { diff --git a/test/Strategy/SerializableStrategyTest.php b/test/Strategy/SerializableStrategyTest.php index d982f9b9..a1233bcf 100644 --- a/test/Strategy/SerializableStrategyTest.php +++ b/test/Strategy/SerializableStrategyTest.php @@ -8,11 +8,10 @@ use Laminas\Hydrator\Strategy\SerializableStrategy; use Laminas\Serializer\Adapter\PhpSerialize; use Laminas\Serializer\Serializer; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers Laminas\Hydrator\Strategy\SerializableStrategy - */ +#[CoversClass(SerializableStrategy::class)] class SerializableStrategyTest extends TestCase { public function testCannotUseBadArgumentSerializer(): void diff --git a/test/Strategy/StrategyChainTest.php b/test/Strategy/StrategyChainTest.php index 7463a1ab..53bcd6f4 100644 --- a/test/Strategy/StrategyChainTest.php +++ b/test/Strategy/StrategyChainTest.php @@ -6,11 +6,10 @@ use Laminas\Hydrator\Strategy\ClosureStrategy; use Laminas\Hydrator\Strategy\StrategyChain; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @covers \Laminas\Hydrator\Strategy\StrategyChain - */ +#[CoversClass(StrategyChain::class)] class StrategyChainTest extends TestCase { public function testEmptyStrategyChainReturnsOriginalValue(): void diff --git a/test/TestAsset/HydratorAwareTraitImplementor.php b/test/TestAsset/HydratorAwareTraitImplementor.php new file mode 100644 index 00000000..914b7e89 --- /dev/null +++ b/test/TestAsset/HydratorAwareTraitImplementor.php @@ -0,0 +1,13 @@ + */ + private array $services = []; + + /** @inheritDoc */ + public function get($id): mixed + { + if (! array_key_exists($id, $this->services)) { + throw new class ($id . ' was not found') extends RuntimeException implements NotFoundExceptionInterface { + }; + } + + return $this->services[$id]; + } + + /** @inheritDoc */ + public function has($id): bool + { + return array_key_exists($id, $this->services); + } + + public function set(string $id, mixed $item): void + { + $this->services[$id] = $item; + } +}