diff --git a/.gitignore b/.gitignore
index 4d6216b34..d3d699cd0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,5 +4,5 @@
/laminas-mkdoc-theme/
/phpunit.xml
/vendor/
-.phpunit.result.cache
+.phpunit.cache
.phpcs-cache
diff --git a/composer.json b/composer.json
index 6b192de79..a0c578c6c 100644
--- a/composer.json
+++ b/composer.json
@@ -49,10 +49,10 @@
"laminas/laminas-mvc-plugin-flashmessenger": "^1.9",
"laminas/laminas-navigation": "^2.18.1",
"laminas/laminas-paginator": "^2.17",
- "laminas/laminas-permissions-acl": "^2.14",
+ "laminas/laminas-permissions-acl": "^2.15",
"laminas/laminas-router": "^3.11.1",
"laminas/laminas-uri": "^2.10",
- "phpunit/phpunit": "^9.6.8",
+ "phpunit/phpunit": "^10.1.3",
"psalm/plugin-phpunit": "^0.18.4",
"vimeo/psalm": "^5.12"
},
diff --git a/composer.lock b/composer.lock
index fa9b56f8a..c5d9eaf2b 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "8196e88e34920255fc335907afd446ce",
+ "content-hash": "d8c4880e9375fc4df0bb44fdb9436bf2",
"packages": [
{
"name": "laminas/laminas-escaper",
@@ -1015,76 +1015,6 @@
},
"time": "2019-12-04T15:06:13+00:00"
},
- {
- "name": "doctrine/instantiator",
- "version": "2.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/doctrine/instantiator.git",
- "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
- "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
- "shasum": ""
- },
- "require": {
- "php": "^8.1"
- },
- "require-dev": {
- "doctrine/coding-standard": "^11",
- "ext-pdo": "*",
- "ext-phar": "*",
- "phpbench/phpbench": "^1.2",
- "phpstan/phpstan": "^1.9.4",
- "phpstan/phpstan-phpunit": "^1.3",
- "phpunit/phpunit": "^9.5.27",
- "vimeo/psalm": "^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/2.0.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:23:10+00:00"
- },
{
"name": "felixfbecker/advanced-json-rpc",
"version": "v3.2.1",
@@ -2273,20 +2203,20 @@
},
{
"name": "laminas/laminas-permissions-acl",
- "version": "2.14.0",
+ "version": "2.15.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-permissions-acl.git",
- "reference": "86cecb540cf8f2e088d70d8acef1fc9203ed5023"
+ "reference": "ea9f6643a624b3e847f7d637eb828498654f492e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laminas/laminas-permissions-acl/zipball/86cecb540cf8f2e088d70d8acef1fc9203ed5023",
- "reference": "86cecb540cf8f2e088d70d8acef1fc9203ed5023",
+ "url": "https://api.github.com/repos/laminas/laminas-permissions-acl/zipball/ea9f6643a624b3e847f7d637eb828498654f492e",
+ "reference": "ea9f6643a624b3e847f7d637eb828498654f492e",
"shasum": ""
},
"require": {
- "php": "~8.0.0 || ~8.1.0 || ~8.2.0"
+ "php": "~8.1.0 || ~8.2.0"
},
"conflict": {
"laminas/laminas-servicemanager": "<3.0",
@@ -2294,11 +2224,11 @@
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.5.0",
- "laminas/laminas-servicemanager": "^3.19",
- "phpbench/phpbench": "^1.2",
- "phpunit/phpunit": "^9.5.26",
- "psalm/plugin-phpunit": "^0.18.0",
- "vimeo/psalm": "^5.0"
+ "laminas/laminas-servicemanager": "^3.21",
+ "phpbench/phpbench": "^1.2.10",
+ "phpunit/phpunit": "^10.1.3",
+ "psalm/plugin-phpunit": "^0.18.4",
+ "vimeo/psalm": "^5.12"
},
"suggest": {
"laminas/laminas-servicemanager": "To support Laminas\\Permissions\\Acl\\Assertion\\AssertionManager plugin manager usage"
@@ -2333,7 +2263,7 @@
"type": "community_bridge"
}
],
- "time": "2023-02-01T16:19:54+00:00"
+ "time": "2023-05-29T19:28:02+00:00"
},
{
"name": "laminas/laminas-router",
@@ -3118,16 +3048,16 @@
},
{
"name": "phpunit/php-code-coverage",
- "version": "9.2.26",
+ "version": "10.1.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1"
+ "reference": "db1497ec8dd382e82c962f7abbe0320e4882ee4e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1",
- "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/db1497ec8dd382e82c962f7abbe0320e4882ee4e",
+ "reference": "db1497ec8dd382e82c962f7abbe0320e4882ee4e",
"shasum": ""
},
"require": {
@@ -3135,18 +3065,18 @@
"ext-libxml": "*",
"ext-xmlwriter": "*",
"nikic/php-parser": "^4.15",
- "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",
+ "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": "PHP extension that provides line coverage",
@@ -3155,7 +3085,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "9.2-dev"
+ "dev-main": "10.1-dev"
}
},
"autoload": {
@@ -3183,7 +3113,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26"
+ "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.2"
},
"funding": [
{
@@ -3191,32 +3122,32 @@
"type": "github"
}
],
- "time": "2023-03-06T12:58:08+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": {
@@ -3243,7 +3174,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": [
{
@@ -3251,28 +3183,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": "*"
@@ -3280,7 +3212,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1-dev"
+ "dev-main": "4.0-dev"
}
},
"autoload": {
@@ -3306,7 +3238,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": [
{
@@ -3314,32 +3246,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": {
@@ -3365,7 +3297,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": [
{
@@ -3373,32 +3305,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": {
@@ -3424,7 +3356,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": [
{
@@ -3432,24 +3364,23 @@
"type": "github"
}
],
- "time": "2020-10-26T13:16:10+00:00"
+ "time": "2023-02-03T06:57:52+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "9.6.8",
+ "version": "10.1.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e"
+ "reference": "2379ebafc1737e71cdc84f402acb6b7f04198b9d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/17d621b3aff84d0c8b62539e269e87d8d5baa76e",
- "reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e",
+ "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": "*",
@@ -3459,27 +3390,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": "To be able to generate mocks based on WSDL files",
- "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage"
+ "ext-soap": "To be able to generate mocks based on WSDL files"
},
"bin": [
"phpunit"
@@ -3487,7 +3417,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "9.6-dev"
+ "dev-main": "10.1-dev"
}
},
"autoload": {
@@ -3519,7 +3449,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.8"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/10.1.3"
},
"funding": [
{
@@ -3535,7 +3465,7 @@
"type": "tidelift"
}
],
- "time": "2023-05-11T05:14:45+00:00"
+ "time": "2023-05-11T05:16:22+00:00"
},
{
"name": "psalm/plugin-phpunit",
@@ -3702,28 +3632,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": {
@@ -3746,7 +3676,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": [
{
@@ -3754,32 +3684,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": {
@@ -3802,7 +3732,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": [
{
@@ -3810,32 +3740,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": {
@@ -3857,7 +3787,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": [
{
@@ -3865,34 +3795,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": {
@@ -3931,7 +3863,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": [
{
@@ -3939,33 +3871,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": {
@@ -3988,7 +3920,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": [
{
@@ -3996,33 +3928,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.5",
+ "version": "5.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131"
+ "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131",
- "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131",
+ "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": {
@@ -4054,7 +3986,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/diff/issues",
- "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5"
+ "security": "https://github.com/sebastianbergmann/diff/security/policy",
+ "source": "https://github.com/sebastianbergmann/diff/tree/5.0.3"
},
"funding": [
{
@@ -4062,27 +3995,27 @@
"type": "github"
}
],
- "time": "2023-05-07T05:35:17+00:00"
+ "time": "2023-05-01T07:48:21+00:00"
},
{
"name": "sebastian/environment",
- "version": "5.1.5",
+ "version": "6.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed"
+ "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
- "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
+ "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": "*"
@@ -4090,7 +4023,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.1-dev"
+ "dev-main": "6.0-dev"
}
},
"autoload": {
@@ -4109,7 +4042,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",
@@ -4117,7 +4050,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
- "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5"
+ "security": "https://github.com/sebastianbergmann/environment/security/policy",
+ "source": "https://github.com/sebastianbergmann/environment/tree/6.0.1"
},
"funding": [
{
@@ -4125,34 +4059,34 @@
"type": "github"
}
],
- "time": "2023-02-03T06:03:51+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": {
@@ -4194,7 +4128,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": [
{
@@ -4202,38 +4136,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": {
@@ -4258,7 +4189,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": [
{
@@ -4266,33 +4197,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": {
@@ -4315,7 +4246,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": [
{
@@ -4323,34 +4254,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": {
@@ -4372,7 +4303,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": [
{
@@ -4380,32 +4311,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": {
@@ -4427,7 +4358,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": [
{
@@ -4435,32 +4366,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.5",
+ "version": "5.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1"
+ "reference": "05909fb5bc7df4c52992396d0116aed689f93712"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
- "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
+ "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": {
@@ -4490,7 +4421,7 @@
"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.5"
+ "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0"
},
"funding": [
{
@@ -4498,87 +4429,32 @@
"type": "github"
}
],
- "time": "2023-02-03T06:07:39+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.1",
+ "version": "4.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
- "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7"
+ "reference": "462699a16464c3944eefc02ebdd77882bd3925bf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
- "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
+ "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": {
@@ -4601,7 +4477,7 @@
"homepage": "https://github.com/sebastianbergmann/type",
"support": {
"issues": "https://github.com/sebastianbergmann/type/issues",
- "source": "https://github.com/sebastianbergmann/type/tree/3.2.1"
+ "source": "https://github.com/sebastianbergmann/type/tree/4.0.0"
},
"funding": [
{
@@ -4609,29 +4485,29 @@
"type": "github"
}
],
- "time": "2023-02-03T06:13: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": {
@@ -4654,7 +4530,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": [
{
@@ -4662,7 +4538,7 @@
"type": "github"
}
],
- "time": "2020-09-28T06:39:44+00:00"
+ "time": "2023-02-07T11:34:05+00:00"
},
{
"name": "slevomat/coding-standard",
@@ -4847,23 +4723,23 @@
},
{
"name": "symfony/console",
- "version": "v6.2.11",
+ "version": "v6.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "5aa03db8ef0a5457c316ec580e69562d97734c77"
+ "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/5aa03db8ef0a5457c316ec580e69562d97734c77",
- "reference": "5aa03db8ef0a5457c316ec580e69562d97734c77",
+ "url": "https://api.github.com/repos/symfony/console/zipball/8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7",
+ "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7",
"shasum": ""
},
"require": {
"php": ">=8.1",
- "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/deprecation-contracts": "^2.5|^3",
"symfony/polyfill-mbstring": "~1.0",
- "symfony/service-contracts": "^1.1|^2|^3",
+ "symfony/service-contracts": "^2.5|^3",
"symfony/string": "^5.4|^6.0"
},
"conflict": {
@@ -4885,12 +4761,6 @@
"symfony/process": "^5.4|^6.0",
"symfony/var-dumper": "^5.4|^6.0"
},
- "suggest": {
- "psr/log": "For using the console logger",
- "symfony/event-dispatcher": "",
- "symfony/lock": "",
- "symfony/process": ""
- },
"type": "library",
"autoload": {
"psr-4": {
@@ -4923,7 +4793,7 @@
"terminal"
],
"support": {
- "source": "https://github.com/symfony/console/tree/v6.2.11"
+ "source": "https://github.com/symfony/console/tree/v6.3.0"
},
"funding": [
{
@@ -4939,20 +4809,20 @@
"type": "tidelift"
}
],
- "time": "2023-05-26T08:16:21+00:00"
+ "time": "2023-05-29T12:49:39+00:00"
},
{
"name": "symfony/deprecation-contracts",
- "version": "v3.2.1",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
- "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e"
+ "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e",
- "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf",
+ "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf",
"shasum": ""
},
"require": {
@@ -4961,7 +4831,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "3.3-dev"
+ "dev-main": "3.4-dev"
},
"thanks": {
"name": "symfony/contracts",
@@ -4990,7 +4860,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.2.1"
+ "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0"
},
"funding": [
{
@@ -5006,20 +4876,20 @@
"type": "tidelift"
}
],
- "time": "2023-03-01T10:25:55+00:00"
+ "time": "2023-05-23T14:45:45+00:00"
},
{
"name": "symfony/filesystem",
- "version": "v6.2.10",
+ "version": "v6.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "fd588debf7d1bc16a2c84b4b3b71145d9946b894"
+ "reference": "97b698e1d77d356304def77a8d0cd73090b359ea"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/fd588debf7d1bc16a2c84b4b3b71145d9946b894",
- "reference": "fd588debf7d1bc16a2c84b4b3b71145d9946b894",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/97b698e1d77d356304def77a8d0cd73090b359ea",
+ "reference": "97b698e1d77d356304def77a8d0cd73090b359ea",
"shasum": ""
},
"require": {
@@ -5053,7 +4923,7 @@
"description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/filesystem/tree/v6.2.10"
+ "source": "https://github.com/symfony/filesystem/tree/v6.3.0"
},
"funding": [
{
@@ -5069,7 +4939,7 @@
"type": "tidelift"
}
],
- "time": "2023-04-18T13:46:08+00:00"
+ "time": "2023-05-30T17:12:32+00:00"
},
{
"name": "symfony/polyfill-ctype",
@@ -5486,16 +5356,16 @@
},
{
"name": "symfony/string",
- "version": "v6.2.8",
+ "version": "v6.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
- "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef"
+ "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/string/zipball/193e83bbd6617d6b2151c37fff10fa7168ebddef",
- "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef",
+ "url": "https://api.github.com/repos/symfony/string/zipball/f2e190ee75ff0f5eced645ec0be5c66fac81f51f",
+ "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f",
"shasum": ""
},
"require": {
@@ -5506,13 +5376,13 @@
"symfony/polyfill-mbstring": "~1.0"
},
"conflict": {
- "symfony/translation-contracts": "<2.0"
+ "symfony/translation-contracts": "<2.5"
},
"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/translation-contracts": "^2.5|^3.0",
"symfony/var-exporter": "^5.4|^6.0"
},
"type": "library",
@@ -5552,7 +5422,7 @@
"utf8"
],
"support": {
- "source": "https://github.com/symfony/string/tree/v6.2.8"
+ "source": "https://github.com/symfony/string/tree/v6.3.0"
},
"funding": [
{
@@ -5568,7 +5438,7 @@
"type": "tidelift"
}
],
- "time": "2023-03-20T16:06:02+00:00"
+ "time": "2023-03-21T21:06:29+00:00"
},
{
"name": "theseer/tokenizer",
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 69cb15d6d..63b4bd3dc 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -3,29 +3,29 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="./vendor/autoload.php"
- convertDeprecationsToExceptions="true"
- colors="true">
+ colors="true"
+ cacheDirectory=".phpunit.cache"
+ displayDetailsOnSkippedTests="true"
+ displayDetailsOnTestsThatTriggerDeprecations="true"
+ displayDetailsOnTestsThatTriggerErrors="true"
+ displayDetailsOnTestsThatTriggerNotices="true"
+ displayDetailsOnTestsThatTriggerWarnings="true"
+ displayDetailsOnIncompleteTests="true"
+ failOnWarning="true"
+ failOnDeprecation="true"
+ failOnNotice="true"
+>
./test/
-
-
-
- disable
-
-
-
-
-
- ./src
-
-
-
-
-
+
+
+ ./src
+
+
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
index e94c9d9fe..64174e059 100644
--- a/psalm-baseline.xml
+++ b/psalm-baseline.xml
@@ -2331,7 +2331,6 @@
$item
$item
$item
- $item
$order[$key]
@@ -2356,9 +2355,6 @@
$value
$value
-
- iterable
-
@@ -2373,12 +2369,6 @@
- conditionalStylesheet]]>
- conditionalStylesheet]]>
- conditionalStylesheet]]>
- conditionalStylesheet]]>
- conditionalStylesheet]]>
- media]]>
href]]>
href]]>
href]]>
@@ -2411,79 +2401,34 @@
- $item
- $item
- $item
- $item
- $item
- $item
- $item
- $item
- $item
- $item
- $item
- $item
- type]]>
- type]]>
- type]]>
- $modifiers
$modifiers
$value
$values
$values
$values
$values
- $values
- $values
- $values
- $values
- $values
-
-
-
- $values[$i]
- $values[100]
-
- $item
- $item
- $item
$item
$item
$modifiers
$value
$values
$values
- $values
- $values
- $values
- content]]>
- content]]>
- content]]>
content]]>
content]]>
name]]>
name]]>
type]]>
type]]>
- type]]>
- type]]>
- type]]>
- {$item->type}]]>
- {$item->type}]]>
- {$item->type}]]>
- modifiers]]>
- getArrayCopy
- getArrayCopy
getArrayCopy
getArrayCopy
getArrayCopy
@@ -2497,9 +2442,6 @@
-
- public function booleanAttributeDataProvider(): Generator
-
@@ -2512,65 +2454,20 @@
source]]>
$values
$values
- $values
- $values
- $values
- $values
- $values
- attributes['src']]]>
$items[$i]
- $values[$i]
- $values[$i]
- $values[$i]
- attributes['src']]]>
- $values[0]
- $values[0]
- $values[0]
- attributes['src']]]>
- $values[5]
- $values[5]
- $values[5]
- attributes['src']]]>
- $first
$item
$item
$items
$values
- $values
- $values
- $values
- $values
-
- ]]>
-
- attributes]]>
- source]]>
- type]]>
- attributes]]>
- source]]>
- source]]>
source]]>
- attributes]]>
- source]]>
- type]]>
- attributes]]>
- source]]>
- type]]>
- attributes]]>
- source]]>
- type]]>
- getArrayCopy
- getArrayCopy
- getArrayCopy
- getArrayCopy
getArrayCopy
getArrayCopy
setIndent
@@ -2590,15 +2487,9 @@
$values
$values
$values
- content]]>
- content]]>
- content]]>
$values[$i]
- $values[0]
- $values[1]
- $values[2]
$item
@@ -2608,15 +2499,10 @@
$values
$values
$values
- $values
content]]>
content]]>
- attributes]]>
- content]]>
- content]]>
- content]]>
bogusMethod
@@ -2625,7 +2511,6 @@
getArrayCopy
getArrayCopy
getArrayCopy
- getArrayCopy
getValue
setIndent
setIndent
@@ -2671,27 +2556,10 @@
_helper]]>
-
+
getDependencyConfig())]]>
-
- $app
-
-
- bootstrap
- getMvcEvent
- loadModules
- setRouteMatch
-
-
- null
- null
- null
-
-
-
-
@@ -2971,8 +2839,6 @@
$o
$o
$o
- $o
- $o
$rIterator
$rIterator
$rIterator
@@ -2990,7 +2856,6 @@
$key
$key
$key
- $key
$value
$value
$value
@@ -3004,12 +2869,6 @@
$value
$value
-
- $item
- $item
- $item
- $item
-
$result
$result
@@ -3074,10 +2933,6 @@
addPath
addPath
-
- new TestAsset\BogusIteratorTest($data)
- new TestAsset\BogusIteratorTest($data)
-
addPath
addPath
@@ -3113,9 +2968,6 @@
message]]>
- $data
- $data
- $key
$key
$key
$key
@@ -3206,16 +3058,6 @@
Bar
-
-
- Iterator
-
-
-
-
- Iterator
-
-
$value
@@ -3230,11 +3072,6 @@
MockContainer
-
-
- Iterator
-
-
getDependencyConfig())]]>
@@ -3287,15 +3124,6 @@
'factories' => $factories,
])]]>
-
- $target
- $target
-
-
- $alias
- $aliases
- $target
-
]]>
diff --git a/test/Helper/AbstractHtmlElementTest.php b/test/Helper/AbstractHtmlElementTest.php
index 371304435..d295e6c5c 100644
--- a/test/Helper/AbstractHtmlElementTest.php
+++ b/test/Helper/AbstractHtmlElementTest.php
@@ -4,15 +4,16 @@
namespace LaminasTest\View\Helper;
+use Laminas\View\Helper\AbstractHtmlElement;
use Laminas\View\Renderer\PhpRenderer;
use LaminasTest\View\Helper\TestAsset\ConcreteElementHelper;
+use PHPUnit\Framework\Attributes\CoversClass;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use function sprintf;
-/**
- * @covers \Laminas\View\Helper\AbstractHtmlElement
- */
+#[CoversClass(AbstractHtmlElement::class)]
class AbstractHtmlElementTest extends TestCase
{
/** @var ConcreteElementHelper */
@@ -38,10 +39,8 @@ public function testThatAttributesWithANullValueArePresentedAsAnEmptyString(): v
self::assertStringContainsString($expect, $this->helper->compileAttributes(['something' => null]));
}
- /**
- * @param scalar|scalar[]|null $attributeValue
- * @dataProvider attributeValuesProvider
- */
+ /** @param scalar|scalar[]|null $attributeValue */
+ #[DataProvider('attributeValuesProvider')]
public function testThatAttributesOfVariousNativeTypesProduceTheExpectedAttributeString(
$attributeValue,
string $expected,
@@ -55,7 +54,7 @@ public function testThatAttributesOfVariousNativeTypesProduceTheExpectedAttribut
}
/** @return array */
- public function attributeValuesProvider(): array
+ public static function attributeValuesProvider(): array
{
return [
'Integer' => [1, '"1"', '"1"'],
diff --git a/test/Helper/AssetTest.php b/test/Helper/AssetTest.php
index 5e5c312d6..f8810c8f9 100644
--- a/test/Helper/AssetTest.php
+++ b/test/Helper/AssetTest.php
@@ -8,12 +8,12 @@
use Laminas\View\Exception;
use Laminas\View\Helper\Asset;
use Laminas\View\HelperPluginManager;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
class AssetTest extends TestCase
{
- /** @var array */
- protected $resourceMap = [
+ private const RESOURCE_MAP = [
'css/style.css' => 'css/style-3a97ff4ee3.css',
'js/vendor.js' => 'js/vendor-a507086eba.js',
];
@@ -24,7 +24,7 @@ protected function setUp(): void
{
parent::setUp();
- $this->asset = new Asset($this->resourceMap);
+ $this->asset = new Asset(self::RESOURCE_MAP);
}
public function testHelperPluginManagerReturnsAssetHelper(): void
@@ -51,10 +51,8 @@ public function testInvalidAssetName(): void
$this->asset->__invoke('unknown');
}
- /**
- * @dataProvider assets
- * @param non-empty-string $name
- */
+ /** @param non-empty-string $name */
+ #[DataProvider('assets')]
public function testInvokeResult(string $name, string $expected): void
{
$result = $this->asset->__invoke($name);
@@ -65,10 +63,10 @@ public function testInvokeResult(string $name, string $expected): void
/**
* @return array
*/
- public function assets(): array
+ public static function assets(): array
{
$data = [];
- foreach ($this->resourceMap as $key => $value) {
+ foreach (self::RESOURCE_MAP as $key => $value) {
$data[] = [$key, $value];
}
return $data;
diff --git a/test/Helper/BasePathTest.php b/test/Helper/BasePathTest.php
index bb88f9037..9939233f6 100644
--- a/test/Helper/BasePathTest.php
+++ b/test/Helper/BasePathTest.php
@@ -6,12 +6,13 @@
use Laminas\View\Exception\RuntimeException;
use Laminas\View\Helper\BasePath;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
class BasePathTest extends TestCase
{
/** @return array */
- public function basePathDataProvider(): array
+ public static function basePathDataProvider(): array
{
return [
['/foo', null, '/foo'],
@@ -32,7 +33,7 @@ public function basePathDataProvider(): array
];
}
- /** @dataProvider basePathDataProvider */
+ #[DataProvider('basePathDataProvider')]
public function testBasePathHelperYieldsExpectedOutput(string $basePath, ?string $argument, string $expect): void
{
$helper = new BasePath($basePath);
diff --git a/test/Helper/EscapeCssTest.php b/test/Helper/EscapeCssTest.php
index 2657f1caa..bfe246020 100644
--- a/test/Helper/EscapeCssTest.php
+++ b/test/Helper/EscapeCssTest.php
@@ -7,6 +7,7 @@
use Laminas\Escaper\Escaper;
use Laminas\Escaper\Exception\InvalidArgumentException;
use Laminas\View\Helper\EscapeCss as EscapeHelper;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use stdClass;
@@ -165,10 +166,8 @@ public function testSettingEncodingToEmptyStringShouldThrowException(): void
$this->helper->getEscaper();
}
- /**
- * @dataProvider supportedEncodingsProvider
- * @param non-empty-string $encoding
- */
+ /** @param non-empty-string $encoding */
+ #[DataProvider('supportedEncodingsProvider')]
public function testSettingValidEncodingShouldNotThrowExceptions(string $encoding): void
{
$this->helper->setEncoding($encoding);
diff --git a/test/Helper/EscapeHtmlAttrTest.php b/test/Helper/EscapeHtmlAttrTest.php
index 5b2924c3f..d473eddac 100644
--- a/test/Helper/EscapeHtmlAttrTest.php
+++ b/test/Helper/EscapeHtmlAttrTest.php
@@ -7,6 +7,7 @@
use Laminas\Escaper\Escaper;
use Laminas\View\Exception\InvalidArgumentException;
use Laminas\View\Helper\EscapeHtmlAttr as EscapeHelper;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use stdClass;
@@ -165,10 +166,8 @@ public function testSettingEncodingToEmptyStringShouldThrowException(): void
$this->helper->getEscaper();
}
- /**
- * @dataProvider supportedEncodingsProvider
- * @param non-empty-string $encoding
- */
+ /** @param non-empty-string $encoding */
+ #[DataProvider('supportedEncodingsProvider')]
public function testSettingValidEncodingShouldNotThrowExceptions(string $encoding): void
{
$this->helper->setEncoding($encoding);
diff --git a/test/Helper/EscapeHtmlTest.php b/test/Helper/EscapeHtmlTest.php
index 519a26360..07285da1f 100644
--- a/test/Helper/EscapeHtmlTest.php
+++ b/test/Helper/EscapeHtmlTest.php
@@ -7,6 +7,7 @@
use Laminas\Escaper\Escaper;
use Laminas\View\Exception\InvalidArgumentException;
use Laminas\View\Helper\EscapeHtml as EscapeHelper;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use stdClass;
@@ -162,10 +163,8 @@ public function testSettingEncodingToEmptyStringShouldThrowException(): void
$this->helper->getEscaper();
}
- /**
- * @dataProvider supportedEncodingsProvider
- * @param non-empty-string $encoding
- */
+ /** @param non-empty-string $encoding */
+ #[DataProvider('supportedEncodingsProvider')]
public function testSettingValidEncodingShouldNotThrowExceptions(string $encoding): void
{
$this->helper->setEncoding($encoding);
diff --git a/test/Helper/EscapeJsTest.php b/test/Helper/EscapeJsTest.php
index 122805e53..d8a90a174 100644
--- a/test/Helper/EscapeJsTest.php
+++ b/test/Helper/EscapeJsTest.php
@@ -7,6 +7,7 @@
use Laminas\Escaper\Escaper;
use Laminas\View\Exception\InvalidArgumentException;
use Laminas\View\Helper\EscapeJs as EscapeHelper;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use stdClass;
@@ -165,10 +166,8 @@ public function testSettingEncodingToEmptyStringShouldThrowException(): void
$this->helper->getEscaper();
}
- /**
- * @dataProvider supportedEncodingsProvider
- * @param non-empty-string $encoding
- */
+ /** @param non-empty-string $encoding */
+ #[DataProvider('supportedEncodingsProvider')]
public function testSettingValidEncodingShouldNotThrowExceptions(string $encoding): void
{
$this->helper->setEncoding($encoding);
diff --git a/test/Helper/EscapeUrlTest.php b/test/Helper/EscapeUrlTest.php
index 08f8dcabe..64b9fcaf7 100644
--- a/test/Helper/EscapeUrlTest.php
+++ b/test/Helper/EscapeUrlTest.php
@@ -7,6 +7,7 @@
use Laminas\Escaper\Escaper;
use Laminas\View\Exception\InvalidArgumentException;
use Laminas\View\Helper\EscapeUrl as EscapeHelper;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use stdClass;
@@ -165,10 +166,8 @@ public function testSettingEncodingToEmptyStringShouldThrowException(): void
$this->helper->getEscaper();
}
- /**
- * @dataProvider supportedEncodingsProvider
- * @param non-empty-string $encoding
- */
+ /** @param non-empty-string $encoding */
+ #[DataProvider('supportedEncodingsProvider')]
public function testSettingValidEncodingShouldNotThrowExceptions(string $encoding): void
{
$this->helper->setEncoding($encoding);
diff --git a/test/Helper/EscaperEncodingsTrait.php b/test/Helper/EscaperEncodingsTrait.php
index d7af16360..932e66240 100644
--- a/test/Helper/EscaperEncodingsTrait.php
+++ b/test/Helper/EscaperEncodingsTrait.php
@@ -9,7 +9,7 @@
trait EscaperEncodingsTrait
{
/** @var list */
- private array $supportedEncodings = [
+ private static array $supportedEncodings = [
'iso-8859-1',
'iso8859-1',
'iso-8859-5',
@@ -47,9 +47,9 @@ trait EscaperEncodingsTrait
];
/** @return iterable> */
- public function supportedEncodingsProvider(): iterable
+ public static function supportedEncodingsProvider(): iterable
{
- foreach ($this->supportedEncodings as $encoding) {
+ foreach (self::$supportedEncodings as $encoding) {
assert(! empty($encoding));
yield $encoding => [$encoding];
}
diff --git a/test/Helper/FlashMessengerTest.php b/test/Helper/FlashMessengerTest.php
index 608f573be..453a957a3 100644
--- a/test/Helper/FlashMessengerTest.php
+++ b/test/Helper/FlashMessengerTest.php
@@ -436,9 +436,6 @@ public function testCanSetAutoEscape(): void
$this->assertTrue($this->helper->getAutoEscape());
}
- /**
- * @covers \Laminas\View\Helper\FlashMessenger::render
- */
public function testMessageIsEscapedByDefault(): void
{
$helper = new FlashMessenger();
@@ -450,9 +447,6 @@ public function testMessageIsEscapedByDefault(): void
$this->assertSame($displayAssertion, $display);
}
- /**
- * @covers \Laminas\View\Helper\FlashMessenger::render
- */
public function testMessageIsNotEscapedWhenAutoEscapeIsFalse(): void
{
$helper = new FlashMessenger();
@@ -465,9 +459,6 @@ public function testMessageIsNotEscapedWhenAutoEscapeIsFalse(): void
$this->assertSame($displayAssertion, $display);
}
- /**
- * @covers \Laminas\View\Helper\FlashMessenger::render
- */
public function testCanSetAutoEscapeOnRender(): void
{
$helper = new FlashMessenger();
@@ -479,9 +470,6 @@ public function testCanSetAutoEscapeOnRender(): void
$this->assertSame($displayAssertion, $display);
}
- /**
- * @covers \Laminas\View\Helper\FlashMessenger::render
- */
public function testRenderUsesCurrentAutoEscapeByDefault(): void
{
$helper = new FlashMessenger();
@@ -503,9 +491,6 @@ public function testRenderUsesCurrentAutoEscapeByDefault(): void
$this->assertSame($displayAssertion, $display);
}
- /**
- * @covers \Laminas\View\Helper\FlashMessenger::renderCurrent
- */
public function testCurrentMessageIsEscapedByDefault(): void
{
$this->helper->addMessage('Foo
bar');
@@ -515,9 +500,6 @@ public function testCurrentMessageIsEscapedByDefault(): void
$this->assertSame($displayAssertion, $display);
}
- /**
- * @covers \Laminas\View\Helper\FlashMessenger::renderCurrent
- */
public function testCurrentMessageIsNotEscapedWhenAutoEscapeIsFalse(): void
{
$this->helper->addMessage('Foo
bar');
@@ -528,9 +510,6 @@ public function testCurrentMessageIsNotEscapedWhenAutoEscapeIsFalse(): void
$this->assertSame($displayAssertion, $display);
}
- /**
- * @covers \Laminas\View\Helper\FlashMessenger::renderCurrent
- */
public function testCanSetAutoEscapeOnRenderCurrent(): void
{
$this->helper->addMessage('Foo
bar');
@@ -540,9 +519,6 @@ public function testCanSetAutoEscapeOnRenderCurrent(): void
$this->assertSame($displayAssertion, $display);
}
- /**
- * @covers \Laminas\View\Helper\FlashMessenger::renderCurrent
- */
public function testRenderCurrentUsesCurrentAutoEscapeByDefault(): void
{
$this->helper->addMessage('Foo
bar');
diff --git a/test/Helper/GravatarTest.php b/test/Helper/GravatarTest.php
index 04c6076a9..6e912614c 100644
--- a/test/Helper/GravatarTest.php
+++ b/test/Helper/GravatarTest.php
@@ -11,9 +11,13 @@
use ReflectionMethod;
use function method_exists;
+use function restore_error_handler;
+use function set_error_handler;
use function strtoupper;
use function urlencode;
+use const E_USER_DEPRECATED;
+
/** @psalm-suppress DeprecatedClass */
class GravatarTest extends TestCase
{
@@ -274,9 +278,17 @@ public function testEmailIsProperlyNormalized(): void
public function testSetAttribsIsDeprecated(): void
{
- $this->expectDeprecation();
-
- $this->helper->setAttribs([]);
+ set_error_handler(function ($code, $error) {
+ throw new Exception\RuntimeException($error, $code);
+ }, E_USER_DEPRECATED);
+ try {
+ $this->helper->setAttribs([]);
+ $this->fail('An exception was not thrown');
+ } catch (Exception\RuntimeException $e) {
+ self::assertStringContainsString('setAttribs is deprecated', $e->getMessage());
+ } finally {
+ restore_error_handler();
+ }
}
public function testSetAttribsDocCommentHasDeprecated(): void
@@ -289,9 +301,17 @@ public function testSetAttribsDocCommentHasDeprecated(): void
public function testGetAttribsIsDeprecated(): void
{
- $this->expectDeprecation();
-
- $this->helper->getAttribs();
+ set_error_handler(function ($code, $error) {
+ throw new Exception\RuntimeException($error, $code);
+ }, E_USER_DEPRECATED);
+ try {
+ $this->helper->getAttribs();
+ $this->fail('An exception was not thrown');
+ } catch (Exception\RuntimeException $e) {
+ self::assertStringContainsString('getAttribs is deprecated', $e->getMessage());
+ } finally {
+ restore_error_handler();
+ }
}
public function testGetAttribsDocCommentHasDeprecated(): void
diff --git a/test/Helper/HeadLinkTest.php b/test/Helper/HeadLinkTest.php
index 300787187..f47ea7a3e 100644
--- a/test/Helper/HeadLinkTest.php
+++ b/test/Helper/HeadLinkTest.php
@@ -10,6 +10,7 @@
use Laminas\View\Helper\EscapeHtmlAttr;
use Laminas\View\Helper\HeadLink;
use Laminas\View\Renderer\PhpRenderer as View;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use function array_fill;
@@ -229,8 +230,8 @@ public function testStylesheetAttributesGetSet(): void
{
$this->helper->setStylesheet('/styles.css', 'projection', 'ie6');
$item = $this->helper->getValue();
- $this->assertObjectHasAttribute('media', $item);
- $this->assertObjectHasAttribute('conditionalStylesheet', $item);
+ $this->assertObjectHasProperty('media', $item);
+ $this->assertObjectHasProperty('conditionalStylesheet', $item);
$this->assertEquals('projection', $item->media);
$this->assertEquals('ie6', $item->conditionalStylesheet);
@@ -240,7 +241,7 @@ public function testConditionalStylesheetNotCreatedByDefault(): void
{
$this->helper->setStylesheet('/styles.css');
$item = $this->helper->getValue();
- $this->assertObjectHasAttribute('conditionalStylesheet', $item);
+ $this->assertObjectHasProperty('conditionalStylesheet', $item);
$this->assertFalse($item->conditionalStylesheet);
$attributeEscaper = $this->attributeEscaper;
@@ -256,7 +257,7 @@ public function testConditionalStylesheetCreationOccursWhenRequested(): void
{
$this->helper->setStylesheet('/styles.css', 'screen', 'ie6');
$item = $this->helper->getValue();
- $this->assertObjectHasAttribute('conditionalStylesheet', $item);
+ $this->assertObjectHasProperty('conditionalStylesheet', $item);
$this->assertEquals('ie6', $item->conditionalStylesheet);
$attributeEscaper = $this->attributeEscaper;
@@ -271,7 +272,7 @@ public function testConditionalStylesheetCreationNoIE(): void
{
$this->helper->setStylesheet('/styles.css', 'screen', '!IE');
$item = $this->helper->getValue();
- $this->assertObjectHasAttribute('conditionalStylesheet', $item);
+ $this->assertObjectHasProperty('conditionalStylesheet', $item);
$this->assertEquals('!IE', $item->conditionalStylesheet);
$attributeEscaper = $this->attributeEscaper;
@@ -286,7 +287,7 @@ public function testConditionalStylesheetCreationNoIEWidthSpaces(): void
{
$this->helper->setStylesheet('/styles.css', 'screen', '! IE');
$item = $this->helper->getValue();
- $this->assertObjectHasAttribute('conditionalStylesheet', $item);
+ $this->assertObjectHasProperty('conditionalStylesheet', $item);
$this->assertEquals('! IE', $item->conditionalStylesheet);
$attributeEscaper = $this->attributeEscaper;
@@ -297,7 +298,8 @@ public function testConditionalStylesheetCreationNoIEWidthSpaces(): void
$this->assertStringContainsString('', $string);
}
- public function argumentCountProvider(): iterable
+ /** @return array */
+ public static function argumentCountProvider(): array
{
return [
'One' => [1],
@@ -305,7 +307,7 @@ public function argumentCountProvider(): iterable
];
}
- /** @dataProvider argumentCountProvider */
+ #[DataProvider('argumentCountProvider')]
public function testSettingAlternateWithTooFewArgsRaisesException(int $argumentCount): void
{
$arguments = array_fill(0, $argumentCount, 'foo');
diff --git a/test/Helper/HeadMetaTest.php b/test/Helper/HeadMetaTest.php
index f245e1e87..a0ff212fc 100644
--- a/test/Helper/HeadMetaTest.php
+++ b/test/Helper/HeadMetaTest.php
@@ -99,14 +99,16 @@ protected function executeOverloadAppend(string $type): void
for ($i = 0; $i < 3; ++$i) {
$string .= ' foo';
$this->helper->$action('keywords', $string);
- $values = $this->helper->getArrayCopy();
- $this->assertEquals($i + 1, count($values));
+ $values = $this->helper->getContainer()->getArrayCopy();
+ $this->assertCount($i + 1, $values);
$item = $values[$i];
- $this->assertObjectHasAttribute('type', $item);
- $this->assertObjectHasAttribute('modifiers', $item);
- $this->assertObjectHasAttribute('content', $item);
- $this->assertObjectHasAttribute($item->type, $item);
+ self::assertIsObject($item);
+ $this->assertObjectHasProperty('type', $item);
+ $this->assertObjectHasProperty('modifiers', $item);
+ $this->assertObjectHasProperty('content', $item);
+ self::assertIsString($item->type);
+ $this->assertObjectHasProperty($item->type, $item);
$this->assertEquals('keywords', $item->{$item->type});
$this->assertEquals($string, $item->content);
}
@@ -119,14 +121,15 @@ protected function executeOverloadPrepend(string $type): void
for ($i = 0; $i < 3; ++$i) {
$string .= ' foo';
$this->helper->$action('keywords', $string);
- $values = $this->helper->getArrayCopy();
- $this->assertEquals($i + 1, count($values));
+ $values = $this->helper->getContainer()->getArrayCopy();
+ self::assertCount($i + 1, $values);
$item = array_shift($values);
-
- $this->assertObjectHasAttribute('type', $item);
- $this->assertObjectHasAttribute('modifiers', $item);
- $this->assertObjectHasAttribute('content', $item);
- $this->assertObjectHasAttribute($item->type, $item);
+ self::assertIsObject($item);
+ $this->assertObjectHasProperty('type', $item);
+ $this->assertObjectHasProperty('modifiers', $item);
+ $this->assertObjectHasProperty('content', $item);
+ self::assertIsString($item->type);
+ $this->assertObjectHasProperty($item->type, $item);
$this->assertEquals('keywords', $item->{$item->type});
$this->assertEquals($string, $item->content);
}
@@ -142,14 +145,18 @@ protected function executeOverloadSet(string $type): void
$string .= ' foo';
}
$this->helper->$setAction('keywords', $string);
+
$values = $this->helper->getArrayCopy();
+ self::assertIsArray($values);
$this->assertCount(1, $values);
$item = array_shift($values);
+ self::assertIsObject($item);
- $this->assertObjectHasAttribute('type', $item);
- $this->assertObjectHasAttribute('modifiers', $item);
- $this->assertObjectHasAttribute('content', $item);
- $this->assertObjectHasAttribute($item->type, $item);
+ $this->assertObjectHasProperty('type', $item);
+ $this->assertObjectHasProperty('modifiers', $item);
+ $this->assertObjectHasProperty('content', $item);
+ self::assertIsString($item->type);
+ $this->assertObjectHasProperty($item->type, $item);
$this->assertEquals('keywords', $item->{$item->type});
$this->assertEquals($string, $item->content);
}
@@ -203,7 +210,7 @@ public function testCanBuildMetaTagsWithAttributes(): void
$this->helper->setName('keywords', 'foo bar', ['lang' => 'us_en', 'scheme' => 'foo', 'bogus' => 'unused']);
$value = $this->helper->getValue();
- $this->assertObjectHasAttribute('modifiers', $value);
+ $this->assertObjectHasProperty('modifiers', $value);
$modifiers = $value->modifiers;
$this->assertArrayHasKey('lang', $modifiers);
$this->assertEquals('us_en', $modifiers['lang']);
diff --git a/test/Helper/HeadScriptTest.php b/test/Helper/HeadScriptTest.php
index 4a18089f7..46dbf0257 100644
--- a/test/Helper/HeadScriptTest.php
+++ b/test/Helper/HeadScriptTest.php
@@ -9,6 +9,7 @@
use Laminas\View;
use Laminas\View\Helper;
use Laminas\View\Helper\Doctype;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use function array_shift;
@@ -90,14 +91,17 @@ private function executeOverloadAppend(string $type): void
for ($i = 0; $i < 3; ++$i) {
$string .= ' foo';
$this->helper->$action($string);
- $values = $this->helper->getArrayCopy();
- $this->assertCount($i + 1, $values);
+ $values = $this->helper->getContainer()->getArrayCopy();
+ self::assertCount($i + 1, $values);
+ $item = $values[$i];
+ self::assertIsObject($item);
if ('file' === $type) {
- $this->assertEquals($string, $values[$i]->attributes['src']);
+ self::assertIsArray($item->attributes);
+ self::assertEquals($string, $item->attributes['src']);
} elseif ('script' === $type) {
- $this->assertEquals($string, $values[$i]->source);
+ self::assertEquals($string, $item->source);
}
- $this->assertEquals('text/javascript', $values[$i]->type);
+ self::assertEquals('text/javascript', $item->type);
}
}
@@ -108,15 +112,17 @@ private function executeOverloadPrepend(string $type): void
for ($i = 0; $i < 3; ++$i) {
$string .= ' foo';
$this->helper->$action($string);
- $values = $this->helper->getArrayCopy();
- $this->assertCount($i + 1, $values);
+ $values = $this->helper->getContainer()->getArrayCopy();
+ self::assertCount($i + 1, $values);
$first = array_shift($values);
+ self::assertIsObject($first);
if ('file' === $type) {
- $this->assertEquals($string, $first->attributes['src']);
+ self::assertIsArray($first->attributes);
+ self::assertEquals($string, $first->attributes['src']);
} elseif ('script' === $type) {
- $this->assertEquals($string, $first->source);
+ self::assertEquals($string, $first->source);
}
- $this->assertEquals('text/javascript', $first->type);
+ self::assertEquals('text/javascript', $first->type);
}
}
@@ -129,14 +135,17 @@ private function executeOverloadSet(string $type): void
$string .= ' foo';
}
$this->helper->$action($string);
- $values = $this->helper->getArrayCopy();
- $this->assertCount(1, $values);
+ $values = $this->helper->getContainer()->getArrayCopy();
+ self::assertCount(1, $values);
+ $item = $values[0];
+ self::assertIsObject($item);
if ('file' === $type) {
- $this->assertEquals($string, $values[0]->attributes['src']);
+ self::assertIsArray($item->attributes);
+ self::assertEquals($string, $item->attributes['src']);
} elseif ('script' === $type) {
- $this->assertEquals($string, $values[0]->source);
+ self::assertEquals($string, $item->source);
}
- $this->assertEquals('text/javascript', $values[0]->type);
+ self::assertEquals('text/javascript', $item->type);
}
private function executeOverloadOffsetSet(string $type): void
@@ -144,14 +153,17 @@ private function executeOverloadOffsetSet(string $type): void
$action = 'offsetSet' . $this->inflectAction($type);
$string = 'foo';
$this->helper->$action(5, $string);
- $values = $this->helper->getArrayCopy();
- $this->assertCount(1, $values);
+ $values = $this->helper->getContainer()->getArrayCopy();
+ self::assertCount(1, $values);
+ $item = $values[5];
+ self::assertIsObject($item);
if ('file' === $type) {
- $this->assertEquals($string, $values[5]->attributes['src']);
+ self::assertIsArray($item->attributes);
+ self::assertEquals($string, $item->attributes['src']);
} elseif ('script' === $type) {
- $this->assertEquals($string, $values[5]->source);
+ self::assertEquals($string, $item->source);
}
- $this->assertEquals('text/javascript', $values[5]->type);
+ self::assertEquals('text/javascript', $item->type);
}
public function testOverloadAppendFileAppendsScriptsToStack(): void
@@ -228,16 +240,16 @@ public function testHeadScriptAppropriatelySetsScriptItems(): void
$item = $items[$i];
switch ($i) {
case 0:
- $this->assertObjectHasAttribute('source', $item);
+ $this->assertObjectHasProperty('source', $item);
$this->assertEquals('bar', $item->source);
break;
case 1:
- $this->assertObjectHasAttribute('attributes', $item);
+ $this->assertObjectHasProperty('attributes', $item);
$this->assertTrue(isset($item->attributes['src']));
$this->assertEquals('foo', $item->attributes['src']);
break;
case 2:
- $this->assertObjectHasAttribute('source', $item);
+ $this->assertObjectHasProperty('source', $item);
$this->assertEquals('baz', $item->source);
break;
}
@@ -525,8 +537,8 @@ public function testSupportsNonceAttribute(): void
);
}
- /** @return Generator */
- public function booleanAttributeDataProvider(): Generator
+ /** @return Generator> */
+ public static function booleanAttributeDataProvider(): Generator
{
$values = ['async', 'defer', 'nomodule'];
@@ -535,7 +547,7 @@ public function booleanAttributeDataProvider(): Generator
}
}
- /** @dataProvider booleanAttributeDataProvider */
+ #[DataProvider('booleanAttributeDataProvider')]
public function testBooleanAttributesUseTheKeyNameAsTheValue(string $attribute): void
{
($this->helper)()->appendScript(
@@ -550,7 +562,7 @@ public function testBooleanAttributesUseTheKeyNameAsTheValue(string $attribute):
);
}
- /** @dataProvider booleanAttributeDataProvider */
+ #[DataProvider('booleanAttributeDataProvider')]
public function testBooleanAttributesCanBeAppliedToModules(string $attribute): void
{
($this->helper)()->appendScript(
diff --git a/test/Helper/HeadStyleTest.php b/test/Helper/HeadStyleTest.php
index df244fdfe..dbf7c5889 100644
--- a/test/Helper/HeadStyleTest.php
+++ b/test/Helper/HeadStyleTest.php
@@ -79,8 +79,8 @@ public function testOverloadAppendStyleAppendsStyleToStack(): void
$item = $values[$i];
$this->assertInstanceOf(stdClass::class, $item);
- $this->assertObjectHasAttribute('content', $item);
- $this->assertObjectHasAttribute('attributes', $item);
+ $this->assertObjectHasProperty('content', $item);
+ $this->assertObjectHasProperty('attributes', $item);
$this->assertEquals($string, $item->content);
}
}
@@ -96,8 +96,8 @@ public function testOverloadPrependStylePrependsStyleToStack(): void
$item = array_shift($values);
$this->assertInstanceOf(stdClass::class, $item);
- $this->assertObjectHasAttribute('content', $item);
- $this->assertObjectHasAttribute('attributes', $item);
+ $this->assertObjectHasProperty('content', $item);
+ $this->assertObjectHasProperty('attributes', $item);
$this->assertEquals($string, $item->content);
}
}
@@ -115,8 +115,8 @@ public function testOverloadSetOversitesStack(): void
$item = array_shift($values);
$this->assertInstanceOf(stdClass::class, $item);
- $this->assertObjectHasAttribute('content', $item);
- $this->assertObjectHasAttribute('attributes', $item);
+ $this->assertObjectHasProperty('content', $item);
+ $this->assertObjectHasProperty('attributes', $item);
$this->assertEquals($string, $item->content);
}
@@ -131,7 +131,7 @@ public function testCanBuildStyleTagsWithAttributes(): void
]);
$value = $this->helper->getValue();
- $this->assertObjectHasAttribute('attributes', $value);
+ $this->assertObjectHasProperty('attributes', $value);
$attributes = $value->attributes;
$this->assertTrue(isset($attributes['lang']));
@@ -183,11 +183,17 @@ public function testHeadStyleProxiesProperly(): void
$this->helper->__invoke($style1, 'SET')
->__invoke($style2, 'PREPEND')
->__invoke($style3, 'APPEND');
- $this->assertEquals(3, count($this->helper));
- $values = $this->helper->getArrayCopy();
- $this->assertStringContainsString($values[0]->content, $style2);
- $this->assertStringContainsString($values[1]->content, $style1);
- $this->assertStringContainsString($values[2]->content, $style3);
+ self::assertCount(3, $this->helper);
+ $values = $this->helper->getContainer()->getArrayCopy();
+ self::assertIsObject($values[0]);
+ self::assertIsObject($values[1]);
+ self::assertIsObject($values[2]);
+ self::assertIsString($values[0]->content);
+ self::assertIsString($values[1]->content);
+ self::assertIsString($values[2]->content);
+ self::assertStringContainsString($values[0]->content, $style2);
+ self::assertStringContainsString($values[1]->content, $style1);
+ self::assertStringContainsString($values[2]->content, $style3);
}
public function testToStyleGeneratesValidHtml(): void
diff --git a/test/Helper/JsonTest.php b/test/Helper/JsonTest.php
index a4de7196b..99f4f7e94 100644
--- a/test/Helper/JsonTest.php
+++ b/test/Helper/JsonTest.php
@@ -7,9 +7,15 @@
use Laminas\Http\Header\HeaderInterface;
use Laminas\Http\Response;
use Laminas\Json\Json as JsonFormatter;
+use Laminas\View\Exception\RuntimeException;
use Laminas\View\Helper\Json as JsonHelper;
use PHPUnit\Framework\TestCase;
+use function restore_error_handler;
+use function set_error_handler;
+
+use const E_USER_DEPRECATED;
+
class JsonTest extends TestCase
{
private Response $response;
@@ -50,8 +56,17 @@ public function testJsonHelperReturnsJsonEncodedString(): void
public function testThatADeprecationErrorIsTriggeredWhenExpressionFinderOptionIsUsed(): void
{
- $this->expectDeprecation();
- $this->helper->__invoke(['foo'], ['enableJsonExprFinder' => true]);
+ set_error_handler(function ($code, $error) {
+ throw new RuntimeException($error, $code);
+ }, E_USER_DEPRECATED);
+ try {
+ $this->helper->__invoke(['foo'], ['enableJsonExprFinder' => true]);
+ $this->fail('An exception was not thrown');
+ } catch (RuntimeException $e) {
+ self::assertStringContainsString('Json Expression functionality is deprecated', $e->getMessage());
+ } finally {
+ restore_error_handler();
+ }
}
public function testThatADeprecationErrorIsNotTriggeredWhenExpressionFinderOptionIsNotUsed(): void
diff --git a/test/Helper/Navigation/AbstractHelperTest.php b/test/Helper/Navigation/AbstractHelperTest.php
index 885e69761..3d4e6ee4c 100644
--- a/test/Helper/Navigation/AbstractHelperTest.php
+++ b/test/Helper/Navigation/AbstractHelperTest.php
@@ -10,7 +10,7 @@
/**
* @psalm-suppress MissingConstructor
*/
-class AbstractHelperTest extends AbstractTest
+class AbstractHelperTest extends AbstractTestCase
{
/**
* View helper
diff --git a/test/Helper/Navigation/AbstractTest.php b/test/Helper/Navigation/AbstractTestCase.php
similarity index 90%
rename from test/Helper/Navigation/AbstractTest.php
rename to test/Helper/Navigation/AbstractTestCase.php
index 7870d222f..b0e7307bd 100644
--- a/test/Helper/Navigation/AbstractTest.php
+++ b/test/Helper/Navigation/AbstractTestCase.php
@@ -5,6 +5,8 @@
namespace LaminasTest\View\Helper\Navigation;
use Laminas\I18n\Translator\Translator;
+use Laminas\ModuleManager\ModuleManager;
+use Laminas\Mvc\Application;
use Laminas\Mvc\Service\ServiceManagerConfig;
use Laminas\Navigation\Navigation;
use Laminas\Navigation\Service\DefaultNavigationFactory;
@@ -30,7 +32,7 @@
*
* @psalm-suppress MissingConstructor
*/
-abstract class AbstractTest extends TestCase
+abstract class AbstractTestCase extends TestCase
{
/** @var ServiceManager */
protected $serviceManager;
@@ -136,17 +138,19 @@ protected function setUp(): void
}
$sm->setService('ApplicationConfig', $smConfig);
- $sm->get('ModuleManager')->loadModules();
- $sm->get('Application')->bootstrap();
+ $moduleManager = $sm->get('ModuleManager');
+ self::assertInstanceOf(ModuleManager::class, $moduleManager);
+ $moduleManager->loadModules();
+ $application = $sm->get('Application');
+ self::assertInstanceOf(Application::class, $application);
+ $application->bootstrap();
$sm->setFactory('Navigation', DefaultNavigationFactory::class);
$sm->setService('nav1', $this->nav1);
$sm->setService('nav2', $this->nav2);
$sm->setAllowOverride(false);
-
- $app = $this->serviceManager->get('Application');
- $app->getMvcEvent()->setRouteMatch(new RouteMatch([
+ $application->getMvcEvent()->setRouteMatch(new RouteMatch([
'controller' => 'post',
'action' => 'view',
'id' => '1337',
@@ -175,7 +179,7 @@ protected function getAcl(): array
$acl->addResource(new GenericResource('guest_foo'));
$acl->addResource(new GenericResource('member_foo'), 'guest_foo');
- $acl->addResource(new GenericResource('admin_foo', 'member_foo'));
+ $acl->addResource(new GenericResource('admin_foo'));
$acl->addResource(new GenericResource('special_foo'), 'member_foo');
$acl->allow('guest', 'guest_foo');
@@ -201,7 +205,7 @@ protected function getTranslator(): Translator
];
$translator = new Translator();
$translator->getPluginManager()->setService('default', $loader);
- $translator->addTranslationFile('default', null);
+ $translator->addTranslationFile('default', __FILE__);
return $translator;
}
@@ -230,8 +234,8 @@ protected function getTranslatorWithTextDomain(): Translator
$translator = new Translator();
$translator->getPluginManager()->setService('default1', $loader1);
$translator->getPluginManager()->setService('default2', $loader2);
- $translator->addTranslationFile('default1', null, 'LaminasTest_1');
- $translator->addTranslationFile('default2', null, 'LaminasTest_2');
+ $translator->addTranslationFile('default1', __FILE__, 'LaminasTest_1');
+ $translator->addTranslationFile('default2', __FILE__, 'LaminasTest_2');
return $translator;
}
}
diff --git a/test/Helper/Navigation/BreadcrumbsTest.php b/test/Helper/Navigation/BreadcrumbsTest.php
index 086f54a06..539b5317c 100644
--- a/test/Helper/Navigation/BreadcrumbsTest.php
+++ b/test/Helper/Navigation/BreadcrumbsTest.php
@@ -13,7 +13,7 @@
use function substr;
use function trim;
-class BreadcrumbsTest extends AbstractTest
+class BreadcrumbsTest extends AbstractTestCase
{
/**
* View helper.
diff --git a/test/Helper/Navigation/LinksTest.php b/test/Helper/Navigation/LinksTest.php
index 5a1e830e0..72438e7a6 100644
--- a/test/Helper/Navigation/LinksTest.php
+++ b/test/Helper/Navigation/LinksTest.php
@@ -27,7 +27,7 @@
/**
* @psalm-suppress MissingConstructor
*/
-class LinksTest extends AbstractTest
+class LinksTest extends AbstractTestCase
{
/**
* View helper
diff --git a/test/Helper/Navigation/MenuTest.php b/test/Helper/Navigation/MenuTest.php
index 797aa0e14..0d8994317 100644
--- a/test/Helper/Navigation/MenuTest.php
+++ b/test/Helper/Navigation/MenuTest.php
@@ -20,7 +20,7 @@
/**
* @psalm-suppress MissingConstructor
*/
-class MenuTest extends AbstractTest
+class MenuTest extends AbstractTestCase
{
/**
* View helper.
diff --git a/test/Helper/Navigation/NavigationTest.php b/test/Helper/Navigation/NavigationTest.php
index 2ce626115..0144a7021 100644
--- a/test/Helper/Navigation/NavigationTest.php
+++ b/test/Helper/Navigation/NavigationTest.php
@@ -29,7 +29,7 @@
/**
* @psalm-suppress MissingConstructor
*/
-class NavigationTest extends AbstractTest
+class NavigationTest extends AbstractTestCase
{
/**
* View helper
diff --git a/test/Helper/Navigation/SitemapTest.php b/test/Helper/Navigation/SitemapTest.php
index f6843c84d..9e84b6aca 100644
--- a/test/Helper/Navigation/SitemapTest.php
+++ b/test/Helper/Navigation/SitemapTest.php
@@ -8,6 +8,7 @@
use Laminas\View;
use Laminas\View\Helper\BasePath;
use Laminas\View\Helper\Navigation\Sitemap;
+use PHPUnit\Framework\Attributes\DataProvider;
use Throwable; // phpcs:ignore
use function count;
@@ -19,7 +20,7 @@
/**
* @psalm-suppress MissingConstructor
*/
-class SitemapTest extends AbstractTest
+class SitemapTest extends AbstractTestCase
{
/** @var array */
private array $oldServer = [];
@@ -206,7 +207,7 @@ public function testDisablingValidators(): void
}
/** @return array, 2:string}> */
- public function invalidServerUrlDataProvider(): array
+ public static function invalidServerUrlDataProvider(): array
{
return [
'muppets' => [
@@ -217,10 +218,8 @@ public function invalidServerUrlDataProvider(): array
];
}
- /**
- * @param class-string $expectedType
- * @dataProvider invalidServerUrlDataProvider
- */
+ /** @param class-string $expectedType */
+ #[DataProvider('invalidServerUrlDataProvider')]
public function testSetServerUrlRequiresValidUri(
string $invalidServerUrl,
string $expectedType,
diff --git a/test/Helper/PartialLoopTest.php b/test/Helper/PartialLoopTest.php
index 45a3978c9..32f7a1181 100644
--- a/test/Helper/PartialLoopTest.php
+++ b/test/Helper/PartialLoopTest.php
@@ -59,7 +59,7 @@ public function testPartialLoopIteratesOverIterator(): void
['message' => 'baz'],
['message' => 'bat'],
];
- $o = new TestAsset\IteratorTest($data);
+ $o = new TestAsset\PartialLoopIterator($data);
$view = new View();
$view->resolver()->addPath($this->basePath . '/application/views/scripts');
@@ -74,12 +74,12 @@ public function testPartialLoopIteratesOverIterator(): void
public function testPartialLoopIteratesOverRecursiveIterator(): void
{
- $rIterator = new TestAsset\RecursiveIteratorTest();
+ $rIterator = new TestAsset\PartialLoopRecursiveIterator();
for ($i = 0; $i < 5; ++$i) {
$data = [
'message' => 'foo' . $i,
];
- $rIterator->addItem(new TestAsset\IteratorTest($data));
+ $rIterator->addItem(new TestAsset\PartialLoopIterator($data));
}
$view = new View();
@@ -88,7 +88,7 @@ public function testPartialLoopIteratesOverRecursiveIterator(): void
$result = $this->helper->__invoke('partialLoop.phtml', $rIterator);
foreach ($rIterator as $item) {
- foreach ($item as $key => $value) {
+ foreach ($item as $value) {
$this->assertStringContainsString($value, $result, var_export($value, true));
}
}
@@ -96,21 +96,14 @@ public function testPartialLoopIteratesOverRecursiveIterator(): void
public function testPartialLoopThrowsExceptionWithBadIterator(): void
{
- $data = [
- ['message' => 'foo'],
- ['message' => 'bar'],
- ['message' => 'baz'],
- ['message' => 'bat'],
- ];
- $o = new TestAsset\BogusIteratorTest($data);
-
$view = new View();
$view->resolver()->addPath($this->basePath . '/application/views/scripts');
$this->helper->setView($view);
$this->expectException(Exception\InvalidArgumentException::class);
$this->expectExceptionMessage('PartialLoop helper requires iterable data');
- $this->helper->__invoke('partialLoop.phtml', $o);
+ /** @psalm-suppress InvalidArgument */
+ $this->helper->__invoke('partialLoop.phtml', new TestAsset\PartialLoopBogusIterator());
}
public function testPassingNullDataThrowsException(): void
@@ -158,7 +151,7 @@ public function testShouldAllowIteratingOverObjectsImplementingToArray(): void
['message' => 'baz'],
['message' => 'bat'],
];
- $o = new TestAsset\ToArrayTest($data);
+ $o = new TestAsset\PartialLoopToArrayImplementor($data);
$view = new View();
$view->resolver()->addPath($this->basePath . '/application/views/scripts');
@@ -179,7 +172,7 @@ public function testShouldNotCastToArrayIfObjectIsTraversable(): void
new TestAsset\IteratorWithToArrayTestContainer(['message' => 'baz']),
new TestAsset\IteratorWithToArrayTestContainer(['message' => 'bat']),
];
- $o = new TestAsset\IteratorWithToArrayTest($data);
+ $o = new TestAsset\PartialLoopIteratorWithToArray($data);
$view = new View();
$view->resolver()->addPath($this->basePath . '/application/views/scripts');
@@ -242,12 +235,12 @@ public function testPartialLoopPartialCounterResets(): void
public function testShouldNotConvertToArrayRecursivelyIfModelIsTraversable(): void
{
- $rIterator = new TestAsset\RecursiveIteratorTest();
+ $rIterator = new TestAsset\PartialLoopRecursiveIterator();
for ($i = 0; $i < 5; ++$i) {
$data = [
'message' => 'foo' . $i,
];
- $rIterator->addItem(new TestAsset\IteratorTest($data));
+ $rIterator->addItem(new TestAsset\PartialLoopIterator($data));
}
$view = new View();
@@ -360,7 +353,7 @@ public function testPartialLoopIteratesOverIteratorInLoopMethod(): void
['message' => 'baz'],
['message' => 'bat'],
];
- $o = new TestAsset\IteratorTest($data);
+ $o = new TestAsset\PartialLoopIterator($data);
$view = new View();
$view->resolver()->addPath($this->basePath . '/application/views/scripts');
@@ -375,12 +368,12 @@ public function testPartialLoopIteratesOverIteratorInLoopMethod(): void
public function testPartialLoopIteratesOverRecursiveIteratorInLoopMethod(): void
{
- $rIterator = new TestAsset\RecursiveIteratorTest();
+ $rIterator = new TestAsset\PartialLoopRecursiveIterator();
for ($i = 0; $i < 5; ++$i) {
$data = [
'message' => 'foo' . $i,
];
- $rIterator->addItem(new TestAsset\IteratorTest($data));
+ $rIterator->addItem(new TestAsset\PartialLoopIterator($data));
}
$view = new View();
@@ -397,20 +390,13 @@ public function testPartialLoopIteratesOverRecursiveIteratorInLoopMethod(): void
public function testPartialLoopThrowsExceptionWithBadIteratorInLoopMethod(): void
{
- $data = [
- ['message' => 'foo'],
- ['message' => 'bar'],
- ['message' => 'baz'],
- ['message' => 'bat'],
- ];
- $o = new TestAsset\BogusIteratorTest($data);
-
$view = new View();
$view->resolver()->addPath($this->basePath . '/application/views/scripts');
$this->helper->setView($view);
$this->expectException(Exception\InvalidArgumentException::class);
$this->expectExceptionMessage('PartialLoop helper requires iterable data');
- $this->helper->Loop('partialLoop.phtml', $o);
+ /** @psalm-suppress InvalidArgument */
+ $this->helper->Loop('partialLoop.phtml', new TestAsset\PartialLoopBogusIterator());
}
public function testPassingNullDataThrowsExceptionInLoopMethod(): void
@@ -452,7 +438,7 @@ public function testShouldAllowIteratingOverObjectsImplementingToArrayInLoopMeth
['message' => 'baz'],
['message' => 'bat'],
];
- $o = new TestAsset\ToArrayTest($data);
+ $o = new TestAsset\PartialLoopToArrayImplementor($data);
$view = new View();
$view->resolver()->addPath($this->basePath . '/application/views/scripts');
@@ -473,7 +459,7 @@ public function testShouldNotCastToArrayIfObjectIsTraversableInLoopMethod(): voi
new TestAsset\IteratorWithToArrayTestContainer(['message' => 'baz']),
new TestAsset\IteratorWithToArrayTestContainer(['message' => 'bat']),
];
- $o = new TestAsset\IteratorWithToArrayTest($data);
+ $o = new TestAsset\PartialLoopIteratorWithToArray($data);
$view = new View();
$view->resolver()->addPath($this->basePath . '/application/views/scripts');
@@ -536,12 +522,12 @@ public function testPartialLoopPartialCounterResetsInLoopMethod(): void
public function testShouldNotConvertToArrayRecursivelyIfModelIsTraversableInLoopMethod(): void
{
- $rIterator = new TestAsset\RecursiveIteratorTest();
+ $rIterator = new TestAsset\PartialLoopRecursiveIterator();
for ($i = 0; $i < 5; ++$i) {
$data = [
'message' => 'foo' . $i,
];
- $rIterator->addItem(new TestAsset\IteratorTest($data));
+ $rIterator->addItem(new TestAsset\PartialLoopIterator($data));
}
$view = new View();
diff --git a/test/Helper/Service/AssetFactoryTest.php b/test/Helper/Service/AssetFactoryTest.php
index ddbcd3df1..807d0c19d 100644
--- a/test/Helper/Service/AssetFactoryTest.php
+++ b/test/Helper/Service/AssetFactoryTest.php
@@ -8,6 +8,7 @@
use Laminas\View\Exception;
use Laminas\View\Helper\Asset;
use Laminas\View\Helper\Service\AssetFactory;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
class AssetFactoryTest extends TestCase
@@ -80,7 +81,7 @@ public function testThatAnExceptionWillBeThrownWhenTheResourceMapIsSetToANonArra
/**
* @return array}>
*/
- public function validConfigProvider(): array
+ public static function validConfigProvider(): array
{
return [
'No View Helper Configuration' => [
@@ -122,10 +123,8 @@ public function validConfigProvider(): array
];
}
- /**
- * @dataProvider validConfigProvider
- * @param array $config
- */
+ /** @param array $config */
+ #[DataProvider('validConfigProvider')]
public function testThatAnExceptionWillNotBeThrownWhenGivenUnsetOrEmptyArrayConfiguration(array $config): void
{
$container = $this->getServices($config);
diff --git a/test/Helper/Service/BasePathFactoryTest.php b/test/Helper/Service/BasePathFactoryTest.php
index 708137079..b93e3b3e5 100644
--- a/test/Helper/Service/BasePathFactoryTest.php
+++ b/test/Helper/Service/BasePathFactoryTest.php
@@ -8,6 +8,7 @@
use Laminas\View\Helper\BasePath;
use Laminas\View\Helper\Service\BasePathFactory;
use Laminas\View\HelperPluginManager;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
class BasePathFactoryTest extends TestCase
@@ -21,7 +22,7 @@ protected function setUp(): void
}
/** @return array */
- public function configDataProvider(): array
+ public static function configDataProvider(): array
{
return [
'Empty Config' => [[]],
@@ -31,7 +32,7 @@ public function configDataProvider(): array
];
}
- /** @dataProvider configDataProvider */
+ #[DataProvider('configDataProvider')]
public function testFactoryWithVariousConfigurationSetups(array $config): void
{
$this->container->setService('config', $config);
diff --git a/test/Helper/Service/IdentityFactoryTest.php b/test/Helper/Service/IdentityFactoryTest.php
index 3b92991d3..400d31d5a 100644
--- a/test/Helper/Service/IdentityFactoryTest.php
+++ b/test/Helper/Service/IdentityFactoryTest.php
@@ -10,6 +10,7 @@
use Laminas\View\Helper\Identity;
use Laminas\View\Helper\Service\IdentityFactory;
use LaminasTest\View\Helper\TestAsset\AuthenticationServiceStub;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
class IdentityFactoryTest extends TestCase
@@ -29,7 +30,7 @@ public function testThatAHelperCanBeCreatedWhenThereAreNoAuthenticationServicesF
}
/** @return array */
- public function serviceNameProvider(): array
+ public static function serviceNameProvider(): array
{
// phpcs:disable WebimpressCodingStandard.Formatting.StringClassReference
return [
@@ -46,7 +47,7 @@ private function authService(?string $id): AuthenticationServiceStub
return new AuthenticationServiceStub($id);
}
- /** @dataProvider serviceNameProvider */
+ #[DataProvider('serviceNameProvider')]
public function testThatAFoundAuthenticationServiceWillBeUsed(string $serviceId): void
{
$service = $this->authService('james bond');
diff --git a/test/Helper/TestAsset/BogusIteratorTest.php b/test/Helper/TestAsset/PartialLoopBogusIterator.php
similarity index 72%
rename from test/Helper/TestAsset/BogusIteratorTest.php
rename to test/Helper/TestAsset/PartialLoopBogusIterator.php
index 061548f3b..ad1704a7c 100644
--- a/test/Helper/TestAsset/BogusIteratorTest.php
+++ b/test/Helper/TestAsset/PartialLoopBogusIterator.php
@@ -4,6 +4,6 @@
namespace LaminasTest\View\Helper\TestAsset;
-class BogusIteratorTest
+class PartialLoopBogusIterator
{
}
diff --git a/test/Helper/TestAsset/IteratorTest.php b/test/Helper/TestAsset/PartialLoopIterator.php
similarity index 89%
rename from test/Helper/TestAsset/IteratorTest.php
rename to test/Helper/TestAsset/PartialLoopIterator.php
index 2adfe5e5c..f339a68cc 100644
--- a/test/Helper/TestAsset/IteratorTest.php
+++ b/test/Helper/TestAsset/PartialLoopIterator.php
@@ -14,11 +14,12 @@
/**
* @template T
+ * @implements Iterator
*/
-class IteratorTest implements Iterator
+class PartialLoopIterator implements Iterator
{
/** @var array */
- public $items;
+ public array $items;
/** @param array $array */
public function __construct(array $array)
@@ -27,7 +28,7 @@ public function __construct(array $array)
}
/**
- * @return T|false
+ * @return T|null
*/
#[ReturnTypeWillChange]
public function current()
diff --git a/test/Helper/TestAsset/IteratorWithToArrayTest.php b/test/Helper/TestAsset/PartialLoopIteratorWithToArray.php
similarity index 84%
rename from test/Helper/TestAsset/IteratorWithToArrayTest.php
rename to test/Helper/TestAsset/PartialLoopIteratorWithToArray.php
index 7453c4629..c35fb58ab 100644
--- a/test/Helper/TestAsset/IteratorWithToArrayTest.php
+++ b/test/Helper/TestAsset/PartialLoopIteratorWithToArray.php
@@ -14,11 +14,12 @@
/**
* @template T
+ * @implements Iterator
*/
-class IteratorWithToArrayTest implements Iterator
+class PartialLoopIteratorWithToArray implements Iterator
{
/** @var array */
- public $items;
+ public array $items;
/** @param array $array */
public function __construct(array $array)
@@ -33,7 +34,7 @@ public function toArray(): array
}
/**
- * @return T|false
+ * @return T
*/
#[ReturnTypeWillChange]
public function current()
@@ -41,11 +42,7 @@ public function current()
return current($this->items);
}
- /**
- * @return array-key|null
- */
- #[ReturnTypeWillChange]
- public function key()
+ public function key(): int|string
{
return key($this->items);
}
diff --git a/test/Helper/TestAsset/RecursiveIteratorTest.php b/test/Helper/TestAsset/PartialLoopRecursiveIterator.php
similarity index 58%
rename from test/Helper/TestAsset/RecursiveIteratorTest.php
rename to test/Helper/TestAsset/PartialLoopRecursiveIterator.php
index 028ccc03e..585276a7e 100644
--- a/test/Helper/TestAsset/RecursiveIteratorTest.php
+++ b/test/Helper/TestAsset/PartialLoopRecursiveIterator.php
@@ -5,61 +5,48 @@
namespace LaminasTest\View\Helper\TestAsset;
use Iterator;
-use ReturnTypeWillChange; // phpcs:ignore
use function current;
use function key;
use function next;
use function reset;
-class RecursiveIteratorTest implements Iterator
+/** @implements Iterator */
+class PartialLoopRecursiveIterator implements Iterator
{
/** @var array */
- public $items;
+ public array $items;
public function __construct()
{
$this->items = [];
}
- /**
- * @return $this
- */
- public function addItem(Iterator $iterator): self
+ public function addItem(Iterator $iterator): void
{
$this->items[] = $iterator;
- return $this;
}
- /** @return Iterator|false */
- #[ReturnTypeWillChange]
- public function current()
+ public function current(): Iterator
{
return current($this->items);
}
- /**
- * @return array-key|null
- */
- #[ReturnTypeWillChange]
- public function key()
+ public function key(): int|string
{
return key($this->items);
}
- #[ReturnTypeWillChange]
public function next(): void
{
next($this->items);
}
- #[ReturnTypeWillChange]
public function rewind(): void
{
reset($this->items);
}
- #[ReturnTypeWillChange]
public function valid(): bool
{
return current($this->items) !== false;
diff --git a/test/Helper/TestAsset/ToArrayTest.php b/test/Helper/TestAsset/PartialLoopToArrayImplementor.php
similarity index 88%
rename from test/Helper/TestAsset/ToArrayTest.php
rename to test/Helper/TestAsset/PartialLoopToArrayImplementor.php
index 704a87394..48dbaa22b 100644
--- a/test/Helper/TestAsset/ToArrayTest.php
+++ b/test/Helper/TestAsset/PartialLoopToArrayImplementor.php
@@ -4,7 +4,7 @@
namespace LaminasTest\View\Helper\TestAsset;
-class ToArrayTest
+class PartialLoopToArrayImplementor
{
private array $data;
diff --git a/test/HelperPluginManagerCompatibilityTest.php b/test/HelperPluginManagerCompatibilityTest.php
index 85ce4f6ae..c2ae2b425 100644
--- a/test/HelperPluginManagerCompatibilityTest.php
+++ b/test/HelperPluginManagerCompatibilityTest.php
@@ -55,13 +55,15 @@ protected function getV2InvalidPluginException(): string
/**
* @psalm-return Generator
*/
- public function aliasProvider(): Generator
+ public static function aliasProvider(): Generator
{
- $pluginManager = $this->getPluginManager();
+ $pluginManager = self::getPluginManager();
$r = new ReflectionProperty($pluginManager, 'aliases');
$aliases = $r->getValue($pluginManager);
+ self::assertIsArray($aliases);
foreach ($aliases as $alias => $target) {
+ self::assertIsString($target);
// Skipping conditionally since it depends on laminas-mvc
if (! class_exists(ControllerPluginManager::class) && strpos($target, '\\FlashMessenger')) {
continue;
diff --git a/test/HelperPluginManagerTest.php b/test/HelperPluginManagerTest.php
index cad1ada77..1bd19e922 100644
--- a/test/HelperPluginManagerTest.php
+++ b/test/HelperPluginManagerTest.php
@@ -9,8 +9,8 @@
use Laminas\Mvc\I18n\Translator as MvcTranslator;
use Laminas\ServiceManager\Config;
use Laminas\ServiceManager\Exception\InvalidServiceException;
+use Laminas\ServiceManager\Exception\ServiceNotFoundException;
use Laminas\ServiceManager\ServiceManager;
-use Laminas\View\Exception\InvalidHelperException;
use Laminas\View\Helper\Doctype;
use Laminas\View\Helper\HeadTitle;
use Laminas\View\Helper\HelperInterface;
@@ -20,8 +20,6 @@
use Laminas\View\Renderer\PhpRenderer;
use PHPUnit\Framework\TestCase;
-use function method_exists;
-
class HelperPluginManagerTest extends TestCase
{
private HelperPluginManager $helpers;
@@ -57,25 +55,21 @@ public function testNoRendererInjectedInHelperWhenRendererIsNotPresent(): void
$this->assertNull($helper->getView());
}
- public function testRegisteringInvalidHelperRaisesException(): void
+ public function testRegisteringInvalidHelperRaisesInvalidServiceException(): void
{
$helpers = new HelperPluginManager(new ServiceManager(), [
'factories' => [
'test' => fn() => $this,
],
]);
- $this->expectException($this->getServiceNotFoundException($helpers));
+ $this->expectException(InvalidServiceException::class);
$helpers->get('test');
}
- public function testLoadingInvalidHelperRaisesException(): void
+ public function testRequestingAnUnregisteredHelperRaisesServiceNotFoundException(): void
{
- $helpers = new HelperPluginManager(new ServiceManager(), [
- 'invokables' => [
- 'test' => static::class,
- ],
- ]);
- $this->expectException($this->getServiceNotFoundException($helpers));
+ $helpers = new HelperPluginManager(new ServiceManager(), []);
+ $this->expectException(ServiceNotFoundException::class);
$helpers->get('test');
}
@@ -196,15 +190,4 @@ public function testDoctypeFactoryExists(): void
{
self::assertTrue($this->helpers->has(Doctype::class));
}
-
- /**
- * @psalm-return InvalidHelperException::class|InvalidServiceException::class
- */
- private function getServiceNotFoundException(HelperPluginManager $manager): string
- {
- if (method_exists($manager, 'configure')) {
- return InvalidServiceException::class;
- }
- return InvalidHelperException::class;
- }
}
diff --git a/test/Model/ViewModelTest.php b/test/Model/ViewModelTest.php
index a2a66922f..fba20da43 100644
--- a/test/Model/ViewModelTest.php
+++ b/test/Model/ViewModelTest.php
@@ -11,6 +11,7 @@
use Laminas\View\Model\ViewModel;
use Laminas\View\Variables as ViewVariables;
use LaminasTest\View\Model\TestAsset\Variable;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use stdClass;
@@ -369,7 +370,7 @@ public function testCloneWithArray(): void
* 2: null|string,
* }>
*/
- public function variableValue(): array
+ public static function variableValue(): array
{
return [
// variables default expected
@@ -392,26 +393,21 @@ public function variableValue(): array
];
}
- /**
- * @dataProvider variableValue
- * @param array|ArrayObject $variables
- * @param string|null $default
- * @param string|null $expected
- */
- public function testGetVariableSetByConstruct($variables, $default, $expected): void
- {
+ /** @param array|ArrayObject $variables */
+ #[DataProvider('variableValue')]
+ public function testGetVariableSetByConstruct(
+ iterable $variables,
+ string|null $default,
+ string|null $expected
+ ): void {
$model = new ViewModel($variables);
self::assertSame($expected, $model->getVariable('foo', $default));
}
- /**
- * @dataProvider variableValue
- * @param array|ArrayObject $variables
- * @param string|null $default
- * @param string|null $expected
- */
- public function testGetVariableSetBySetter($variables, $default, $expected): void
+ /** @param array|ArrayObject $variables */
+ #[DataProvider('variableValue')]
+ public function testGetVariableSetBySetter(iterable $variables, string|null $default, string|null $expected): void
{
$model = new ViewModel();
$model->setVariables($variables);
diff --git a/test/PhpRendererTest.php b/test/PhpRendererTest.php
index 9f0fde52c..7be4b4875 100644
--- a/test/PhpRendererTest.php
+++ b/test/PhpRendererTest.php
@@ -5,7 +5,6 @@
namespace LaminasTest\View;
use ArrayObject;
-use Exception;
use Laminas\Filter\FilterChain;
use Laminas\ServiceManager\ServiceManager;
use Laminas\View\Exception\DomainException;
@@ -23,6 +22,7 @@
use LaminasTest\View\TestAsset\Invokable;
use LaminasTest\View\TestAsset\SharedInstance;
use LaminasTest\View\TestAsset\Uninvokable;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use ReflectionObject;
use stdClass;
@@ -31,8 +31,11 @@
use function assert;
use function realpath;
use function restore_error_handler;
+use function set_error_handler;
use function str_replace;
+use const E_WARNING;
+
class PhpRendererTest extends TestCase
{
private PhpRenderer $renderer;
@@ -126,7 +129,7 @@ public function testPassingValidStringClassToSetHelperPluginManagerCreatesIt():
/**
* @psalm-return array
*/
- public function invalidPluginManagers(): array
+ public static function invalidPluginManagers(): array
{
return [
[true],
@@ -137,11 +140,8 @@ public function invalidPluginManagers(): array
];
}
- /**
- * @dataProvider invalidPluginManagers
- * @param mixed $plugins
- */
- public function testPassingInvalidArgumentToSetHelperPluginManagerRaisesException($plugins): void
+ #[DataProvider('invalidPluginManagers')]
+ public function testPassingInvalidArgumentToSetHelperPluginManagerRaisesException(mixed $plugins): void
{
$this->expectException(ExceptionInterface::class);
$this->expectExceptionMessage('must extend');
@@ -332,19 +332,16 @@ public function testRenderedViewModelIsRegisteredAsCurrentViewModel(): void
public function testRendererRaisesExceptionInCaseOfExceptionInView(): void
{
$resolver = new TemplateMapResolver([
- 'exception' => __DIR__ . '../../Mvc/View/_files/exception.phtml',
+ 'exception' => __DIR__ . '/_templates/exception.phtml',
]);
$this->renderer->setResolver($resolver);
$model = new ViewModel();
$model->setTemplate('exception');
- try {
- $this->renderer->render($model);
- $this->fail('Exception from renderer should propagate');
- } catch (Throwable $e) {
- $this->assertInstanceOf(Exception::class, $e);
- }
+ $this->expectException(DomainException::class);
+ $this->expectExceptionMessage('I was thrown in the view');
+ $this->renderer->render($model);
}
public function testRendererRaisesExceptionIfResolverCannotResolveTemplate(): void
@@ -359,7 +356,7 @@ public function testRendererRaisesExceptionIfResolverCannotResolveTemplate(): vo
* @return string[][]
* @psalm-return array{0: array{0: '/does/not/exists'}, 1: array{0: '.'}}
*/
- public function invalidTemplateFiles(): array
+ public static function invalidTemplateFiles(): array
{
return [
['/does/not/exists'],
@@ -367,9 +364,7 @@ public function invalidTemplateFiles(): array
];
}
- /**
- * @dataProvider invalidTemplateFiles
- */
+ #[DataProvider('invalidTemplateFiles')]
public function testRendererRaisesExceptionIfResolvedTemplateIsInvalid(string $template): void
{
$resolver = new TemplateMapResolver([
diff --git a/test/Renderer/JsonRendererTest.php b/test/Renderer/JsonRendererTest.php
index db55521d8..d360e5ab1 100644
--- a/test/Renderer/JsonRendererTest.php
+++ b/test/Renderer/JsonRendererTest.php
@@ -9,6 +9,7 @@
use Laminas\View\Model\JsonModel;
use Laminas\View\Model\ViewModel;
use Laminas\View\Renderer\JsonRenderer;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use stdClass;
@@ -101,7 +102,7 @@ public function testCanMergeChildModelsWithoutCaptureToValues(): void
/**
* @psalm-return array
*/
- public function getNonObjectModels(): array
+ public static function getNonObjectModels(): array
{
return [
['string'],
@@ -112,11 +113,8 @@ public function getNonObjectModels(): array
];
}
- /**
- * @dataProvider getNonObjectModels
- * @param mixed $model
- */
- public function testRendersNonObjectModelAsJson($model): void
+ #[DataProvider('getNonObjectModels')]
+ public function testRendersNonObjectModelAsJson(mixed $model): void
{
$expected = json_encode($model, JSON_THROW_ON_ERROR);
/** @psalm-suppress MixedArgument $test */
@@ -183,11 +181,8 @@ public function testRendersViewModelsWithoutChildrenWithJsonpCallback(): void
$this->assertEquals($expected, $test);
}
- /**
- * @dataProvider getNonObjectModels
- * @param mixed $model
- */
- public function testRendersNonObjectModelAsJsonWithJsonpCallback($model): void
+ #[DataProvider('getNonObjectModels')]
+ public function testRendersNonObjectModelAsJsonWithJsonpCallback(mixed $model): void
{
$expected = 'callback(' . json_encode($model, JSON_THROW_ON_ERROR) . ');';
$this->renderer->setJsonpCallback('callback');
diff --git a/test/Resolver/PrefixPathStackResolverTest.php b/test/Resolver/PrefixPathStackResolverTest.php
index ad6fbfda3..2ceff477a 100644
--- a/test/Resolver/PrefixPathStackResolverTest.php
+++ b/test/Resolver/PrefixPathStackResolverTest.php
@@ -5,16 +5,13 @@
namespace LaminasTest\View\Resolver;
use Laminas\View\Resolver\PrefixPathStackResolver;
-use Laminas\View\Resolver\ResolverInterface;
+use Laminas\View\Resolver\TemplateMapResolver;
+use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\TestCase;
use function realpath;
-/**
- * Tests for {@see \Laminas\View\Resolver\PrefixPathStackResolver}
- *
- * @covers \Laminas\View\Resolver\PrefixPathStackResolver
- */
+#[CoversClass(PrefixPathStackResolver::class)]
class PrefixPathStackResolverTest extends TestCase
{
private string $basePath;
@@ -63,21 +60,11 @@ public function testResolveWithCongruentPrefix(): void
public function testSetCustomPathStackResolver(): void
{
- $mockResolver = $this->createMock(ResolverInterface::class);
- $mockResolver->expects(self::exactly(3))
- ->method('resolve')
- ->withConsecutive(
- ['/bar', null],
- ['/baz', null],
- ['/tab', null]
- )->willReturnOnConsecutiveCalls(
- '1111',
- '2222',
- false
- );
-
$resolver = new PrefixPathStackResolver([
- 'foo' => $mockResolver,
+ 'foo' => new TemplateMapResolver([
+ '/bar' => '1111',
+ '/baz' => '2222',
+ ]),
]);
$this->assertSame('1111', $resolver->resolve('foo/bar'));
diff --git a/test/Resolver/RelativeFallbackResolverTest.php b/test/Resolver/RelativeFallbackResolverTest.php
index 22ecabcc4..6fd8e15f7 100644
--- a/test/Resolver/RelativeFallbackResolverTest.php
+++ b/test/Resolver/RelativeFallbackResolverTest.php
@@ -12,14 +12,13 @@
use Laminas\View\Resolver\ResolverInterface;
use Laminas\View\Resolver\TemplateMapResolver;
use Laminas\View\Resolver\TemplatePathStack;
+use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\TestCase;
use stdClass;
use function realpath;
-/**
- * @covers \Laminas\View\Resolver\RelativeFallbackResolver
- */
+#[CoversClass(RelativeFallbackResolver::class)]
class RelativeFallbackResolverTest extends TestCase
{
public function testReturnsResourceFromTheSameNameSpaceWithMapResolver(): void
diff --git a/test/Resolver/TemplatePathStackTest.php b/test/Resolver/TemplatePathStackTest.php
index 77928ebc4..636366e26 100644
--- a/test/Resolver/TemplatePathStackTest.php
+++ b/test/Resolver/TemplatePathStackTest.php
@@ -7,6 +7,7 @@
use ArrayObject;
use Laminas\View\Exception;
use Laminas\View\Resolver\TemplatePathStack;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use stdClass;
@@ -176,7 +177,7 @@ public function testReturnsPathWithStreamProtocolWhenStreamWrapperEnabled(): voi
/**
* @psalm-return array
*/
- public function invalidOptions(): array
+ public static function invalidOptions(): array
{
return [
[true],
@@ -187,11 +188,8 @@ public function invalidOptions(): array
];
}
- /**
- * @param mixed $options
- * @dataProvider invalidOptions
- */
- public function testSettingOptionsWithInvalidArgumentRaisesException($options): void
+ #[DataProvider('invalidOptions')]
+ public function testSettingOptionsWithInvalidArgumentRaisesException(mixed $options): void
{
$this->expectException(Exception\ExceptionInterface::class);
/** @psalm-suppress MixedArgument */
@@ -201,7 +199,7 @@ public function testSettingOptionsWithInvalidArgumentRaisesException($options):
/**
* @return array|ArrayObject}>
*/
- public function validOptions(): array
+ public static function validOptions(): array
{
$options = [
'lfi_protection' => false,
@@ -216,8 +214,8 @@ public function validOptions(): array
/**
* @param array|ArrayObject $options
- * @dataProvider validOptions
*/
+ #[DataProvider('validOptions')]
public function testAllowsSettingOptions($options): void
{
$options['script_paths'] = $this->paths;
@@ -235,8 +233,8 @@ public function testAllowsSettingOptions($options): void
/**
* @param array|ArrayObject $options
- * @dataProvider validOptions
*/
+ #[DataProvider('validOptions')]
public function testAllowsPassingOptionsToConstructor($options): void
{
$options['script_paths'] = $this->paths;
diff --git a/test/Strategy/JsonStrategyTest.php b/test/Strategy/JsonStrategyTest.php
index 214dbfbfd..0daa7efb3 100644
--- a/test/Strategy/JsonStrategyTest.php
+++ b/test/Strategy/JsonStrategyTest.php
@@ -14,6 +14,7 @@
use Laminas\View\Renderer\JsonRenderer;
use Laminas\View\Strategy\JsonStrategy;
use Laminas\View\ViewEvent;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use function iterator_to_array;
@@ -308,7 +309,7 @@ public function testCharsetIsMutable(): void
* @return string[][]
* @psalm-return array{utf-16: array{0: 'utf-16'}, utf-32: array{0: 'utf-32'}}
*/
- public function multibyteCharsets(): array
+ public static function multibyteCharsets(): array
{
return [
'utf-16' => ['utf-16'],
@@ -316,11 +317,8 @@ public function multibyteCharsets(): array
];
}
- /**
- * @dataProvider multibyteCharsets
- * @param string $charset
- */
- public function testContentTransferEncodingHeaderSetToBinaryForSpecificMultibyteCharsets($charset): void
+ #[DataProvider('multibyteCharsets')]
+ public function testContentTransferEncodingHeaderSetToBinaryForSpecificMultibyteCharsets(string $charset): void
{
$this->strategy->setCharset($charset);
diff --git a/test/_templates/exception.phtml b/test/_templates/exception.phtml
new file mode 100644
index 000000000..ce368bb24
--- /dev/null
+++ b/test/_templates/exception.phtml
@@ -0,0 +1,3 @@
+