diff --git a/.gitignore b/.gitignore
index 865b767f..c1d461fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
/.phpcs-cache
-/.phpunit.result.cache
+/.phpunit.cache
/.psalm-cache/
/docs/html/
/laminas-mkdoc-theme.tgz
diff --git a/.laminas-ci.json b/.laminas-ci.json
index bce3fa21..2c63c085 100644
--- a/.laminas-ci.json
+++ b/.laminas-ci.json
@@ -1,5 +1,2 @@
{
- "ignore_php_platform_requirements": {
- "8.1": true
- }
}
diff --git a/composer.json b/composer.json
index 5057ec74..8e33e90f 100644
--- a/composer.json
+++ b/composer.json
@@ -18,7 +18,7 @@
"config": {
"sort-packages": true,
"platform": {
- "php": "8.0.99"
+ "php": "8.1.99"
},
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
@@ -31,19 +31,19 @@
}
},
"require": {
- "php": "~8.0.0 || ~8.1.0 || ~8.2.0",
+ "php": "~8.1.0 || ~8.2.0",
"laminas/laminas-filter": "^2.13",
- "laminas/laminas-servicemanager": "^3.16.0",
+ "laminas/laminas-servicemanager": "^3.21.0",
"laminas/laminas-stdlib": "^3.0",
"laminas/laminas-validator": "^2.15"
},
"require-dev": {
"ext-json": "*",
"laminas/laminas-coding-standard": "~2.5.0",
- "phpunit/phpunit": "^9.5.27",
+ "phpunit/phpunit": "^10.1.3",
"psalm/plugin-phpunit": "^0.18.4",
- "psr/http-message": "^1.0.1",
- "vimeo/psalm": "^5.4",
+ "psr/http-message": "^1.1",
+ "vimeo/psalm": "^5.12",
"webmozart/assert": "^1.11"
},
"suggest": {
diff --git a/composer.lock b/composer.lock
index d3d05539..3106b66c 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,27 +4,27 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "72041ce1d54e09a0ebb6ee2286b47084",
+ "content-hash": "60141e5d535d2def634187e798a266b4",
"packages": [
{
"name": "laminas/laminas-filter",
- "version": "2.31.0",
+ "version": "2.32.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-filter.git",
- "reference": "548a6597d357b0b0b139cc7bffea4dfbc50eb5a8"
+ "reference": "2b7e6b2b26a92412c38336ee3089251164edf141"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laminas/laminas-filter/zipball/548a6597d357b0b0b139cc7bffea4dfbc50eb5a8",
- "reference": "548a6597d357b0b0b139cc7bffea4dfbc50eb5a8",
+ "url": "https://api.github.com/repos/laminas/laminas-filter/zipball/2b7e6b2b26a92412c38336ee3089251164edf141",
+ "reference": "2b7e6b2b26a92412c38336ee3089251164edf141",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
- "laminas/laminas-servicemanager": "^3.14.0",
+ "laminas/laminas-servicemanager": "^3.21.0",
"laminas/laminas-stdlib": "^3.13.0",
- "php": "~8.0.0 || ~8.1.0 || ~8.2.0"
+ "php": "~8.1.0 || ~8.2.0"
},
"conflict": {
"laminas/laminas-validator": "<2.10.1",
@@ -32,13 +32,13 @@
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.5.0",
- "laminas/laminas-crypt": "^3.9",
+ "laminas/laminas-crypt": "^3.10",
"laminas/laminas-uri": "^2.10",
"pear/archive_tar": "^1.4.14",
- "phpunit/phpunit": "^9.5.27",
+ "phpunit/phpunit": "^10.1.3",
"psalm/plugin-phpunit": "^0.18.4",
- "psr/http-factory": "^1.0.1",
- "vimeo/psalm": "^5.3"
+ "psr/http-factory": "^1.0.2",
+ "vimeo/psalm": "^5.11"
},
"suggest": {
"laminas/laminas-crypt": "Laminas\\Crypt component, for encryption filters",
@@ -82,30 +82,30 @@
"type": "community_bridge"
}
],
- "time": "2023-01-12T06:17:48+00:00"
+ "time": "2023-05-16T23:25:05+00:00"
},
{
"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": "*"
},
@@ -117,18 +117,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",
@@ -172,34 +173,34 @@
"type": "community_bridge"
}
],
- "time": "2022-12-01T17:03:38+00:00"
+ "time": "2023-05-14T12:24:54+00:00"
},
{
"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": {
@@ -231,44 +232,44 @@
"type": "community_bridge"
}
],
- "time": "2022-12-03T18:48:01+00:00"
+ "time": "2023-03-20T13:51:37+00:00"
},
{
"name": "laminas/laminas-validator",
- "version": "2.29.0",
+ "version": "2.31.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-validator.git",
- "reference": "e40ee8d86cc1907083e273bfd6ed8b6dde2d9850"
+ "reference": "7dc274aa5afd5e23be0dbea13363e3d66ba5808b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/e40ee8d86cc1907083e273bfd6ed8b6dde2d9850",
- "reference": "e40ee8d86cc1907083e273bfd6ed8b6dde2d9850",
+ "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/7dc274aa5afd5e23be0dbea13363e3d66ba5808b",
+ "reference": "7dc274aa5afd5e23be0dbea13363e3d66ba5808b",
"shasum": ""
},
"require": {
- "laminas/laminas-servicemanager": "^3.12.0",
+ "laminas/laminas-servicemanager": "^3.21.0",
"laminas/laminas-stdlib": "^3.13",
- "php": "~8.0.0 || ~8.1.0 || ~8.2.0",
- "psr/http-message": "^1.0.1"
+ "php": "~8.1.0 || ~8.2.0",
+ "psr/http-message": "^1.0.1 || ^2.0.0"
},
"conflict": {
"zendframework/zend-validator": "*"
},
"require-dev": {
- "laminas/laminas-coding-standard": "^2.4.0",
- "laminas/laminas-db": "^2.16",
- "laminas/laminas-filter": "^2.28.1",
+ "laminas/laminas-coding-standard": "^2.5",
+ "laminas/laminas-db": "^2.18",
+ "laminas/laminas-filter": "^2.32",
"laminas/laminas-http": "^2.18",
- "laminas/laminas-i18n": "^2.19",
- "laminas/laminas-session": "^2.15",
+ "laminas/laminas-i18n": "^2.23",
+ "laminas/laminas-session": "^2.16",
"laminas/laminas-uri": "^2.10.0",
- "phpunit/phpunit": "^9.5.26",
- "psalm/plugin-phpunit": "^0.18.3",
- "psr/http-client": "^1.0.1",
- "psr/http-factory": "^1.0.1",
- "vimeo/psalm": "^5.0"
+ "phpunit/phpunit": "^10.1.3",
+ "psalm/plugin-phpunit": "^0.18.4",
+ "psr/http-client": "^1.0.2",
+ "psr/http-factory": "^1.0.2",
+ "vimeo/psalm": "^5.11"
},
"suggest": {
"laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator",
@@ -316,7 +317,7 @@
"type": "community_bridge"
}
],
- "time": "2022-12-13T22:53:38+00:00"
+ "time": "2023-05-19T09:42:26+00:00"
},
{
"name": "psr/container",
@@ -368,25 +369,25 @@
},
{
"name": "psr/http-message",
- "version": "1.0.1",
+ "version": "1.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-message.git",
- "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
+ "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
- "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
+ "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
+ "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
"shasum": ""
},
"require": {
- "php": ">=5.3.0"
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "1.1.x-dev"
}
},
"autoload": {
@@ -415,9 +416,9 @@
"response"
],
"support": {
- "source": "https://github.com/php-fig/http-message/tree/master"
+ "source": "https://github.com/php-fig/http-message/tree/1.1"
},
- "time": "2016-08-06T14:39:51+00:00"
+ "time": "2023-04-04T09:50:52+00:00"
}
],
"packages-dev": [
@@ -990,76 +991,6 @@
},
"time": "2019-12-04T15:06:13+00:00"
},
- {
- "name": "doctrine/instantiator",
- "version": "1.5.0",
- "source": {
- "type": "git",
- "url": "https://github.com/doctrine/instantiator.git",
- "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b",
- "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b",
- "shasum": ""
- },
- "require": {
- "php": "^7.1 || ^8.0"
- },
- "require-dev": {
- "doctrine/coding-standard": "^9 || ^11",
- "ext-pdo": "*",
- "ext-phar": "*",
- "phpbench/phpbench": "^0.16 || ^1",
- "phpstan/phpstan": "^1.4",
- "phpstan/phpstan-phpunit": "^1",
- "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
- "vimeo/psalm": "^4.30 || ^5.4"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Marco Pivetta",
- "email": "ocramius@gmail.com",
- "homepage": "https://ocramius.github.io/"
- }
- ],
- "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
- "homepage": "https://www.doctrine-project.org/projects/instantiator.html",
- "keywords": [
- "constructor",
- "instantiate"
- ],
- "support": {
- "issues": "https://github.com/doctrine/instantiator/issues",
- "source": "https://github.com/doctrine/instantiator/tree/1.5.0"
- },
- "funding": [
- {
- "url": "https://www.doctrine-project.org/sponsorship.html",
- "type": "custom"
- },
- {
- "url": "https://www.patreon.com/phpdoctrine",
- "type": "patreon"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
- "type": "tidelift"
- }
- ],
- "time": "2022-12-30T00:15:36+00:00"
- },
{
"name": "felixfbecker/advanced-json-rpc",
"version": "v3.2.1",
@@ -1163,16 +1094,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": {
@@ -1212,7 +1143,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": [
{
@@ -1220,7 +1151,7 @@
"type": "github"
}
],
- "time": "2022-12-16T22:01:02+00:00"
+ "time": "2022-12-24T12:35:10+00:00"
},
{
"name": "laminas/laminas-coding-standard",
@@ -1280,16 +1211,16 @@
},
{
"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": {
@@ -1327,7 +1258,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": [
{
@@ -1335,20 +1266,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": {
@@ -1384,22 +1315,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.5",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039"
+ "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e"
},
"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/11e2663a5bc9db5d714eedb4277ee300403b4a9e",
+ "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e",
"shasum": ""
},
"require": {
@@ -1440,9 +1371,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.5"
},
- "time": "2023-01-16T22:05:37+00:00"
+ "time": "2023-05-19T20:20:00+00:00"
},
{
"name": "phar-io/manifest",
@@ -1766,44 +1697,44 @@
},
{
"name": "phpunit/php-code-coverage",
- "version": "9.2.24",
+ "version": "10.1.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed"
+ "reference": "db1497ec8dd382e82c962f7abbe0320e4882ee4e"
},
"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/db1497ec8dd382e82c962f7abbe0320e4882ee4e",
+ "reference": "db1497ec8dd382e82c962f7abbe0320e4882ee4e",
"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": {
@@ -1831,7 +1762,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.2"
},
"funding": [
{
@@ -1839,32 +1771,32 @@
"type": "github"
}
],
- "time": "2023-01-26T08:26:55+00:00"
+ "time": "2023-05-22T09:04:27+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": {
@@ -1891,7 +1823,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": [
{
@@ -1899,28 +1832,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": "*"
@@ -1928,7 +1861,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1-dev"
+ "dev-main": "4.0-dev"
}
},
"autoload": {
@@ -1954,7 +1887,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": [
{
@@ -1962,32 +1895,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": {
@@ -2013,7 +1946,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": [
{
@@ -2021,32 +1954,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": {
@@ -2072,7 +2005,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": [
{
@@ -2080,24 +2013,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": "*",
@@ -2107,27 +2039,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"
@@ -2135,7 +2066,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "9.5-dev"
+ "dev-main": "10.1-dev"
}
},
"autoload": {
@@ -2166,7 +2097,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": [
{
@@ -2182,7 +2114,7 @@
"type": "tidelift"
}
],
- "time": "2023-01-14T12:32:24+00:00"
+ "time": "2023-05-11T05:16:22+00:00"
},
{
"name": "psalm/plugin-phpunit",
@@ -2296,28 +2228,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": {
@@ -2340,7 +2272,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": [
{
@@ -2348,32 +2280,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": {
@@ -2396,7 +2328,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": [
{
@@ -2404,32 +2336,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": {
@@ -2451,7 +2383,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": [
{
@@ -2459,34 +2391,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": {
@@ -2525,7 +2459,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": [
{
@@ -2533,33 +2467,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": {
@@ -2582,7 +2516,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": [
{
@@ -2590,33 +2524,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": {
@@ -2648,7 +2582,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": [
{
@@ -2656,27 +2591,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": "*"
@@ -2684,7 +2619,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.1-dev"
+ "dev-main": "6.0-dev"
}
},
"autoload": {
@@ -2703,7 +2638,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",
@@ -2711,7 +2646,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": [
{
@@ -2719,34 +2655,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": {
@@ -2788,7 +2724,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": [
{
@@ -2796,38 +2732,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": {
@@ -2852,7 +2785,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": [
{
@@ -2860,33 +2793,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": {
@@ -2909,7 +2842,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": [
{
@@ -2917,34 +2850,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": {
@@ -2966,7 +2899,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": [
{
@@ -2974,32 +2907,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": {
@@ -3021,7 +2954,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": [
{
@@ -3029,32 +2962,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": {
@@ -3081,10 +3014,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"
+ "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0"
},
"funding": [
{
@@ -3092,87 +3025,32 @@
"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"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "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": {
@@ -3195,7 +3073,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": [
{
@@ -3203,29 +3081,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": {
@@ -3248,7 +3126,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": [
{
@@ -3256,7 +3134,7 @@
"type": "github"
}
],
- "time": "2020-09-28T06:39:44+00:00"
+ "time": "2023-02-07T11:34:05+00:00"
},
{
"name": "slevomat/coding-standard",
@@ -3321,26 +3199,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",
@@ -3369,7 +3246,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": [
{
@@ -3381,20 +3258,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": {
@@ -3430,31 +3307,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"
@@ -3511,12 +3390,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": [
{
@@ -3532,29 +3411,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",
@@ -3583,7 +3462,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": [
{
@@ -3599,24 +3478,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"
},
@@ -3646,7 +3525,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": [
{
@@ -3662,7 +3541,7 @@
"type": "tidelift"
}
],
- "time": "2023-01-20T17:44:14+00:00"
+ "time": "2023-04-18T13:46:08+00:00"
},
{
"name": "symfony/polyfill-ctype",
@@ -4079,20 +3958,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",
@@ -4104,6 +3983,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"
},
@@ -4144,7 +4024,7 @@
"utf8"
],
"support": {
- "source": "https://github.com/symfony/string/tree/v6.0.19"
+ "source": "https://github.com/symfony/string/tree/v6.2.8"
},
"funding": [
{
@@ -4160,7 +4040,7 @@
"type": "tidelift"
}
],
- "time": "2023-01-01T08:36:10+00:00"
+ "time": "2023-03-20T16:06:02+00:00"
},
{
"name": "theseer/tokenizer",
@@ -4214,22 +4094,22 @@
},
{
"name": "vimeo/psalm",
- "version": "5.6.0",
+ "version": "5.12.0",
"source": {
"type": "git",
"url": "https://github.com/vimeo/psalm.git",
- "reference": "e784128902dfe01d489c4123d69918a9f3c1eac5"
+ "reference": "f90118cdeacd0088e7215e64c0c99ceca819e176"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/vimeo/psalm/zipball/e784128902dfe01d489c4123d69918a9f3c1eac5",
- "reference": "e784128902dfe01d489c4123d69918a9f3c1eac5",
+ "url": "https://api.github.com/repos/vimeo/psalm/zipball/f90118cdeacd0088e7215e64c0c99ceca819e176",
+ "reference": "f90118cdeacd0088e7215e64c0c99ceca819e176",
"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",
@@ -4242,12 +4122,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"
},
@@ -4255,14 +4135,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",
@@ -4308,34 +4189,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.12.0"
},
- "time": "2023-01-23T20:32:47+00:00"
+ "time": "2023-05-22T21:19:03+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": {
@@ -4361,7 +4243,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": [
{
@@ -4369,7 +4251,7 @@
"type": "github"
}
],
- "time": "2022-02-15T19:52:12+00:00"
+ "time": "2023-03-09T15:05:18+00:00"
},
{
"name": "webmozart/assert",
@@ -4436,13 +4318,13 @@
"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": {
"ext-json": "*"
},
"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 461e8156..59245b24 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -3,17 +3,26 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
- convertDeprecationsToExceptions="true"
- colors="true">
-
-
- src
-
-
-
+ colors="true"
+ cacheDirectory=".phpunit.cache"
+ displayDetailsOnIncompleteTests="true"
+ displayDetailsOnSkippedTests="true"
+ displayDetailsOnTestsThatTriggerDeprecations="true"
+ displayDetailsOnTestsThatTriggerErrors="true"
+ displayDetailsOnTestsThatTriggerNotices="true"
+ displayDetailsOnTestsThatTriggerWarnings="true"
+ failOnWarning="true"
+ failOnDeprecation="true"
+ failOnNotice="true"
+>
./test
+
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
index fa8a7848..5d159a66 100644
--- a/psalm-baseline.xml
+++ b/psalm-baseline.xml
@@ -1,218 +1,246 @@
-
+
-
+
is_array($value)
-
- $this->prepareRequiredValidationFailureMessage()
- $this->prepareRequiredValidationFailureMessage()
+
+ prepareRequiredValidationFailureMessage()]]>
+ prepareRequiredValidationFailureMessage()]]>
-
- $this->getFallbackValue()
- $this->getFallbackValue()
+
+ getFallbackValue()]]>
+ getFallbackValue()]]>
-
+
$result[$key]
$value
$value
-
+
$value
$value
-
+
$value
-
- $input instanceof InputInterface && (empty($name) || is_int($name))
+
+
-
+
$messages
-
- array<string, array<array-key, string>>
+
+ >]]>
-
+
$input
-
+
$inputs
-
+
$inputContext
$unknownInputs[$key]
$value
-
+
$inputs
-
+
$input
-
- $this->inputs
+
+ inputs]]>
-
+
(string) $name
-
+
isValid
isValid
+
+ DocblockTypeContradiction
+ RedundantConditionGivenDocblockType
+ RedundantConditionGivenDocblockType
+
-
+
$name
$name
-
- array<array-key, array<string, array<array-key, string>>>
- array<array-key, array<string, array<array-key, string>>>
+
+ >>]]>
+ >>]]>
-
+
$data
-
+
$name
- $this->collectionMessages
- $this->collectionMessages
- $this->invalidInputs
- $this->validInputs
+ collectionMessages]]>
+ collectionMessages]]>
+ invalidInputs]]>
+ validInputs]]>
-
- array<array-key, array>
- array<array-key, array>
+
+ ]]>
+ ]]>
-
+
$data
-
+
$data
+
+ array[]
+ array[]
+
+
+ DocblockTypeContradiction
+ DocblockTypeContradiction
+ DocblockTypeContradiction
+ RedundantConditionGivenDocblockType
+ RedundantConditionGivenDocblockType
+ RedundantConditionGivenDocblockType
+
+
+
+
+ self
+
-
+
$inputFilter
-
+
InputFilterInterface
-
- $inputFilterSpecification['count']
- $inputFilterSpecification['input_filter']
- $inputFilterSpecification['required']
- $inputFilterSpecification['required_message']
+
+
+
+
+
$key
$name
$priority
$value
- $value['type']
+
-
+
$filter
$inputSpecification
$key
-
- $filter['name']
- $filter['options']
- $filter['priority']
+
+
+
+
-
+
$key
$name
$options
$priority
$value
-
+
new $class()
-
+
$value
$value
-
+
add
add
+
+ DeprecatedMethod
+ DocblockTypeContradiction
+ DocblockTypeContradiction
+ RedundantConditionGivenDocblockType
+
-
- $this->prepareRequiredValidationFailureMessage()
+
+ prepareRequiredValidationFailureMessage()]]>
-
+
$rawValue
-
+
$value
$value
-
+
$fileData
$newValue[]
$rawValue
$value
$value
-
+
is_array($rawValue)
is_array($rawValue)
-
+
$rawValue[0]
-
+
$fileData
$newValue[]
$rawValue
$value
$value
-
+
UploadedFileInterface|UploadedFileInterface[]
-
- $filter->filter($value)
+
+ filter($value)]]>
$value
-
+
$newValue
-
+
$rawValue
-
- is_array($this->errorMessage)
+
+ errorMessage)]]>
-
+
null|string
-
- $this->prepareRequiredValidationFailureMessage()
+
+ prepareRequiredValidationFailureMessage()]]>
-
- $notEmpty->getTranslatorTextDomain()
+
+ getTranslatorTextDomain()]]>
-
+
$translator
$value
-
+
getOption
getTranslator
getTranslatorTextDomain
-
+
(bool) $allowEmpty
(bool) $breakOnFailure
(bool) $continueIfEmpty
@@ -220,26 +248,29 @@
-
+
+ $input
+
+
$input
-
+
InputFilterAbstractServiceFactory
-
+
$config
-
- $allConfig['input_filter_specs']
- $allConfig['input_filter_specs'][$rName]
+
+
+
-
+
$allConfig
$config
-
+
$cName
$container
$container
@@ -248,125 +279,207 @@
$services
+
+
+ getInputFilter
+ setInputFilter
+
+
+
+
+ InputFilterInterface
+
+
+
+
+ InputFilterInterface
+
+
-
+
+ null|ConfigInterface|ContainerInterface
+
+
InputFilterPluginManager
InputFilterPluginManager
-
+
+ Plu
+
+
$factories
-
- $this->initializers
- $this->initializers
+
+ validatePlugin
+
+
+ $shareByDefault
+
+
+ initializers]]>
+ initializers]]>
-
+
+
+
+
InputFilterPluginManagerFactory
-
+
$container
+
+ setCreationOptions
+
+
+ MismatchingDocblockParamType
+ MismatchingDocblockParamType
+ MoreSpecificImplementedParamType
+
+
+
+
+ $this
+ $this
+ $this
+ $this
+ $this
+ $this
+ $this
+ $this
+
-
+
+ $moduleManager
+
+
ModuleManager
-
- array<string, mixed>|null
- array<string, mixed>|null
+
+ |null]]>
+ |null]]>
-
+
$valueMap
-
+
+ ]]>
string[]
-
+
$dataSets
-
-
+
+ ,
+ * filtered: null|string|array
+ * }>]]>
+
+
$set
$set
$set
-
- $this->input->getValue()
+
+ input->getValue()]]>
-
- $set['raw']
- $set['raw']
+
+
+
$set[1]
$set[2]
$set[4]
-
- $set['raw']
- $set['raw']
+
+
+
$set[1]
$set[2]
$set[4]
-
+
$value
$values[0]
$values[0]
$values[1]
-
+
$dataSets
$dataSets
+ ]]>
+ |object>,
+ * filtered: bool|int|float|string|list|object
+ * }>]]>
-
+
isArray
isArray
-
- ['nested' => ['nested-input1', 'nested-input2']]
+
+ enableProxyingToOriginalMethods
+ enableProxyingToOriginalMethods
+
+
+ ['nested-input1', 'nested-input2']]]]>
-
- public function addMethodArgumentsProvider(): array
-
-
+
+ $dataSets
+
+
$inputTypeData
$inputTypeData
-
- static fn($inputTypeData) => $inputTypeData[1]
- static fn($inputTypeData) => $inputTypeData[2]
+
+ $inputTypeData[1]]]>
+ $inputTypeData[2]]]>
-
- $dataTypes['Traversable']($data)
+
+
$input
$set[5]
$set[6]
-
+
+ $getMessages
$msg
$msg
$name
-
- $filter1->getValues()['nested']['nestedField1']
- $filter1->getValues()['nested']['nestedField1']
- $filter1->getValues()['nested']['nestedField1']
+
+ getValues()['nested']['nestedField1']]]>
+ getValues()['nested']['nestedField1']]]>
+ getValues()['nested']['nestedField1']]]>
$inputTypeData[1]
$inputTypeData[2]
-
+
$set[0][$name]
$set[5][$name]
$set[6][$name]
-
+
$expectedRawValue
$expectedValue
$input
@@ -377,147 +490,334 @@
$tmpTemplate[2]
$tmpTemplate[3]
-
-
+
$dataSets
+ ,
+ * 1: iterable,
+ * 2: array,
+ * 3: array,
+ * 4: bool,
+ * 5: list,
+ * 6: list,
+ * 7: string[]
+ * }>]]>
-
+
+ ]]>
+
+
$input
$input
$input
-
+
$expectedInputName
$expectedInputName
$expectedInputName
$expectedInputName
$expectedInputName
-
+
getName
getName
isRequired
+
+ addMethodArgumentsProvider
+ contextProvider
+ setDataArgumentsProvider
+ unknownScenariosProvider
+
+
+ $inputName
+
+
+
+
+ $errorMessage
+
+
+ [$required, $count, $data, $inputFilter, $expectedRaw, $expectedValues, $expectedValid, $expectedMessages]
+ 'Required: T, Count: N, Valid: T' => [ $isRequired, null, $colRaw, $validIF() , $colRaw, $colFiltered, true , []],
+ 'Required: T, Count: N, Valid: F' => [ $isRequired, null, $colRaw, $invalidIF(), $colRaw, $colFiltered, false, $colMessages],
+ 'Required: T, Count: +1, Valid: F' => [ $isRequired, 2, $colRaw, $invalidIF(), $colRaw, $colFiltered, false, $colMessages],
+ 'Required: F, Count: N, Valid: T' => [! $isRequired, null, $colRaw, $validIF() , $colRaw, $colFiltered, true , []],
+ 'Required: F, Count: N, Valid: F' => [! $isRequired, null, $colRaw, $invalidIF(), $colRaw, $colFiltered, false, $colMessages],
+ 'Required: F, Count: +1, Valid: F' => [! $isRequired, 2, $colRaw, $invalidIF(), $colRaw, $colFiltered, false, $colMessages],
+ 'Required: T, Data: [], Valid: X' => [ $isRequired, null, [] , $noValidIF(), [] , [] , false, [['isEmpty' => 'Value is required and can\'t be empty']]],
+ 'Required: F, Data: [], Valid: X' => [! $isRequired, null, [] , $noValidIF(), [] , [] , true , []],
+ ]]]>
+
+
+ ]]>
+
+
+ contextProvider
+ countVsDataProvider
+ dataNestingCollection
+ dataVsValidProvider
+ inputFilterProvider
+ invalidCollections
+ invalidDataType
+ isRequiredProvider
+
-
+
getPluginManager
getPluginManager
-
+
breakOnFailure
breakOnFailure
-
+
+ inputTypeSpecificationProvider
+
+
continueIfEmpty
-
- array<string, string>
+
+ ]]>
-
- ''
- ''
+
+
+
-
+
$dataSets
-
+
iterable
-
+
$input
-
- new FileInput('foo')
+
+
-
+
UploadedFileInterface
+ ]]>
+ ,
+ * filtered: UploadedFileInterface
+ * }>]]>
-
-
+
+ ]]>
+
+
$input
-
- new FileInput('foo')
+
+
-
+
$generator instanceof Generator
-
-
- InputFilterAwareTrait::class
- InputFilterAwareTrait::class
-
-
- getInputFilter
- getInputFilter
- setInputFilter
- setInputFilter
-
-
-
+
getInstanceOf
+
+
+ pluginProvider
+
+
-
-
+
+ [$serviceName, $service, $instanceOf]
+ 'InputFilterInterface' => ['inputFilterInterfaceService', $inputFilterInterfaceMock, InputFilterInterface::class],
+ 'InputInterface' => ['inputInterfaceService', $inputInterfaceMock, InputInterface::class],
+ ]]]>
+
+
+
+ * }>]]>
+
+
+ defaultInvokableClassesProvider
+ serviceProvider
+
-
-
+
+ ]]>
+
+
$dataSets
-
-
+
+ ]]>
+
+
$inputFilter
-
+
$factory
-
-
-
+
+ [$value]
+ '"0"' => [
+ 'raw' => '0',
+ 'filtered' => '0',
+ ],
+ '0' => [
+ 'raw' => 0,
+ 'filtered' => 0,
+ ],
+ '0.0' => [
+ 'raw' => 0.0,
+ 'filtered' => 0.0,
+ ],
+ /* @todo enable me
+ 'false' => [
+ 'raw' => false,
+ 'filtered' => false,
+ ],
+ */
+ 'php' => [
+ 'raw' => 'php',
+ 'filtered' => 'php',
+ ],
+ /* @todo enable me
+ 'whitespace' => [
+ 'raw' => ' ',
+ 'filtered' => ' ',
+ ],
+ */
+ '1' => [
+ 'raw' => 1,
+ 'filtered' => 1,
+ ],
+ '1.0' => [
+ 'raw' => 1.0,
+ 'filtered' => 1.0,
+ ],
+ 'true' => [
+ 'raw' => true,
+ 'filtered' => true,
+ ],
+ '["php"]' => [
+ 'raw' => ['php'],
+ 'filtered' => ['php'],
+ ],
+ 'object' => [
+ 'raw' => new stdClass(),
+ 'filtered' => new stdClass(),
+ ],
+ ]]]>
+
+
+ ]]>
+
+
array_merge($emptyValues, $mixedValues)
-
- $context
- $context
- $context
- $value
- $value
- $value
-
-
- $value['filtered']
- $value['raw']
+
+
+
-
+
$tmpTemplate[4]
$value
-
+
method
willReturn
with
-
-
+
+ |object,
+ * filtered: bool|int|float|string|list|object
+ * }>]]>
+
+
$translator
-
+
expects
-
+
isArray
+
+
+ getParam
+
+
+
+
+ getEvent
+
+
+
+
+ addServiceManager
+
+
+
+
+ collectionCountProvider
+
+
diff --git a/psalm.xml.dist b/psalm.xml.dist
index 46df1f56..62def1af 100644
--- a/psalm.xml.dist
+++ b/psalm.xml.dist
@@ -5,7 +5,11 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
- errorBaseline="psalm-baseline.xml">
+ errorBaseline="psalm-baseline.xml"
+ findUnusedCode="true"
+ findUnusedBaselineEntry="true"
+ findUnusedPsalmSuppress="true"
+>
@@ -14,31 +18,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/InputFilterAwareTrait.php b/src/InputFilterAwareTrait.php
index 59936f07..53f0bdc0 100644
--- a/src/InputFilterAwareTrait.php
+++ b/src/InputFilterAwareTrait.php
@@ -6,7 +6,7 @@
trait InputFilterAwareTrait
{
- /** @var InputFilterInterface */
+ /** @var InputFilterInterface|null */
protected $inputFilter;
/**
diff --git a/src/InputFilterInterface.php b/src/InputFilterInterface.php
index 308f404d..d1a5eff6 100644
--- a/src/InputFilterInterface.php
+++ b/src/InputFilterInterface.php
@@ -38,7 +38,7 @@
* }
* @psalm-type InputFilterSpecification = array{
* type?: class-string|string,
- * }&array
+ * }&array
* @psalm-type CollectionSpecification = array{
* type?: class-string|string,
* input_filter?: InputFilterSpecification|InputFilterInterface,
diff --git a/test/ArrayInputTest.php b/test/ArrayInputTest.php
index 0c7d78b5..db2525b7 100644
--- a/test/ArrayInputTest.php
+++ b/test/ArrayInputTest.php
@@ -7,8 +7,9 @@
use Laminas\Filter\FilterChain;
use Laminas\InputFilter\ArrayInput;
use Laminas\InputFilter\Exception\InvalidArgumentException;
-use Laminas\Validator\NotEmpty;
+use Laminas\Validator\NotEmpty as NotEmptyValidator;
use Laminas\Validator\ValidatorChain;
+use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\MockObject\MockObject;
use Webmozart\Assert\Assert;
@@ -18,9 +19,7 @@
use function current;
use function is_array;
-/**
- * @covers \Laminas\InputFilter\ArrayInput
- */
+#[CoversClass(ArrayInput::class)]
class ArrayInputTest extends InputTest
{
protected function setUp(): void
@@ -76,7 +75,7 @@ public function testSetValueWithInvalidInputTypeThrowsInvalidArgumentException()
* 4: string[]
* }>
*/
- public function fallbackValueVsIsValidProvider(): array
+ public static function fallbackValueVsIsValidProvider(): array
{
$dataSets = parent::fallbackValueVsIsValidProvider();
Assert::isArray($dataSets);
@@ -95,7 +94,7 @@ public function fallbackValueVsIsValidProvider(): array
* filtered: null|string|array
* }>
*/
- public function emptyValueProvider(): iterable
+ public static function emptyValueProvider(): iterable
{
$dataSets = parent::emptyValueProvider();
Assert::isArray($dataSets);
@@ -112,7 +111,7 @@ public function emptyValueProvider(): iterable
* filtered: bool|int|float|string|list|object
* }>
*/
- public function mixedValueProvider(): array
+ public static function mixedValueProvider(): array
{
$dataSets = parent::mixedValueProvider();
Assert::isArray($dataSets);
@@ -167,14 +166,11 @@ static function ($values) {
return parent::createValidatorChainMock($valueMap, $messages);
}
- /**
- * @param bool $isValid
- * @param mixed $value
- * @param mixed $context
- * @return NotEmpty&MockObject
- */
- protected function createNonEmptyValidatorMock($isValid, $value, $context = null)
- {
+ protected function createNonEmptyValidatorMock(
+ bool $isValid,
+ mixed $value,
+ mixed $context = null,
+ ): NotEmptyValidator&MockObject {
// ArrayInput validates per each array value
if (is_array($value)) {
$value = current($value);
diff --git a/test/BaseInputFilterTest.php b/test/BaseInputFilterTest.php
index b8282d76..0ec4607e 100644
--- a/test/BaseInputFilterTest.php
+++ b/test/BaseInputFilterTest.php
@@ -12,6 +12,10 @@
use Laminas\InputFilter\InputFilterInterface;
use Laminas\InputFilter\InputInterface;
use Laminas\InputFilter\UnfilteredDataInterface;
+use LaminasTest\InputFilter\TestAsset\InputFilterInterfaceStub;
+use LaminasTest\InputFilter\TestAsset\InputInterfaceStub;
+use PHPUnit\Framework\Attributes\CoversClass;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use ReflectionObject;
@@ -28,9 +32,7 @@
use const JSON_THROW_ON_ERROR;
-/**
- * @covers \Laminas\InputFilter\BaseInputFilter
- */
+#[CoversClass(BaseInputFilter::class)]
class BaseInputFilterTest extends TestCase
{
/** @var BaseInputFilter */
@@ -140,7 +142,6 @@ public function testSetValidationGroupSkipsRecursionWhenInputIsNotAnInputFilter(
$r = new ReflectionObject($inputFilter);
$p = $r->getProperty('validationGroup');
- $p->setAccessible(true);
self::assertEquals(['fooInput'], $p->getValue($inputFilter));
}
@@ -164,7 +165,6 @@ public function testSetValidationGroupAllowsSpecifyingArrayOfInputsToNestedInput
$r = new ReflectionObject($inputFilter);
$p = $r->getProperty('validationGroup');
- $p->setAccessible(true);
self::assertEquals(['nested'], $p->getValue($inputFilter));
self::assertEquals(['nested-input1', 'nested-input2'], $p->getValue($nestedInputFilter));
}
@@ -209,9 +209,8 @@ public function testGetUnknownThrowExceptionIfDataWasNotSetYet(): void
/**
* Verify the state of the input filter is the desired after change it using the method `add()`
- *
- * @dataProvider addMethodArgumentsProvider
*/
+ #[DataProvider('addMethodArgumentsProvider')]
public function testAddHasGet(
InputInterface|InputFilterInterface|iterable $input,
?string $name,
@@ -238,9 +237,8 @@ public function testAddHasGet(
/**
* Verify the state of the input filter is the desired after change it using the method `add()` and `remove()`
- *
- * @dataProvider addMethodArgumentsProvider
*/
+ #[DataProvider('addMethodArgumentsProvider')]
public function testAddRemove(
InputInterface|InputFilterInterface|iterable $input,
?string $name,
@@ -270,9 +268,7 @@ public function testAddingInputWithNameDoesNotInjectNameInInput(): void
self::assertEquals('foo', $foo->getName(), 'Input name should not change');
}
- /**
- * @dataProvider inputProvider
- */
+ #[DataProvider('inputProvider')]
public function testReplace(
InputInterface|InputFilterInterface|iterable $input,
?string $inputName,
@@ -294,7 +290,6 @@ public function testReplace(
}
/**
- * @dataProvider setDataArgumentsProvider
* @param array $inputs
* @param iterable $data
* @param array $expectedRawValues
@@ -303,6 +298,7 @@ public function testReplace(
* @param list $expectedValidInputs
* @param string[] $expectedMessages
*/
+ #[DataProvider('setDataArgumentsProvider')]
public function testSetDataAndGetRawValueGetValue(
array $inputs,
iterable $data,
@@ -353,7 +349,6 @@ public function testSetDataAndGetRawValueGetValue(
}
/**
- * @dataProvider setDataArgumentsProvider
* @param array $inputs
* @param iterable $data
* @param array $expectedRawValues
@@ -362,6 +357,7 @@ public function testSetDataAndGetRawValueGetValue(
* @param list $expectedValidInputs
* @param string[] $expectedMessages
*/
+ #[DataProvider('setDataArgumentsProvider')]
public function testSetTraversableDataAndGetRawValueGetValue(
array $inputs,
iterable $data,
@@ -438,7 +434,7 @@ public function testResetEmptyValidationGroupRecursively(): void
* 2: array|string
* }>
*/
- public function contextProvider(): array
+ public static function contextProvider(): array
{
$data = ['fooInput' => 'fooValue'];
$traversableData = new ArrayObject(['fooInput' => 'fooValue']);
@@ -453,15 +449,15 @@ public function contextProvider(): array
}
/**
- * @dataProvider contextProvider
* @param iterable $data
* @param string|array $expectedContext
*/
+ #[DataProvider('contextProvider')]
public function testValidationContext($data, ?string $customContext, $expectedContext): void
{
$filter = $this->inputFilter;
- $input = $this->createInputInterfaceMock('fooInput', true, true, $expectedContext);
+ $input = self::createInputInterfaceMock('fooInput', true, true, $expectedContext);
$filter->add($input, 'fooInput');
$filter->setData($data);
@@ -478,7 +474,7 @@ public function testBuildValidationContextUsingInputGetRawValue(): void
$expectedContext = ['fooInput' => 'fooRawValue'];
$filter = $this->inputFilter;
- $input = $this->createInputInterfaceMock('fooInput', true, true, $expectedContext, 'fooRawValue');
+ $input = self::createInputInterfaceMock('fooInput', true, true, $expectedContext, 'fooRawValue');
$filter->add($input, 'fooInput');
$filter->setData($data);
@@ -498,8 +494,8 @@ public function testContextIsTheSameWhenARequiredInputIsGivenAndOptionalInputIsM
'inputRequired' => 'inputRequiredValue',
'inputOptional' => null,
];
- $inputRequired = $this->createInputInterfaceMock('fooInput', true, true, $expectedContext);
- $inputOptional = $this->createInputInterfaceMock('fooInput', false);
+ $inputRequired = self::createInputInterfaceMock('fooInput', true, true, $expectedContext);
+ $inputOptional = self::createInputInterfaceMock('fooInput', false);
$filter = $this->inputFilter;
$filter->add($inputRequired, 'inputRequired');
@@ -546,9 +542,7 @@ public function testValidationSkipsFieldsMarkedNotRequiredWhenNoDataPresent(): v
);
}
- /**
- * @dataProvider unknownScenariosProvider
- */
+ #[DataProvider('unknownScenariosProvider')]
public function testUnknown(array $inputs, array $data, bool $hasUnknown, array $getUnknown): void
{
$inputFilter = $this->inputFilter;
@@ -707,16 +701,16 @@ public function testSetDataUsingSetDataAndApplyFiltersReturningSameAsOriginalFor
}
/**
- * @psalm-return
*/
- public function addMethodArgumentsProvider(): array
+ public static function addMethodArgumentsProvider(): array
{
- $inputTypes = $this->inputProvider();
+ $inputTypes = static::inputProvider();
$inputName = static fn($inputTypeData) => $inputTypeData[1];
@@ -761,7 +755,7 @@ public function addMethodArgumentsProvider(): array
* 7: string[]
* }>
*/
- public function setDataArgumentsProvider(): array
+ public static function setDataArgumentsProvider(): array
{
$iAName = 'InputA';
$iBName = 'InputB';
@@ -785,7 +779,7 @@ public function setDataArgumentsProvider(): array
/**
* @param array $msg
- * @return callable(): InputInterface&MockObject
+ * @return callable(): InputInterface
*/
$input = function (
string $iName,
@@ -797,7 +791,7 @@ public function setDataArgumentsProvider(): array
$vRaw,
$vFiltered
): callable {
- return fn(array|null|string $context): InputInterface => $this->createInputInterfaceMock(
+ return fn(array|null|string $context): InputInterface => self::createInputInterfaceMock(
$iName,
$required,
$isValid,
@@ -810,10 +804,10 @@ public function setDataArgumentsProvider(): array
};
$inputFilter = fn(bool $isValid, array $msg = []): callable =>
- function (array|null|string $context) use ($isValid, $vRaw, $vFiltered, $msg): InputFilterInterface {
+ function () use ($isValid, $vRaw, $vFiltered, $msg): InputFilterInterface {
$vRaw = ['fooInput' => $vRaw];
$vFiltered = ['fooInput' => $vFiltered];
- return $this->createInputFilterInterfaceMock($isValid, $context, $vRaw, $vFiltered, $msg);
+ return BaseInputFilterTest::createInputFilterInterfaceMock($isValid, $vRaw, $vFiltered, $msg);
};
// phpcs:disable Generic.Formatting.MultipleStatementAlignment.NotSame,Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma,WebimpressCodingStandard.WhiteSpace.CommaSpacing.SpacingAfterComma
@@ -893,9 +887,9 @@ static function (array &$set): void {
* 3: array
* }>
*/
- public function unknownScenariosProvider(): array
+ public static function unknownScenariosProvider(): array
{
- $inputA = $this->createInputInterfaceMock('inputA', true);
+ $inputA = self::createInputInterfaceMock('inputA', true);
$dataA = ['inputA' => 'foo'];
$dataUnknown = ['inputUnknown' => 'unknownValue'];
$dataAAndUnknown = array_merge($dataA, $dataUnknown);
@@ -915,15 +909,15 @@ public function unknownScenariosProvider(): array
/**
* @psalm-return array
*/
- public function inputProvider(): array
+ public static function inputProvider(): array
{
- $input = $this->createInputInterfaceMock('fooInput', null);
- $inputFilter = $this->createInputFilterInterfaceMock();
+ $input = self::createInputInterfaceMock('fooInput', null);
+ $inputFilter = self::createInputFilterInterfaceMock();
// phpcs:disable WebimpressCodingStandard.WhiteSpace.CommaSpacing.SpaceBeforeComma
return [
@@ -937,41 +931,19 @@ public function inputProvider(): array
/**
* @param array $getRawValues
* @param array $getValues
- * @param string[] $getMessages
- * @return MockObject&InputFilterInterface
+ * @param array> $getMessages
*/
- protected function createInputFilterInterfaceMock(
+ private static function createInputFilterInterfaceMock(
bool|null $isValid = null,
- mixed $context = null,
array $getRawValues = [],
array $getValues = [],
array $getMessages = []
- ) {
- /** @var InputFilterInterface&MockObject $inputFilter */
- $inputFilter = $this->createMock(InputFilterInterface::class);
- $inputFilter->method('getRawValues')
- ->willReturn($getRawValues);
- $inputFilter->method('getValues')
- ->willReturn($getValues);
- if (($isValid === false) || ($isValid === true)) {
- $inputFilter->expects(self::once())
- ->method('isValid')
- ->willReturn($isValid);
- } else {
- $inputFilter->expects(self::never())
- ->method('isValid');
- }
- $inputFilter->method('getMessages')
- ->willReturn($getMessages);
-
- return $inputFilter;
+ ): InputFilterInterfaceStub {
+ return new InputFilterInterfaceStub($isValid, $getRawValues, $getValues, $getMessages);
}
- /**
- * @param string[] $getMessages
- * @return MockObject&InputInterface
- */
- protected function createInputInterfaceMock(
+ /** @param array $getMessages */
+ private static function createInputInterfaceMock(
string $name,
bool|null $isRequired,
bool|null $isValid = null,
@@ -980,33 +952,17 @@ protected function createInputInterfaceMock(
mixed $getValue = null,
array $getMessages = [],
bool $breakOnFailure = false
- ) {
- /** @var InputInterface&MockObject $input */
- $input = $this->createMock(InputInterface::class);
- $input->method('getName')
- ->willReturn($name);
- $input->method('isRequired')
- ->willReturn($isRequired);
- $input->method('getRawValue')
- ->willReturn($getRawValue);
- $input->method('getValue')
- ->willReturn($getValue);
- $input->method('breakOnFailure')
- ->willReturn($breakOnFailure);
- if (($isValid === false) || ($isValid === true)) {
- $input->expects(self::any())
- ->method('isValid')
- ->with($context)
- ->willReturn($isValid);
- } else {
- $input->expects(self::never())
- ->method('isValid')
- ->with($context);
- }
- $input->method('getMessages')
- ->willReturn($getMessages);
-
- return $input;
+ ): InputInterfaceStub {
+ return new InputInterfaceStub(
+ $name,
+ $isRequired,
+ $isValid,
+ $context,
+ $getRawValue,
+ $getValue,
+ $getMessages,
+ $breakOnFailure,
+ );
}
/**
diff --git a/test/CollectionInputFilterTest.php b/test/CollectionInputFilterTest.php
index 1d85c2a6..dcd49763 100644
--- a/test/CollectionInputFilterTest.php
+++ b/test/CollectionInputFilterTest.php
@@ -15,6 +15,9 @@
use Laminas\Validator\Between;
use Laminas\Validator\Digits;
use Laminas\Validator\NotEmpty;
+use LaminasTest\InputFilter\TestAsset\InputFilterInterfaceStub;
+use PHPUnit\Framework\Attributes\CoversClass;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use stdClass;
@@ -26,9 +29,9 @@
use const JSON_THROW_ON_ERROR;
/**
- * @covers \Laminas\InputFilter\CollectionInputFilter
* @psalm-import-type InputFilterSpecification from InputFilterInterface
*/
+#[CoversClass(CollectionInputFilter::class)]
class CollectionInputFilterTest extends TestCase
{
private CollectionInputFilter $inputFilter;
@@ -51,10 +54,10 @@ public function testSetInputFilterWithInvalidTypeThrowsInvalidArgumentException(
}
/**
- * @dataProvider inputFilterProvider
* @param InputFilterSpecification|Traversable|BaseInputFilter $inputFilter
* @param class-string $expectedType
*/
+ #[DataProvider('inputFilterProvider')]
public function testSetInputFilter(mixed $inputFilter, string $expectedType): void
{
$this->inputFilter->setInputFilter($inputFilter);
@@ -67,18 +70,14 @@ public function testGetDefaultInputFilter(): void
self::assertInstanceOf(BaseInputFilter::class, $this->inputFilter->getInputFilter());
}
- /**
- * @dataProvider isRequiredProvider
- */
+ #[DataProvider('isRequiredProvider')]
public function testSetRequired(bool $value): void
{
$this->inputFilter->setIsRequired($value);
self::assertEquals($value, $this->inputFilter->getIsRequired());
}
- /**
- * @dataProvider countVsDataProvider
- */
+ #[DataProvider('countVsDataProvider')]
public function testSetCount(?int $count, ?array $data, int $expectedCount): void
{
if ($count !== null) {
@@ -108,9 +107,7 @@ public function testGetCountReturnsRightCountOnConsecutiveCallsWithDifferentData
self::assertEquals(1, $this->inputFilter->getCount());
}
- /**
- * @dataProvider dataVsValidProvider
- */
+ #[DataProvider('dataVsValidProvider')]
public function testDataVsValid(
bool $required,
?int $count,
@@ -150,7 +147,7 @@ public function testDataVsValid(
* 7: array
* }>
*/
- public function dataVsValidProvider(): array
+ public static function dataVsValidProvider(): array
{
$dataRaw = [
'fooInput' => 'fooRaw',
@@ -166,11 +163,11 @@ public function dataVsValidProvider(): array
$colMessages = [$errorMessage];
$invalidIF = fn(): BaseInputFilter =>
- $this->createBaseInputFilterMock(false, $dataRaw, $dataFiltered, $errorMessage);
+ new InputFilterInterfaceStub(false, $dataRaw, $dataFiltered, $errorMessage);
$validIF = fn(): BaseInputFilter =>
- $this->createBaseInputFilterMock(true, $dataRaw, $dataFiltered);
+ new InputFilterInterfaceStub(true, $dataRaw, $dataFiltered);
$noValidIF = fn(): BaseInputFilter =>
- $this->createBaseInputFilterMock(null, $dataRaw, $dataFiltered);
+ new InputFilterInterfaceStub(null, $dataRaw, $dataFiltered);
$isRequired = true;
// @phpcs:disable Generic.Files.LineLength.TooLong,WebimpressCodingStandard.Arrays.Format.SingleLineSpaceBefore,WebimpressCodingStandard.WhiteSpace.CommaSpacing.SpaceBeforeComma
@@ -222,7 +219,7 @@ public function testSetValidationGroupUsingFormStyle(): void
}
/** @psalm-return array */
- public function dataNestingCollection(): array
+ public static function dataNestingCollection(): array
{
return [
'count not specified' => [
@@ -248,9 +245,7 @@ public function dataNestingCollection(): array
];
}
- /**
- * @dataProvider dataNestingCollection
- */
+ #[DataProvider('dataNestingCollection')]
public function testNestingCollectionCountCached(?int $count, bool $expectedIsValid): void
{
$firstInputFilter = new InputFilter();
@@ -305,7 +300,7 @@ public function testNestingCollectionCountCached(?int $count, bool $expectedIsVa
* 1: class-string
* }>
*/
- public function inputFilterProvider(): array
+ public static function inputFilterProvider(): array
{
$baseInputFilter = new BaseInputFilter();
@@ -330,7 +325,7 @@ public function inputFilterProvider(): array
* 2: int
* }>
*/
- public function countVsDataProvider(): array
+ public static function countVsDataProvider(): array
{
$data0 = [];
$data1 = [['A' => 'a']];
@@ -356,7 +351,7 @@ public function countVsDataProvider(): array
}
/** @psalm-return array */
- public function isRequiredProvider(): array
+ public static function isRequiredProvider(): array
{
return [
'enabled' => [true],
@@ -446,7 +441,7 @@ public function testGetUnknownFieldIsUnknown(): void
}
/** @psalm-return array */
- public function invalidCollections(): array
+ public static function invalidCollections(): array
{
return [
'null' => [[['this' => 'is valid'], null]],
@@ -461,9 +456,7 @@ public function invalidCollections(): array
];
}
- /**
- * @dataProvider invalidCollections
- */
+ #[DataProvider('invalidCollections')]
public function testSettingDataAsArrayWithInvalidCollectionsRaisesException(array $data): void
{
$collectionInputFilter = $this->inputFilter;
@@ -473,9 +466,7 @@ public function testSettingDataAsArrayWithInvalidCollectionsRaisesException(arra
$collectionInputFilter->setData($data);
}
- /**
- * @dataProvider invalidCollections
- */
+ #[DataProvider('invalidCollections')]
public function testSettingDataAsTraversableWithInvalidCollectionsRaisesException(array $data): void
{
$collectionInputFilter = $this->inputFilter;
@@ -487,7 +478,7 @@ public function testSettingDataAsTraversableWithInvalidCollectionsRaisesExceptio
}
/** @psalm-return array */
- public function invalidDataType(): array
+ public static function invalidDataType(): array
{
return [
'null' => [null],
@@ -502,9 +493,7 @@ public function invalidDataType(): array
];
}
- /**
- * @dataProvider invalidDataType
- */
+ #[DataProvider('invalidDataType')]
public function testSettingDataWithNonArrayNonTraversableRaisesException(mixed $data): void
{
$collectionInputFilter = $this->inputFilter;
@@ -817,9 +806,7 @@ public static function contextProvider(): array
];
}
- /**
- * @dataProvider contextProvider
- */
+ #[DataProvider('contextProvider')]
public function testValidationContext(array $data, ?array $customContext, ?array $expectedContext): void
{
$baseInputFilter = $this->createMock(BaseInputFilter::class);
diff --git a/test/FactoryTest.php b/test/FactoryTest.php
index a865675a..d6d2dfde 100644
--- a/test/FactoryTest.php
+++ b/test/FactoryTest.php
@@ -19,15 +19,15 @@
use Laminas\ServiceManager;
use Laminas\Validator;
use LaminasTest\InputFilter\TestAsset\CustomInput;
+use PHPUnit\Framework\Attributes\CoversClass;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
use function sprintf;
-/**
- * @covers \Laminas\InputFilter\Factory
- */
+#[CoversClass(Factory::class)]
class FactoryTest extends TestCase
{
public function testCreateInputWithInvalidDataTypeThrowsInvalidArgumentException(): void
@@ -49,7 +49,6 @@ public function testCreateInputWithTypeAsAnUnknownPluginAndNotExistsAsClassNameT
->with($type)
->willReturn(false);
- /** @psalm-suppress MixedArgumentTypeCoercion */
$factory = new Factory($pluginManager);
$this->expectException(RuntimeException::class);
@@ -65,7 +64,6 @@ public function testGetInputFilterManagerSettedByItsSetter(): void
{
$pluginManager = $this->createMock(InputFilterPluginManager::class);
$factory = new Factory();
- /** @psalm-suppress MixedArgumentTypeCoercion */
$factory->setInputFilterManager($pluginManager);
self::assertSame($pluginManager, $factory->getInputFilterManager());
}
@@ -73,8 +71,7 @@ public function testGetInputFilterManagerSettedByItsSetter(): void
public function testGetInputFilterManagerWhenYouConstructFactoryWithIt(): void
{
$pluginManager = $this->createMock(InputFilterPluginManager::class);
- /** @psalm-suppress MixedArgumentTypeCoercion */
- $factory = new Factory($pluginManager);
+ $factory = new Factory($pluginManager);
self::assertSame($pluginManager, $factory->getInputFilterManager());
}
@@ -187,7 +184,7 @@ public function testCreateInputWithValidatorsAsAnSpecificationWithMissingNameThr
}
/** @psalm-return array */
- public function inputTypeSpecificationProvider(): array
+ public static function inputTypeSpecificationProvider(): array
{
return [
// Description => [$specificationKey]
@@ -197,9 +194,9 @@ public function inputTypeSpecificationProvider(): array
}
/**
- * @dataProvider inputTypeSpecificationProvider
* @psalm-param 'continue_if_empty'|'fallback_value' $specificationKey
*/
+ #[DataProvider('inputTypeSpecificationProvider')]
public function testCreateInputWithSpecificInputTypeSettingsThrowException(string $specificationKey): void
{
$factory = $this->createDefaultFactory();
@@ -215,7 +212,6 @@ public function testCreateInputWithSpecificInputTypeSettingsThrowException(strin
$this->expectExceptionMessage(
sprintf('"%s" can only set to inputs of type "Laminas\InputFilter\Input"', $specificationKey)
);
- /** @psalm-suppress ArgumentTypeCoercion */
$factory->createInput([
'type' => $type,
$specificationKey => true,
@@ -855,9 +851,6 @@ public function testSetInputFilterManagerOnConstruct(): void
self::assertSame($inputFilterManager, $factory->getInputFilterManager());
}
- /**
- * @covers \Laminas\InputFilter\Factory::createInput
- */
public function testSetsBreakChainOnFailure(): void
{
$factory = $this->createDefaultFactory();
@@ -871,6 +864,11 @@ public function testCanCreateInputFilterWithNullInputs(): void
{
$factory = $this->createDefaultFactory();
+ /**
+ * null is not acceptable as an input spec for the psalm type
+ *
+ * @psalm-suppress InvalidArgument
+ */
$inputFilter = $factory->createInputFilter([
'foo' => [
'name' => 'foo',
diff --git a/test/FileInput/HttpServerFileInputDecoratorTest.php b/test/FileInput/HttpServerFileInputDecoratorTest.php
index 870d539a..348013c1 100644
--- a/test/FileInput/HttpServerFileInputDecoratorTest.php
+++ b/test/FileInput/HttpServerFileInputDecoratorTest.php
@@ -8,6 +8,7 @@
use Laminas\InputFilter\FileInput\HttpServerFileInputDecorator;
use Laminas\Validator;
use LaminasTest\InputFilter\InputTest;
+use PHPUnit\Framework\Attributes\CoversClass;
use Webmozart\Assert\Assert;
use function json_encode;
@@ -16,10 +17,8 @@
use const UPLOAD_ERR_NO_FILE;
use const UPLOAD_ERR_OK;
-/**
- * @covers \Laminas\InputFilter\FileInput\HttpServerFileInputDecorator
- * @covers \Laminas\InputFilter\FileInput
- */
+#[CoversClass(HttpServerFileInputDecorator::class)]
+#[CoversClass(FileInput::class)]
class HttpServerFileInputDecoratorTest extends InputTest
{
/** @var HttpServerFileInputDecorator */
@@ -332,7 +331,7 @@ public function testFileInputMerge(): void
);
}
- public function isRequiredVsAllowEmptyVsContinueIfEmptyVsIsValidProvider(): iterable
+ public static function isRequiredVsAllowEmptyVsContinueIfEmptyVsIsValidProvider(): iterable
{
$dataSets = parent::isRequiredVsAllowEmptyVsContinueIfEmptyVsIsValidProvider();
Assert::isArrayAccessible($dataSets);
@@ -345,7 +344,7 @@ public function isRequiredVsAllowEmptyVsContinueIfEmptyVsIsValidProvider(): iter
return $dataSets;
}
- public function emptyValueProvider(): iterable
+ public static function emptyValueProvider(): iterable
{
return [
'tmp_name' => [
@@ -383,7 +382,7 @@ public function emptyValueProvider(): iterable
];
}
- public function mixedValueProvider(): array
+ public static function mixedValueProvider(): array
{
$fooUploadErrOk = [
'tmp_name' => 'foo',
diff --git a/test/FileInput/PsrFileInputDecoratorTest.php b/test/FileInput/PsrFileInputDecoratorTest.php
index c3a7a60d..53825717 100644
--- a/test/FileInput/PsrFileInputDecoratorTest.php
+++ b/test/FileInput/PsrFileInputDecoratorTest.php
@@ -9,6 +9,8 @@
use Laminas\InputFilter\FileInput\PsrFileInputDecorator;
use Laminas\Validator;
use LaminasTest\InputFilter\InputTest;
+use LaminasTest\InputFilter\TestAsset\UploadedFileInterfaceStub;
+use PHPUnit\Framework\Attributes\CoversClass;
use Psr\Http\Message\UploadedFileInterface;
use function in_array;
@@ -19,10 +21,8 @@
use const UPLOAD_ERR_NO_FILE;
use const UPLOAD_ERR_OK;
-/**
- * @covers \Laminas\InputFilter\FileInput\PsrFileInputDecorator
- * @covers \Laminas\InputFilter\FileInput
- */
+#[CoversClass(PsrFileInputDecorator::class)]
+#[CoversClass(FileInput::class)]
class PsrFileInputDecoratorTest extends InputTest
{
/** @var PsrFileInputDecorator */
@@ -308,8 +308,7 @@ public function testPsrFileInputMerge(): void
$return = $target->merge($source);
self::assertSame($target, $return, 'merge() must return it self');
- self::assertEquals(
- true,
+ self::assertTrue(
$target->getAutoPrependUploadValidator(),
'getAutoPrependUploadValidator() value not match'
);
@@ -326,7 +325,7 @@ public function testPsrFileInputMerge(): void
* 6: string[]
* }>
*/
- public function isRequiredVsAllowEmptyVsContinueIfEmptyVsIsValidProvider(): iterable
+ public static function isRequiredVsAllowEmptyVsContinueIfEmptyVsIsValidProvider(): iterable
{
$generator = parent::isRequiredVsAllowEmptyVsContinueIfEmptyVsIsValidProvider();
if ($generator instanceof Generator) {
@@ -354,14 +353,10 @@ public function isRequiredVsAllowEmptyVsContinueIfEmptyVsIsValidProvider(): iter
* filtered: UploadedFileInterface
* }>
*/
- public function emptyValueProvider(): iterable
+ public static function emptyValueProvider(): iterable
{
foreach (['single', 'multi'] as $type) {
- $raw = $this->createMock(UploadedFileInterface::class);
- $raw->expects(self::atLeast(1))
- ->method('getError')
- ->willReturn(UPLOAD_ERR_NO_FILE);
-
+ $raw = new UploadedFileInterfaceStub(UPLOAD_ERR_NO_FILE);
yield $type => [
'raw' => $type === 'multi'
? [$raw]
@@ -377,10 +372,9 @@ public function emptyValueProvider(): iterable
* filtered: UploadedFileInterface
* }>
*/
- public function mixedValueProvider(): array
+ public static function mixedValueProvider(): array
{
- $fooUploadErrOk = $this->createMock(UploadedFileInterface::class);
- $fooUploadErrOk->method('getError')->willReturn(UPLOAD_ERR_OK);
+ $fooUploadErrOk = new UploadedFileInterfaceStub(UPLOAD_ERR_OK);
return [
'single' => [
diff --git a/test/InputFilterAbstractServiceFactoryTest.php b/test/InputFilterAbstractServiceFactoryTest.php
index 1275bf96..8924ddb6 100644
--- a/test/InputFilterAbstractServiceFactoryTest.php
+++ b/test/InputFilterAbstractServiceFactoryTest.php
@@ -19,13 +19,13 @@
use Laminas\Validator\ValidatorInterface;
use Laminas\Validator\ValidatorPluginManager;
use LaminasTest\InputFilter\TestAsset\Foo;
+use PHPUnit\Framework\Attributes\CoversClass;
+use PHPUnit\Framework\Attributes\Depends;
use PHPUnit\Framework\TestCase;
use function call_user_func_array;
-/**
- * @covers \Laminas\InputFilter\InputFilterAbstractServiceFactory
- */
+#[CoversClass(InputFilterAbstractServiceFactory::class)]
class InputFilterAbstractServiceFactoryTest extends TestCase
{
private ServiceManager $services;
@@ -92,9 +92,7 @@ public function testCreatesInputFilterInstance(): void
self::assertInstanceOf(InputFilterInterface::class, $filter);
}
- /**
- * @depends testCreatesInputFilterInstance
- */
+ #[Depends('testCreatesInputFilterInstance')]
public function testUsesConfiguredValidationAndFilterManagerServicesWhenCreatingInputFilter(): void
{
$filters = new FilterPluginManager($this->services);
@@ -185,9 +183,7 @@ public function testRetrieveInputFilterFromInputFilterPluginManager(): void
self::assertInstanceOf(InputFilterInterface::class, $inputFilter);
}
- /**
- * @depends testCreatesInputFilterInstance
- */
+ #[Depends('testCreatesInputFilterInstance')]
public function testInjectsInputFilterManagerFromServiceManager(): void
{
$this->services->setService('config', [
diff --git a/test/InputFilterAwareTraitTest.php b/test/InputFilterAwareTraitTest.php
index adf29398..961680d7 100644
--- a/test/InputFilterAwareTraitTest.php
+++ b/test/InputFilterAwareTraitTest.php
@@ -6,22 +6,20 @@
use Laminas\InputFilter\InputFilter;
use Laminas\InputFilter\InputFilterAwareTrait;
+use LaminasTest\InputFilter\TestAsset\InputFilterAware;
+use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\TestCase;
use ReflectionObject;
-/**
- * @requires PHP 5.4
- * @covers \Laminas\InputFilter\InputFilterAwareTrait
- */
+#[CoversClass(InputFilterAwareTrait::class)]
class InputFilterAwareTraitTest extends TestCase
{
public function testSetInputFilter(): void
{
- $object = $this->getObjectForTrait(InputFilterAwareTrait::class);
+ $object = new InputFilterAware();
$r = new ReflectionObject($object);
$p = $r->getProperty('inputFilter');
- $p->setAccessible(true);
$this->assertNull($p->getValue($object));
$inputFilter = new InputFilter();
@@ -33,7 +31,7 @@ public function testSetInputFilter(): void
public function testGetInputFilter(): void
{
- $object = $this->getObjectForTrait(InputFilterAwareTrait::class);
+ $object = new InputFilterAware();
$this->assertNull($object->getInputFilter());
diff --git a/test/InputFilterPluginManagerCompatibilityTest.php b/test/InputFilterPluginManagerCompatibilityTest.php
index b8bed08a..c86c2ebc 100644
--- a/test/InputFilterPluginManagerCompatibilityTest.php
+++ b/test/InputFilterPluginManagerCompatibilityTest.php
@@ -19,7 +19,7 @@ public function testInstanceOfMatches(): void
$this->markTestSkipped("InputFilterPluginManager accepts multiple instances");
}
- protected function getPluginManager(): InputFilterPluginManager
+ protected static function getPluginManager(): InputFilterPluginManager
{
return new InputFilterPluginManager(new ServiceManager());
}
diff --git a/test/InputFilterPluginManagerFactoryTest.php b/test/InputFilterPluginManagerFactoryTest.php
index 6dcafcf7..978a3fcc 100644
--- a/test/InputFilterPluginManagerFactoryTest.php
+++ b/test/InputFilterPluginManagerFactoryTest.php
@@ -9,6 +9,8 @@
use Laminas\InputFilter\InputFilterPluginManagerFactory;
use Laminas\InputFilter\InputInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;
+use PHPUnit\Framework\Attributes\DataProvider;
+use PHPUnit\Framework\Attributes\Depends;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
use ReflectionObject;
@@ -25,12 +27,11 @@ public function testFactoryReturnsPluginManager(): void
$r = new ReflectionObject($filters);
$p = $r->getProperty('creationContext');
- $p->setAccessible(true);
self::assertSame($container, $p->getValue($filters));
}
/** @psalm-return array */
- public function pluginProvider(): array
+ public static function pluginProvider(): array
{
return [
'input' => [InputInterface::class],
@@ -39,10 +40,10 @@ public function pluginProvider(): array
}
/**
- * @depends testFactoryReturnsPluginManager
- * @dataProvider pluginProvider
* @psalm-param class-string $pluginType
*/
+ #[DataProvider('pluginProvider')]
+ #[Depends('testFactoryReturnsPluginManager')]
public function testFactoryConfiguresPluginManagerUnderContainerInterop(string $pluginType): void
{
$container = $this->createMock(ContainerInterface::class);
diff --git a/test/InputFilterPluginManagerTest.php b/test/InputFilterPluginManagerTest.php
index cd09c158..179a1f45 100644
--- a/test/InputFilterPluginManagerTest.php
+++ b/test/InputFilterPluginManagerTest.php
@@ -14,21 +14,22 @@
use Laminas\InputFilter\InputInterface;
use Laminas\ServiceManager\AbstractPluginManager;
use Laminas\ServiceManager\Exception\InvalidServiceException;
-use Laminas\ServiceManager\ServiceLocatorInterface;
use Laminas\ServiceManager\ServiceManager;
use Laminas\Validator\ValidatorChain;
use Laminas\Validator\ValidatorPluginManager;
use LaminasTest\InputFilter\FileInput\TestAsset\InitializableInputFilterInterface;
-use PHPUnit\Framework\MockObject\MockObject;
+use LaminasTest\InputFilter\TestAsset\InputFilterInterfaceStub;
+use LaminasTest\InputFilter\TestAsset\InputInterfaceStub;
+use PHPUnit\Framework\Attributes\CoversClass;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use ReflectionObject;
+use stdClass;
use Throwable;
use function method_exists;
-/**
- * @covers \Laminas\InputFilter\InputFilterPluginManager
- */
+#[CoversClass(InputFilterPluginManager::class)]
class InputFilterPluginManagerTest extends TestCase
{
private InputFilterPluginManager $manager;
@@ -49,7 +50,6 @@ public function testIsNotSharedByDefault(): void
{
$r = new ReflectionObject($this->manager);
$p = $r->getProperty('sharedByDefault');
- $p->setAccessible(true);
self::assertFalse($p->getValue($this->manager));
}
@@ -65,13 +65,13 @@ public function testRegisteringInvalidElementRaisesException(): void
public function testLoadingInvalidElementRaisesException(): void
{
- $this->manager->setInvokableClass('test', self::class);
+ $this->manager->setInvokableClass('test', stdClass::class);
$this->expectException($this->getServiceNotFoundException());
$this->manager->get('test');
}
/** @psalm-return array}> */
- public function defaultInvokableClassesProvider(): array
+ public static function defaultInvokableClassesProvider(): array
{
return [
// Description => [$alias, $expectedInstance]
@@ -81,9 +81,9 @@ public function defaultInvokableClassesProvider(): array
}
/**
- * @dataProvider defaultInvokableClassesProvider
* @psalm-param class-string $expectedInstance
*/
+ #[DataProvider('defaultInvokableClassesProvider')]
public function testDefaultInvokableClasses(string $alias, string $expectedInstance): void
{
/** @var object $service */
@@ -147,10 +147,10 @@ public function testInputFilterInvokableClassSMDependenciesArePopulatedWithServi
* 2: class-string
* }>
*/
- public function serviceProvider(): array
+ public static function serviceProvider(): array
{
- $inputFilterInterfaceMock = $this->createInputFilterInterfaceMock();
- $inputInterfaceMock = $this->createInputInterfaceMock();
+ $inputFilterInterfaceMock = new InputFilterInterfaceStub();
+ $inputInterfaceMock = new InputInterfaceStub('foo', true);
// phpcs:disable Generic.Files.LineLength.TooLong
return [
@@ -161,11 +161,8 @@ public function serviceProvider(): array
// phpcs:enable
}
- /**
- * @dataProvider serviceProvider
- * @param InputInterface|InputFilterInterface $service
- */
- public function testGet(string $serviceName, object $service): void
+ #[DataProvider('serviceProvider')]
+ public function testGet(string $serviceName, InputInterface|InputFilterInterface $service): void
{
$this->manager->setService($serviceName, $service);
@@ -189,39 +186,6 @@ public function testPopulateFactoryCanAcceptInputFilterAsFirstArgumentAndWillUse
self::assertSame($this->manager, $inputFilter->getFactory()->getInputFilterManager());
}
- /**
- * @return MockObject&InputFilterInterface
- */
- protected function createInputFilterInterfaceMock()
- {
- /** @var InputFilterInterface&MockObject $inputFilter */
- $inputFilter = $this->createMock(InputFilterInterface::class);
-
- return $inputFilter;
- }
-
- /**
- * @return MockObject&InputInterface
- */
- protected function createInputInterfaceMock()
- {
- /** @var InputInterface&MockObject $input */
- $input = $this->createMock(InputInterface::class);
-
- return $input;
- }
-
- /**
- * @return MockObject&ServiceLocatorInterface
- */
- protected function createServiceLocatorInterfaceMock()
- {
- /** @var ServiceLocatorInterface&MockObject $serviceLocator */
- $serviceLocator = $this->createMock(ServiceLocatorInterface::class);
-
- return $serviceLocator;
- }
-
/** @return class-string */
protected function getServiceNotFoundException(): string
{
diff --git a/test/InputFilterTest.php b/test/InputFilterTest.php
index 39470486..b66fbc6b 100644
--- a/test/InputFilterTest.php
+++ b/test/InputFilterTest.php
@@ -8,14 +8,13 @@
use Laminas\InputFilter\Factory;
use Laminas\InputFilter\Input;
use Laminas\InputFilter\InputFilter;
+use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\MockObject\MockObject;
use Traversable;
use function array_merge;
-/**
- * @covers \Laminas\InputFilter\InputFilter
- */
+#[CoversClass(InputFilter::class)]
class InputFilterTest extends BaseInputFilterTest
{
/** @var InputFilter */
@@ -46,7 +45,7 @@ public function testCanComposeAFactory(): void
* 2: Input
* }>
*/
- public function inputProvider(): array
+ public static function inputProvider(): array
{
$dataSets = parent::inputProvider();
diff --git a/test/InputTest.php b/test/InputTest.php
index cecdce67..d8973e8d 100644
--- a/test/InputTest.php
+++ b/test/InputTest.php
@@ -11,6 +11,9 @@
use Laminas\Validator\Translator\TranslatorInterface;
use Laminas\Validator\ValidatorChain;
use Laminas\Validator\ValidatorInterface;
+use LaminasTest\InputFilter\TestAsset\ValidatorStub;
+use PHPUnit\Framework\Attributes\DataProvider;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use stdClass;
@@ -136,9 +139,9 @@ public function testContinueIfEmptyFlagIsMutable(): void
}
/**
- * @dataProvider setValueProvider
* @param mixed $fallbackValue
*/
+ #[DataProvider('setValueProvider')]
public function testSetFallbackValue($fallbackValue): void
{
$input = $this->input;
@@ -151,9 +154,9 @@ public function testSetFallbackValue($fallbackValue): void
}
/**
- * @dataProvider setValueProvider
* @param mixed $fallbackValue
*/
+ #[DataProvider('setValueProvider')]
public function testClearFallbackValue($fallbackValue): void
{
$input = $this->input;
@@ -164,11 +167,11 @@ public function testClearFallbackValue($fallbackValue): void
}
/**
- * @dataProvider fallbackValueVsIsValidProvider
* @param string|string[] $fallbackValue
* @param string|string[] $originalValue
* @param string|string[] $expectedValue
*/
+ #[DataProvider('fallbackValueVsIsValidProvider')]
public function testFallbackValueVsIsValidRules(
bool $required,
$fallbackValue,
@@ -195,9 +198,9 @@ public function testFallbackValueVsIsValidRules(
}
/**
- * @dataProvider fallbackValueVsIsValidProvider
* @param string|string[] $fallbackValue
*/
+ #[DataProvider('fallbackValueVsIsValidProvider')]
public function testFallbackValueVsIsValidRulesWhenValueNotSet(bool $required, $fallbackValue): void
{
$expectedValue = $fallbackValue; // Should always return the fallback value
@@ -306,7 +309,7 @@ public function testNotRequiredWithoutFallbackAndValueNotSetThenIsValid(): void
// Validator should not to be called
$input->getValidatorChain()
- ->attach($this->createValidatorMock(null, null));
+ ->attach(self::createValidatorMock(null, null));
self::assertTrue(
$input->isValid(),
'isValid() should be return always true when is not required, and no data is set. Detail: '
@@ -316,9 +319,9 @@ public function testNotRequiredWithoutFallbackAndValueNotSetThenIsValid(): void
}
/**
- * @dataProvider emptyValueProvider
* @param mixed $value
*/
+ #[DataProvider('emptyValueProvider')]
public function testNotEmptyValidatorNotInjectedIfContinueIfEmptyIsTrue($value): void
{
$input = $this->input;
@@ -400,9 +403,9 @@ public function testBreakOnFailureFlagIsMutable(): void
}
/**
- * @dataProvider emptyValueProvider
* @param mixed $value
*/
+ #[DataProvider('emptyValueProvider')]
public function testNotEmptyValidatorAddedWhenIsValidIsCalled($value): void
{
self::assertTrue($this->input->isRequired());
@@ -421,9 +424,9 @@ public function testNotEmptyValidatorAddedWhenIsValidIsCalled($value): void
}
/**
- * @dataProvider emptyValueProvider
* @param mixed $value
*/
+ #[DataProvider('emptyValueProvider')]
public function testRequiredNotEmptyValidatorNotAddedWhenOneExists($value): void
{
$this->input->setRequired(true);
@@ -441,10 +444,10 @@ public function testRequiredNotEmptyValidatorNotAddedWhenOneExists($value): void
}
/**
- * @dataProvider emptyValueProvider
* @param mixed $valueRaw
* @param mixed $valueFiltered
*/
+ #[DataProvider('emptyValueProvider')]
public function testDoNotInjectNotEmptyValidatorIfAnywhereInChain($valueRaw, $valueFiltered): void
{
$filterChain = $this->createFilterChainMock([[$valueRaw, $valueFiltered]]);
@@ -456,7 +459,7 @@ public function testDoNotInjectNotEmptyValidatorIfAnywhereInChain($valueRaw, $va
$notEmptyMock = $this->createNonEmptyValidatorMock(false, $valueFiltered);
- $validatorChain->attach($this->createValidatorMock(true));
+ $validatorChain->attach(self::createValidatorMock(true));
$validatorChain->attach($notEmptyMock);
self::assertFalse($this->input->isValid());
@@ -466,17 +469,14 @@ public function testDoNotInjectNotEmptyValidatorIfAnywhereInChain($valueRaw, $va
self::assertEquals($notEmptyMock, $validators[1]['instance']);
}
- /**
- * @group 7448
- * @dataProvider isRequiredVsAllowEmptyVsContinueIfEmptyVsIsValidProvider
- * @param mixed $value
- */
+ #[DataProvider('isRequiredVsAllowEmptyVsContinueIfEmptyVsIsValidProvider')]
+ #[Group('7448')]
public function testIsRequiredVsAllowEmptyVsContinueIfEmptyVsIsValid(
bool $required,
bool $allowEmpty,
bool $continueIfEmpty,
ValidatorInterface $validator,
- $value,
+ mixed $value,
bool $expectedIsValid,
array $expectedMessages
): void {
@@ -498,9 +498,9 @@ public function testIsRequiredVsAllowEmptyVsContinueIfEmptyVsIsValid(
}
/**
- * @dataProvider setValueProvider
* @param mixed $value
*/
+ #[DataProvider('setValueProvider')]
public function testSetValuePutInputInTheDesiredState($value): void
{
$input = $this->input;
@@ -511,9 +511,9 @@ public function testSetValuePutInputInTheDesiredState($value): void
}
/**
- * @dataProvider setValueProvider
* @param mixed $value
*/
+ #[DataProvider('setValueProvider')]
public function testResetValueReturnsInputValueToDefaultValue($value): void
{
$input = $this->input;
@@ -660,7 +660,7 @@ public function testNotEmptyMessageIsTranslated(): void
* 4: string
* }>
*/
- public function fallbackValueVsIsValidProvider(): array
+ public static function fallbackValueVsIsValidProvider(): array
{
$required = true;
$isValid = true;
@@ -685,10 +685,10 @@ public function fallbackValueVsIsValidProvider(): array
* filtered: bool|int|float|string|list|object
* }>
*/
- public function setValueProvider(): array
+ public static function setValueProvider(): array
{
- $emptyValues = $this->emptyValueProvider();
- $mixedValues = $this->mixedValueProvider();
+ $emptyValues = static::emptyValueProvider();
+ $mixedValues = static::mixedValueProvider();
$emptyValues = $emptyValues instanceof Iterator ? iterator_to_array($emptyValues) : $emptyValues;
$mixedValues = $mixedValues instanceof Iterator ? iterator_to_array($mixedValues) : $mixedValues;
@@ -710,11 +710,11 @@ public function setValueProvider(): array
* 6: string[]
* }>
*/
- public function isRequiredVsAllowEmptyVsContinueIfEmptyVsIsValidProvider(): iterable
+ public static function isRequiredVsAllowEmptyVsContinueIfEmptyVsIsValidProvider(): iterable
{
- $allValues = $this->setValueProvider();
+ $allValues = static::setValueProvider();
- $emptyValues = $this->emptyValueProvider();
+ $emptyValues = static::emptyValueProvider();
$emptyValues = $emptyValues instanceof Iterator ? iterator_to_array($emptyValues) : $emptyValues;
Assert::isArray($emptyValues);
@@ -729,12 +729,12 @@ public function isRequiredVsAllowEmptyVsContinueIfEmptyVsIsValidProvider(): iter
$notEmptyMsg = ['isEmpty' => "Value is required and can't be empty"];
// phpcs:disable Generic.Formatting.MultipleStatementAlignment.NotSame
- $validatorNotCall = fn($value, $context = null): ValidatorInterface =>
- $this->createValidatorMock(null, $value, $context);
- $validatorInvalid = fn($value, $context = null): ValidatorInterface =>
- $this->createValidatorMock(false, $value, $context, $validatorMsg);
- $validatorValid = fn($value, $context = null): ValidatorInterface =>
- $this->createValidatorMock(true, $value, $context);
+ $validatorNotCall = fn(mixed $value, array|null $context = null): ValidatorInterface =>
+ self::createValidatorMock(null, $value, $context);
+ $validatorInvalid = fn(mixed $value, array|null $context = null): ValidatorInterface =>
+ self::createValidatorMock(false, $value, $context, $validatorMsg);
+ $validatorValid = fn(mixed $value, array|null $context = null): ValidatorInterface =>
+ self::createValidatorMock(true, $value, $context);
// phpcs:disable Generic.Files.LineLength.TooLong,WebimpressCodingStandard.Arrays.DoubleArrow.SpacesBefore,WebimpressCodingStandard.Arrays.Format.SingleLineSpaceBefore,WebimpressCodingStandard.WhiteSpace.CommaSpacing.SpacingAfterComma,WebimpressCodingStandard.WhiteSpace.CommaSpacing.SpaceBeforeComma,WebimpressCodingStandard.Arrays.Format.BlankLine,Generic.Formatting.MultipleStatementAlignment.NotSame
$dataTemplates = [
@@ -791,7 +791,7 @@ public function isRequiredVsAllowEmptyVsContinueIfEmptyVsIsValidProvider(): iter
* filtered: null|string|array
* }>
*/
- public function emptyValueProvider(): iterable
+ public static function emptyValueProvider(): iterable
{
return [
// Description => [$value]
@@ -822,7 +822,7 @@ public function emptyValueProvider(): iterable
* filtered: mixed,
* }>
*/
- public function mixedValueProvider(): array
+ public static function mixedValueProvider(): array
{
return [
// Description => [$value]
@@ -877,15 +877,9 @@ public function mixedValueProvider(): array
];
}
- /**
- * @return InputInterface&MockObject
- */
- protected function createInputInterfaceMock()
+ protected function createInputInterfaceMock(): InputInterface&MockObject
{
- /** @var InputInterface&MockObject $source */
- $source = $this->createMock(InputInterface::class);
-
- return $source;
+ return $this->createMock(InputInterface::class);
}
/**
@@ -928,53 +922,31 @@ protected function createValidatorChainMock(array $valueMap = [], $messages = []
return $validatorChain;
}
- /**
- * @param null|bool $isValid
- * @param mixed $value
- * @param mixed $context
- * @param string[] $messages
- * @return ValidatorInterface&MockObject
- */
- protected function createValidatorMock($isValid, $value = 'not-set', $context = null, $messages = [])
- {
- /** @var ValidatorInterface&MockObject $validator */
- $validator = $this->createMock(ValidatorInterface::class);
-
- if (($isValid === false) || ($isValid === true)) {
- $isValidMethod = $validator->expects(self::once())
- ->method('isValid')
- ->willReturn($isValid);
- } else {
- $isValidMethod = $validator->expects(self::never())
- ->method('isValid');
- }
- if ($value !== 'not-set') {
- $isValidMethod->with($value, $context);
- }
-
- $validator->method('getMessages')
- ->willReturn($messages);
-
- return $validator;
+ /** @param array $messages */
+ protected static function createValidatorMock(
+ bool|null $isValid,
+ mixed $value = 'not-set',
+ array|null $context = null,
+ array $messages = []
+ ): ValidatorInterface {
+ return new ValidatorStub($isValid, $value, $context, $messages);
}
- /**
- * @param bool $isValid
- * @param mixed $value
- * @param mixed $context
- * @return NotEmptyValidator&MockObject
- */
- protected function createNonEmptyValidatorMock($isValid, $value, $context = null)
- {
- /** @var NotEmptyValidator&MockObject $notEmptyMock */
- $notEmptyMock = $this->getMockBuilder(NotEmptyValidator::class)
- ->setMethods(['isValid'])
- ->getMock();
- $notEmptyMock->expects($this->once())
+ protected function createNonEmptyValidatorMock(
+ bool $isValid,
+ mixed $value,
+ mixed $context = null
+ ): NotEmptyValidator&MockObject {
+ $notEmptyMock = $this->createMock(NotEmptyValidator::class);
+ $notEmptyMock->expects(self::once())
->method('isValid')
->with($value, $context)
->willReturn($isValid);
+ if ($isValid === false) {
+ $notEmptyMock->method('getMessages')->willReturn([]);
+ }
+
return $notEmptyMock;
}
diff --git a/test/OptionalInputFilterTest.php b/test/OptionalInputFilterTest.php
index 16d3d2c3..269fc906 100644
--- a/test/OptionalInputFilterTest.php
+++ b/test/OptionalInputFilterTest.php
@@ -10,11 +10,10 @@
use Laminas\InputFilter\InputFilter;
use Laminas\InputFilter\InputFilterInterface;
use Laminas\InputFilter\OptionalInputFilter;
+use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\TestCase;
-/**
- * @covers \Laminas\InputFilter\OptionalInputFilter
- */
+#[CoversClass(OptionalInputFilter::class)]
class OptionalInputFilterTest extends TestCase
{
public function testValidatesSuccessfullyWhenSetDataIsNeverCalled(): void
diff --git a/test/TestAsset/InputFilterAware.php b/test/TestAsset/InputFilterAware.php
new file mode 100644
index 00000000..9b232b9c
--- /dev/null
+++ b/test/TestAsset/InputFilterAware.php
@@ -0,0 +1,12 @@
+ $getRawValues
+ * @param array $getValues
+ * @param array> $getMessages
+ */
+ public function __construct(
+ private readonly bool|null $isValid = null,
+ private readonly array $getRawValues = [],
+ private readonly array $getValues = [],
+ private readonly array $getMessages = []
+ ) {
+ }
+
+ /** @inheritDoc */
+ public function isValid($context = null)
+ {
+ assertNotNull($this->isValid, 'isValid was not expected to be called');
+
+ return $this->isValid;
+ }
+
+ public function getValues(): array
+ {
+ return $this->getValues;
+ }
+
+ public function getRawValues(): array
+ {
+ return $this->getRawValues;
+ }
+
+ /** @inheritDoc */
+ public function getMessages(): array
+ {
+ return $this->getMessages;
+ }
+}
diff --git a/test/TestAsset/InputInterfaceStub.php b/test/TestAsset/InputInterfaceStub.php
new file mode 100644
index 00000000..fc1de177
--- /dev/null
+++ b/test/TestAsset/InputInterfaceStub.php
@@ -0,0 +1,159 @@
+ $getMessages */
+ public function __construct(
+ private readonly string $name,
+ private readonly bool|null $isRequired,
+ private readonly bool|null $isValid = null,
+ private readonly array|string|null $context = null,
+ private readonly mixed $getRawValue = null,
+ private readonly mixed $getValue = null,
+ private readonly array $getMessages = [],
+ private readonly bool $breakOnFailure = false
+ ) {
+ }
+
+ /** @inheritDoc */
+ public function setAllowEmpty($allowEmpty)
+ {
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function setBreakOnFailure($breakOnFailure)
+ {
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function setErrorMessage($errorMessage)
+ {
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function setFilterChain(FilterChain $filterChain): never
+ {
+ throw new Exception('Not implemented');
+ }
+
+ /** @inheritDoc */
+ public function setName($name): never
+ {
+ throw new Exception('Not implemented');
+ }
+
+ /** @inheritDoc */
+ public function setRequired($required): never
+ {
+ throw new Exception('Not implemented');
+ }
+
+ /** @inheritDoc */
+ public function setValidatorChain(ValidatorChain $validatorChain): never
+ {
+ throw new Exception('Not implemented');
+ }
+
+ /** @inheritDoc */
+ public function setValue($value)
+ {
+ return $this;
+ }
+
+ /** @inheritDoc */
+ public function merge(InputInterface $input): never
+ {
+ throw new Exception('Not implemented');
+ }
+
+ /** @inheritDoc */
+ public function allowEmpty(): never
+ {
+ throw new Exception('Not implemented');
+ }
+
+ /** @inheritDoc */
+ public function breakOnFailure(): bool
+ {
+ return $this->breakOnFailure;
+ }
+
+ /** @inheritDoc */
+ public function getErrorMessage(): never
+ {
+ throw new Exception('Not implemented');
+ }
+
+ /** @inheritDoc */
+ public function getFilterChain(): never
+ {
+ throw new Exception('Not implemented');
+ }
+
+ /** @inheritDoc */
+ public function getName(): string
+ {
+ return $this->name;
+ }
+
+ /** @inheritDoc */
+ public function getRawValue(): mixed
+ {
+ return $this->getRawValue;
+ }
+
+ /** @inheritDoc */
+ public function isRequired(): bool
+ {
+ assertNotNull($this->isRequired, 'isRequired was not expected to be called');
+
+ return $this->isRequired;
+ }
+
+ /** @inheritDoc */
+ public function getValidatorChain(): never
+ {
+ throw new Exception('Not implemented');
+ }
+
+ /** @inheritDoc */
+ public function getValue(): mixed
+ {
+ return $this->getValue;
+ }
+
+ /** @inheritDoc */
+ public function isValid(): bool
+ {
+ assertNotNull($this->isValid, 'isValid was not expected to be called');
+
+ if ($this->context !== null && func_num_args() > 0) {
+ assertEquals($this->context, func_get_arg(0), 'The given context does not match the expected context');
+ }
+
+ return $this->isValid;
+ }
+
+ /** @return array */
+ public function getMessages(): array
+ {
+ return $this->getMessages;
+ }
+}
diff --git a/test/TestAsset/UploadedFileInterfaceStub.php b/test/TestAsset/UploadedFileInterfaceStub.php
new file mode 100644
index 00000000..b6a806df
--- /dev/null
+++ b/test/TestAsset/UploadedFileInterfaceStub.php
@@ -0,0 +1,48 @@
+expectedErrorCode;
+ }
+
+ public function getClientFilename(): never
+ {
+ throw new Exception('Not Implemented');
+ }
+
+ public function getClientMediaType(): never
+ {
+ throw new Exception('Not Implemented');
+ }
+}
diff --git a/test/TestAsset/ValidatorStub.php b/test/TestAsset/ValidatorStub.php
new file mode 100644
index 00000000..c415b170
--- /dev/null
+++ b/test/TestAsset/ValidatorStub.php
@@ -0,0 +1,51 @@
+ $messages */
+ public function __construct(
+ private readonly bool|null $isValid,
+ private readonly mixed $value = 'not-set',
+ private readonly array|null $context = null,
+ private readonly array $messages = [],
+ ) {
+ }
+
+ public function isValid(mixed $value): bool
+ {
+ if ($this->value !== 'not-set') {
+ assertEquals($this->value, $value, 'isValid did not receive the expected value');
+ }
+
+ if (func_num_args() > 1 && $this->context !== null) {
+ /** @var mixed $givenContext */
+ $givenContext = func_get_arg(1);
+ assertEquals(
+ $this->context,
+ $givenContext,
+ 'isValid received a context that did not match the expected context',
+ );
+ }
+
+ assertNotNull($this->isValid, 'isValid was not expected to be called for this instance');
+
+ return $this->isValid;
+ }
+
+ /** @inheritDoc */
+ public function getMessages(): array
+ {
+ return $this->messages;
+ }
+}
diff --git a/test/ValidationGroup/InputFilterCollectionsValidationGroupTest.php b/test/ValidationGroup/InputFilterCollectionsValidationGroupTest.php
index 181d8094..cb110b55 100644
--- a/test/ValidationGroup/InputFilterCollectionsValidationGroupTest.php
+++ b/test/ValidationGroup/InputFilterCollectionsValidationGroupTest.php
@@ -5,11 +5,14 @@
namespace LaminasTest\InputFilter\ValidationGroup;
use Laminas\InputFilter\CollectionInputFilter;
+use Laminas\InputFilter\Exception\RuntimeException;
use Laminas\InputFilter\Input;
use Laminas\InputFilter\InputFilter;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
-use const PHP_VERSION_ID;
+use function restore_error_handler;
+use function set_error_handler;
final class InputFilterCollectionsValidationGroupTest extends TestCase
{
@@ -37,7 +40,7 @@ protected function setUp(): void
}
/** @return array */
- public function collectionCountProvider(): array
+ public static function collectionCountProvider(): array
{
return [
'Collection Count: None' => [null],
@@ -59,7 +62,7 @@ private function setCollectionCount(?int $count): void
$collection->setCount($count);
}
- /** @dataProvider collectionCountProvider */
+ #[DataProvider('collectionCountProvider')]
public function testIncompleteDataFailsValidation(?int $count): void
{
$this->setCollectionCount($count);
@@ -71,7 +74,7 @@ public function testIncompleteDataFailsValidation(?int $count): void
self::assertFalse($this->inputFilter->isValid());
}
- /** @dataProvider collectionCountProvider */
+ #[DataProvider('collectionCountProvider')]
public function testCompleteDataPassesValidation(?int $count): void
{
$this->setCollectionCount($count);
@@ -87,7 +90,7 @@ public function testCompleteDataPassesValidation(?int $count): void
self::assertTrue($this->inputFilter->isValid());
}
- /** @dataProvider collectionCountProvider */
+ #[DataProvider('collectionCountProvider')]
public function testValidationFailsForCollectionItemValidity(?int $count): void
{
$this->setCollectionCount($count);
@@ -103,7 +106,7 @@ public function testValidationFailsForCollectionItemValidity(?int $count): void
self::assertFalse($this->inputFilter->isValid());
}
- /** @dataProvider collectionCountProvider */
+ #[DataProvider('collectionCountProvider')]
public function testValidationGroupWithCollectionInputFilter(?int $count): void
{
$this->setCollectionCount($count);
@@ -123,7 +126,7 @@ public function testValidationGroupWithCollectionInputFilter(?int $count): void
self::assertTrue($this->inputFilter->isValid());
}
- /** @dataProvider collectionCountProvider */
+ #[DataProvider('collectionCountProvider')]
public function testValidationGroupViaCollection(?int $count): void
{
$this->setCollectionCount($count);
@@ -151,9 +154,8 @@ public function testValidationGroupViaCollection(?int $count): void
/**
* This test documents existing behaviour - the validation group must be set for elements 0 through 3
- *
- * @dataProvider collectionCountProvider
*/
+ #[DataProvider('collectionCountProvider')]
public function testValidationGroupViaCollectionMustSpecifyAllKeys(?int $count): void
{
$this->setCollectionCount($count);
@@ -174,18 +176,21 @@ public function testValidationGroupViaCollectionMustSpecifyAllKeys(?int $count):
],
]);
- if (PHP_VERSION_ID >= 80000) {
- $this->expectWarning();
- $this->expectWarningMessage('Undefined array key 1');
- } else {
- $this->expectNotice();
- $this->expectNoticeMessage('Undefined offset: 1');
+ set_error_handler(function (int $num, string $msg): never {
+ throw new RuntimeException($msg, $num);
+ });
+
+ try {
+ $this->inputFilter->isValid();
+ self::fail('A warning was not issued');
+ } catch (RuntimeException $e) {
+ self::assertStringContainsString('Undefined array key 1', $e->getMessage());
+ } finally {
+ restore_error_handler();
}
-
- $this->inputFilter->isValid();
}
- /** @dataProvider collectionCountProvider */
+ #[DataProvider('collectionCountProvider')]
public function testValidationGroupViaTopLevelInputFilter(?int $count): void
{
$this->setCollectionCount($count);