diff --git a/.gitignore b/.gitignore
index 68c0e32f..51c900fa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,9 @@
/.phpunit.result.cache
+/.phpunit.cache
/clover.xml
/coveralls-upload.json
/docs/html/
/laminas-mkdoc-theme.tgz
/laminas-mkdoc-theme/
/phpunit.xml
-/vendor/
\ No newline at end of file
+/vendor/
diff --git a/composer.json b/composer.json
index 33994726..4a551f84 100644
--- a/composer.json
+++ b/composer.json
@@ -16,9 +16,9 @@
"doctrine/annotations": "^2.0.0",
"laminas/laminas-coding-standard": "^2.3.0",
"laminas/laminas-stdlib": "^3.6.1",
- "phpunit/phpunit": "^9.5.26",
- "psalm/plugin-phpunit": "^0.18.0",
- "vimeo/psalm": "^5.1.0"
+ "phpunit/phpunit": "^10.0.9",
+ "psalm/plugin-phpunit": "^0.18.4",
+ "vimeo/psalm": "^5.7.1"
},
"suggest": {
"doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features",
diff --git a/composer.lock b/composer.lock
index 4c1b09dd..b9ae1a12 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": "1a7b11831559c1e61f6e0c8b3b047082",
+ "content-hash": "8dc81efa9c15e6e8186ec0ac51c9b2da",
"packages": [],
"packages-dev": [
{
@@ -652,76 +652,6 @@
},
"time": "2022-12-19T18:17:20+00:00"
},
- {
- "name": "doctrine/instantiator",
- "version": "1.4.1",
- "source": {
- "type": "git",
- "url": "https://github.com/doctrine/instantiator.git",
- "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc",
- "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc",
- "shasum": ""
- },
- "require": {
- "php": "^7.1 || ^8.0"
- },
- "require-dev": {
- "doctrine/coding-standard": "^9",
- "ext-pdo": "*",
- "ext-phar": "*",
- "phpbench/phpbench": "^0.16 || ^1",
- "phpstan/phpstan": "^1.4",
- "phpstan/phpstan-phpunit": "^1",
- "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
- "vimeo/psalm": "^4.22"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Marco Pivetta",
- "email": "ocramius@gmail.com",
- "homepage": "https://ocramius.github.io/"
- }
- ],
- "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
- "homepage": "https://www.doctrine-project.org/projects/instantiator.html",
- "keywords": [
- "constructor",
- "instantiate"
- ],
- "support": {
- "issues": "https://github.com/doctrine/instantiator/issues",
- "source": "https://github.com/doctrine/instantiator/tree/1.4.1"
- },
- "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-03-03T08:28:38+00:00"
- },
{
"name": "doctrine/lexer",
"version": "3.0.0",
@@ -902,16 +832,16 @@
},
{
"name": "fidry/cpu-core-counter",
- "version": "0.4.0",
+ "version": "0.5.1",
"source": {
"type": "git",
"url": "https://github.com/theofidry/cpu-core-counter.git",
- "reference": "666cb04a02f2801f3b19955fc23c824f9018bf64"
+ "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/666cb04a02f2801f3b19955fc23c824f9018bf64",
- "reference": "666cb04a02f2801f3b19955fc23c824f9018bf64",
+ "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/b58e5a3933e541dc286cc91fc4f3898bbc6f1623",
+ "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623",
"shasum": ""
},
"require": {
@@ -951,7 +881,7 @@
],
"support": {
"issues": "https://github.com/theofidry/cpu-core-counter/issues",
- "source": "https://github.com/theofidry/cpu-core-counter/tree/0.4.0"
+ "source": "https://github.com/theofidry/cpu-core-counter/tree/0.5.1"
},
"funding": [
{
@@ -959,7 +889,7 @@
"type": "github"
}
],
- "time": "2022-12-10T21:26:31+00:00"
+ "time": "2022-12-24T12:35:10+00:00"
},
{
"name": "laminas/laminas-coding-standard",
@@ -1188,16 +1118,16 @@
},
{
"name": "nikic/php-parser",
- "version": "v4.15.2",
+ "version": "v4.15.3",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc"
+ "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc",
- "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/570e980a201d8ed0236b0a62ddf2c9cbb2034039",
+ "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039",
"shasum": ""
},
"require": {
@@ -1238,62 +1168,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
- "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2"
- },
- "time": "2022-11-12T15:38:23+00:00"
- },
- {
- "name": "openlss/lib-array2xml",
- "version": "1.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/nullivex/lib-array2xml.git",
- "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90",
- "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.2"
- },
- "type": "library",
- "autoload": {
- "psr-0": {
- "LSS": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "Bryan Tong",
- "email": "bryan@nullivex.com",
- "homepage": "https://www.nullivex.com"
- },
- {
- "name": "Tony Butler",
- "email": "spudz76@gmail.com",
- "homepage": "https://www.nullivex.com"
- }
- ],
- "description": "Array2XML conversion library credit to lalit.org",
- "homepage": "https://www.nullivex.com",
- "keywords": [
- "array",
- "array conversion",
- "xml",
- "xml conversion"
- ],
- "support": {
- "issues": "https://github.com/nullivex/lib-array2xml/issues",
- "source": "https://github.com/nullivex/lib-array2xml/tree/master"
+ "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.3"
},
- "time": "2019-03-29T20:06:56+00:00"
+ "time": "2023-01-16T22:05:37+00:00"
},
{
"name": "phar-io/manifest",
@@ -1617,16 +1494,16 @@
},
{
"name": "phpunit/php-code-coverage",
- "version": "9.2.21",
+ "version": "10.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "3f893e19712bb0c8bc86665d1562e9fd509c4ef0"
+ "reference": "bf4fbc9c13af7da12b3ea807574fb460f255daba"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/3f893e19712bb0c8bc86665d1562e9fd509c4ef0",
- "reference": "3f893e19712bb0c8bc86665d1562e9fd509c4ef0",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/bf4fbc9c13af7da12b3ea807574fb460f255daba",
+ "reference": "bf4fbc9c13af7da12b3ea807574fb460f255daba",
"shasum": ""
},
"require": {
@@ -1634,18 +1511,18 @@
"ext-libxml": "*",
"ext-xmlwriter": "*",
"nikic/php-parser": "^4.14",
- "php": ">=7.3",
- "phpunit/php-file-iterator": "^3.0.3",
- "phpunit/php-text-template": "^2.0.2",
- "sebastian/code-unit-reverse-lookup": "^2.0.2",
- "sebastian/complexity": "^2.0",
- "sebastian/environment": "^5.1.2",
- "sebastian/lines-of-code": "^1.0.3",
- "sebastian/version": "^3.0.1",
+ "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.0"
},
"suggest": {
"ext-pcov": "*",
@@ -1654,7 +1531,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "9.2-dev"
+ "dev-main": "10.0-dev"
}
},
"autoload": {
@@ -1682,7 +1559,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.21"
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.0.0"
},
"funding": [
{
@@ -1690,32 +1567,32 @@
"type": "github"
}
],
- "time": "2022-12-14T13:26:54+00:00"
+ "time": "2023-02-03T07:14:34+00:00"
},
{
"name": "phpunit/php-file-iterator",
- "version": "3.0.6",
+ "version": "4.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf"
+ "reference": "fd9329ab3368f59fe1fe808a189c51086bd4b6bd"
},
"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/fd9329ab3368f59fe1fe808a189c51086bd4b6bd",
+ "reference": "fd9329ab3368f59fe1fe808a189c51086bd4b6bd",
"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": {
@@ -1742,7 +1619,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
- "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6"
+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.0.1"
},
"funding": [
{
@@ -1750,28 +1627,28 @@
"type": "github"
}
],
- "time": "2021-12-02T12:48:52+00:00"
+ "time": "2023-02-10T16:53:14+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": "*"
@@ -1779,7 +1656,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1-dev"
+ "dev-main": "4.0-dev"
}
},
"autoload": {
@@ -1805,7 +1682,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": [
{
@@ -1813,32 +1690,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": {
@@ -1864,7 +1741,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": [
{
@@ -1872,32 +1749,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": {
@@ -1923,7 +1800,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": [
{
@@ -1931,24 +1808,23 @@
"type": "github"
}
],
- "time": "2020-10-26T13:16:10+00:00"
+ "time": "2023-02-03T06:57:52+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "9.5.27",
+ "version": "10.0.9",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38"
+ "reference": "b027e0e266b2e51bb74d5050ff5b1304c40ea209"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a2bc7ffdca99f92d959b3f2270529334030bba38",
- "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b027e0e266b2e51bb74d5050ff5b1304c40ea209",
+ "reference": "b027e0e266b2e51bb74d5050ff5b1304c40ea209",
"shasum": ""
},
"require": {
- "doctrine/instantiator": "^1.3.1",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
@@ -1958,27 +1834,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.0",
+ "phpunit/php-file-iterator": "^4.0",
+ "phpunit/php-invoker": "^4.0",
+ "phpunit/php-text-template": "^3.0",
+ "phpunit/php-timer": "^6.0",
+ "sebastian/cli-parser": "^2.0",
+ "sebastian/code-unit": "^2.0",
+ "sebastian/comparator": "^5.0",
+ "sebastian/diff": "^5.0",
+ "sebastian/environment": "^6.0",
+ "sebastian/exporter": "^5.0",
+ "sebastian/global-state": "^6.0",
+ "sebastian/object-enumerator": "^5.0",
+ "sebastian/recursion-context": "^5.0",
+ "sebastian/type": "^4.0",
+ "sebastian/version": "^4.0"
},
"suggest": {
- "ext-soap": "*",
- "ext-xdebug": "*"
+ "ext-soap": "*"
},
"bin": [
"phpunit"
@@ -1986,7 +1861,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "9.5-dev"
+ "dev-main": "10.0-dev"
}
},
"autoload": {
@@ -2017,7 +1892,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.27"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/10.0.9"
},
"funding": [
{
@@ -2033,7 +1908,7 @@
"type": "tidelift"
}
],
- "time": "2022-12-09T07:31:23+00:00"
+ "time": "2023-02-19T07:11:46+00:00"
},
{
"name": "psalm/plugin-phpunit",
@@ -2249,28 +2124,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": {
@@ -2293,7 +2168,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": [
{
@@ -2301,32 +2176,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": {
@@ -2349,7 +2224,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": [
{
@@ -2357,32 +2232,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": {
@@ -2404,7 +2279,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": [
{
@@ -2412,34 +2287,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": {
@@ -2478,7 +2355,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": [
{
@@ -2486,33 +2363,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": {
@@ -2535,7 +2412,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": [
{
@@ -2543,33 +2420,33 @@
"type": "github"
}
],
- "time": "2020-10-26T15:52:27+00:00"
+ "time": "2023-02-03T06:59:47+00:00"
},
{
"name": "sebastian/diff",
- "version": "4.0.4",
+ "version": "5.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d"
+ "reference": "70dd1b20bc198da394ad542e988381b44e64e39f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d",
- "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/70dd1b20bc198da394ad542e988381b44e64e39f",
+ "reference": "70dd1b20bc198da394ad542e988381b44e64e39f",
"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": {
@@ -2601,7 +2478,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/diff/issues",
- "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4"
+ "source": "https://github.com/sebastianbergmann/diff/tree/5.0.0"
},
"funding": [
{
@@ -2609,27 +2486,27 @@
"type": "github"
}
],
- "time": "2020-10-26T13:10:38+00:00"
+ "time": "2023-02-03T07:00:31+00:00"
},
{
"name": "sebastian/environment",
- "version": "5.1.4",
+ "version": "6.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7"
+ "reference": "b6f3694c6386c7959915a0037652e0c40f6f69cc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7",
- "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/b6f3694c6386c7959915a0037652e0c40f6f69cc",
+ "reference": "b6f3694c6386c7959915a0037652e0c40f6f69cc",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"suggest": {
"ext-posix": "*"
@@ -2637,7 +2514,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.1-dev"
+ "dev-main": "6.0-dev"
}
},
"autoload": {
@@ -2656,7 +2533,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",
@@ -2664,7 +2541,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
- "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4"
+ "source": "https://github.com/sebastianbergmann/environment/tree/6.0.0"
},
"funding": [
{
@@ -2672,34 +2549,34 @@
"type": "github"
}
],
- "time": "2022-04-03T09:37:03+00:00"
+ "time": "2023-02-03T07:03:04+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": {
@@ -2741,7 +2618,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": [
{
@@ -2749,38 +2626,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": {
@@ -2805,7 +2679,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": [
{
@@ -2813,33 +2687,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": {
@@ -2862,7 +2736,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": [
{
@@ -2870,34 +2744,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": {
@@ -2919,7 +2793,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": [
{
@@ -2927,32 +2801,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": {
@@ -2974,7 +2848,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": [
{
@@ -2982,32 +2856,32 @@
"type": "github"
}
],
- "time": "2020-10-26T13:14:26+00:00"
+ "time": "2023-02-03T07:06:18+00:00"
},
{
"name": "sebastian/recursion-context",
- "version": "4.0.4",
+ "version": "5.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172"
+ "reference": "05909fb5bc7df4c52992396d0116aed689f93712"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172",
- "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712",
+ "reference": "05909fb5bc7df4c52992396d0116aed689f93712",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-main": "5.0-dev"
}
},
"autoload": {
@@ -3034,10 +2908,10 @@
}
],
"description": "Provides functionality to recursively process PHP variables",
- "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
+ "homepage": "https://github.com/sebastianbergmann/recursion-context",
"support": {
"issues": "https://github.com/sebastianbergmann/recursion-context/issues",
- "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4"
+ "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0"
},
"funding": [
{
@@ -3045,87 +2919,32 @@
"type": "github"
}
],
- "time": "2020-10-26T13:17:30+00:00"
- },
- {
- "name": "sebastian/resource-operations",
- "version": "3.0.3",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/resource-operations.git",
- "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
- "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Provides a list of PHP built-in functions that operate on resources",
- "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
- "support": {
- "issues": "https://github.com/sebastianbergmann/resource-operations/issues",
- "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2020-09-28T06:45:17+00:00"
+ "time": "2023-02-03T07:05:40+00:00"
},
{
"name": "sebastian/type",
- "version": "3.2.0",
+ "version": "4.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
- "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e"
+ "reference": "462699a16464c3944eefc02ebdd77882bd3925bf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e",
- "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf",
+ "reference": "462699a16464c3944eefc02ebdd77882bd3925bf",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.5"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-main": "4.0-dev"
}
},
"autoload": {
@@ -3148,7 +2967,7 @@
"homepage": "https://github.com/sebastianbergmann/type",
"support": {
"issues": "https://github.com/sebastianbergmann/type/issues",
- "source": "https://github.com/sebastianbergmann/type/tree/3.2.0"
+ "source": "https://github.com/sebastianbergmann/type/tree/4.0.0"
},
"funding": [
{
@@ -3156,29 +2975,29 @@
"type": "github"
}
],
- "time": "2022-09-12T14:47:03+00:00"
+ "time": "2023-02-03T07:10:45+00:00"
},
{
"name": "sebastian/version",
- "version": "3.0.2",
+ "version": "4.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/version.git",
- "reference": "c6c1022351a901512170118436c764e473f6de8c"
+ "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c",
- "reference": "c6c1022351a901512170118436c764e473f6de8c",
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17",
+ "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.0-dev"
+ "dev-main": "4.0-dev"
}
},
"autoload": {
@@ -3201,7 +3020,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": [
{
@@ -3209,7 +3028,7 @@
"type": "github"
}
],
- "time": "2020-09-28T06:39:44+00:00"
+ "time": "2023-02-07T11:34:05+00:00"
},
{
"name": "slevomat/coding-standard",
@@ -3272,6 +3091,69 @@
],
"time": "2022-05-25T10:58:12+00:00"
},
+ {
+ "name": "spatie/array-to-xml",
+ "version": "3.1.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/spatie/array-to-xml.git",
+ "reference": "13f76acef5362d15c71ae1ac6350cc3df5e25e43"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/13f76acef5362d15c71ae1ac6350cc3df5e25e43",
+ "reference": "13f76acef5362d15c71ae1ac6350cc3df5e25e43",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "php": "^8.0"
+ },
+ "require-dev": {
+ "mockery/mockery": "^1.2",
+ "pestphp/pest": "^1.21",
+ "spatie/pest-plugin-snapshots": "^1.1"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Spatie\\ArrayToXml\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Freek Van der Herten",
+ "email": "freek@spatie.be",
+ "homepage": "https://freek.dev",
+ "role": "Developer"
+ }
+ ],
+ "description": "Convert an array to xml",
+ "homepage": "https://github.com/spatie/array-to-xml",
+ "keywords": [
+ "array",
+ "convert",
+ "xml"
+ ],
+ "support": {
+ "source": "https://github.com/spatie/array-to-xml/tree/3.1.5"
+ },
+ "funding": [
+ {
+ "url": "https://spatie.be/open-source/support-us",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/spatie",
+ "type": "github"
+ }
+ ],
+ "time": "2022-12-24T13:43:51+00:00"
+ },
{
"name": "squizlabs/php_codesniffer",
"version": "3.7.1",
@@ -3330,16 +3212,16 @@
},
{
"name": "symfony/console",
- "version": "v6.2.1",
+ "version": "v6.2.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "58f6cef5dc5f641b7bbdbf8b32b44cc926c35f3f"
+ "reference": "3e294254f2191762c1d137aed4b94e966965e985"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/58f6cef5dc5f641b7bbdbf8b32b44cc926c35f3f",
- "reference": "58f6cef5dc5f641b7bbdbf8b32b44cc926c35f3f",
+ "url": "https://api.github.com/repos/symfony/console/zipball/3e294254f2191762c1d137aed4b94e966965e985",
+ "reference": "3e294254f2191762c1d137aed4b94e966965e985",
"shasum": ""
},
"require": {
@@ -3406,7 +3288,7 @@
"terminal"
],
"support": {
- "source": "https://github.com/symfony/console/tree/v6.2.1"
+ "source": "https://github.com/symfony/console/tree/v6.2.5"
},
"funding": [
{
@@ -3422,7 +3304,7 @@
"type": "tidelift"
}
],
- "time": "2022-12-01T13:44:20+00:00"
+ "time": "2023-01-01T08:38:09+00:00"
},
{
"name": "symfony/deprecation-contracts",
@@ -3493,16 +3375,16 @@
},
{
"name": "symfony/filesystem",
- "version": "v6.2.0",
+ "version": "v6.2.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "50b2523c874605cf3d4acf7a9e2b30b6a440a016"
+ "reference": "e59e8a4006afd7f5654786a83b4fcb8da98f4593"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/50b2523c874605cf3d4acf7a9e2b30b6a440a016",
- "reference": "50b2523c874605cf3d4acf7a9e2b30b6a440a016",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/e59e8a4006afd7f5654786a83b4fcb8da98f4593",
+ "reference": "e59e8a4006afd7f5654786a83b4fcb8da98f4593",
"shasum": ""
},
"require": {
@@ -3536,7 +3418,7 @@
"description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/filesystem/tree/v6.2.0"
+ "source": "https://github.com/symfony/filesystem/tree/v6.2.5"
},
"funding": [
{
@@ -3552,7 +3434,7 @@
"type": "tidelift"
}
],
- "time": "2022-11-20T13:01:27+00:00"
+ "time": "2023-01-20T17:45:48+00:00"
},
{
"name": "symfony/polyfill-ctype",
@@ -3884,101 +3766,18 @@
],
"time": "2022-11-03T14:55:06+00:00"
},
- {
- "name": "symfony/polyfill-php80",
- "version": "v1.27.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
- "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.27-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "files": [
- "bootstrap.php"
- ],
- "psr-4": {
- "Symfony\\Polyfill\\Php80\\": ""
- },
- "classmap": [
- "Resources/stubs"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Ion Bazan",
- "email": "ion.bazan@gmail.com"
- },
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "polyfill",
- "portable",
- "shim"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2022-11-03T14:55:06+00:00"
- },
{
"name": "symfony/service-contracts",
- "version": "v3.1.1",
+ "version": "v3.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
- "reference": "925e713fe8fcacf6bc05e936edd8dd5441a21239"
+ "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/service-contracts/zipball/925e713fe8fcacf6bc05e936edd8dd5441a21239",
- "reference": "925e713fe8fcacf6bc05e936edd8dd5441a21239",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/aac98028c69df04ee77eb69b96b86ee51fbf4b75",
+ "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75",
"shasum": ""
},
"require": {
@@ -3994,7 +3793,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "3.1-dev"
+ "dev-main": "3.3-dev"
},
"thanks": {
"name": "symfony/contracts",
@@ -4034,7 +3833,7 @@
"standards"
],
"support": {
- "source": "https://github.com/symfony/service-contracts/tree/v3.1.1"
+ "source": "https://github.com/symfony/service-contracts/tree/v3.2.0"
},
"funding": [
{
@@ -4050,20 +3849,20 @@
"type": "tidelift"
}
],
- "time": "2022-05-30T19:18:58+00:00"
+ "time": "2022-11-25T10:21:52+00:00"
},
{
"name": "symfony/string",
- "version": "v6.2.0",
+ "version": "v6.2.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
- "reference": "145702685e0d12f81d755c71127bfff7582fdd36"
+ "reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/string/zipball/145702685e0d12f81d755c71127bfff7582fdd36",
- "reference": "145702685e0d12f81d755c71127bfff7582fdd36",
+ "url": "https://api.github.com/repos/symfony/string/zipball/b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0",
+ "reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0",
"shasum": ""
},
"require": {
@@ -4120,7 +3919,7 @@
"utf8"
],
"support": {
- "source": "https://github.com/symfony/string/tree/v6.2.0"
+ "source": "https://github.com/symfony/string/tree/v6.2.5"
},
"funding": [
{
@@ -4136,7 +3935,7 @@
"type": "tidelift"
}
],
- "time": "2022-11-30T17:13:47+00:00"
+ "time": "2023-01-01T08:38:09+00:00"
},
{
"name": "theseer/tokenizer",
@@ -4190,16 +3989,16 @@
},
{
"name": "vimeo/psalm",
- "version": "5.2.0",
+ "version": "5.7.1",
"source": {
"type": "git",
"url": "https://github.com/vimeo/psalm.git",
- "reference": "fb685a16df3050d4c18d8a4100fe83abe6458cba"
+ "reference": "8e0fd880141f236847ab49a06f94f788d41a4292"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/vimeo/psalm/zipball/fb685a16df3050d4c18d8a4100fe83abe6458cba",
- "reference": "fb685a16df3050d4c18d8a4100fe83abe6458cba",
+ "url": "https://api.github.com/repos/vimeo/psalm/zipball/8e0fd880141f236847ab49a06f94f788d41a4292",
+ "reference": "8e0fd880141f236847ab49a06f94f788d41a4292",
"shasum": ""
},
"require": {
@@ -4218,28 +4017,27 @@
"ext-tokenizer": "*",
"felixfbecker/advanced-json-rpc": "^3.1",
"felixfbecker/language-server-protocol": "^1.5.2",
- "fidry/cpu-core-counter": "^0.4.0",
+ "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1",
"netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0",
"nikic/php-parser": "^4.13",
- "openlss/lib-array2xml": "^1.0",
"php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0",
- "sebastian/diff": "^4.0",
+ "sebastian/diff": "^4.0 || ^5.0",
+ "spatie/array-to-xml": "^2.17.0 || ^3.0",
"symfony/console": "^4.1.6 || ^5.0 || ^6.0",
- "symfony/filesystem": "^5.4 || ^6.0",
- "symfony/polyfill-php80": "^1.25"
+ "symfony/filesystem": "^5.4 || ^6.0"
},
"provide": {
"psalm/psalm": "self.version"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4",
- "brianium/paratest": "^6.0",
+ "brianium/paratest": "^6.9",
"ext-curl": "*",
"mockery/mockery": "^1.5",
"nunomaduro/mock-final-classes": "^1.1",
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpstan/phpdoc-parser": "^1.6",
- "phpunit/phpunit": "^9.5",
+ "phpunit/phpunit": "^9.6",
"psalm/plugin-mockery": "^1.1",
"psalm/plugin-phpunit": "^0.18",
"slevomat/coding-standard": "^8.4",
@@ -4285,13 +4083,14 @@
"keywords": [
"code",
"inspection",
- "php"
+ "php",
+ "static analysis"
],
"support": {
"issues": "https://github.com/vimeo/psalm/issues",
- "source": "https://github.com/vimeo/psalm/tree/5.2.0"
+ "source": "https://github.com/vimeo/psalm/tree/5.7.1"
},
- "time": "2022-12-12T08:18:56+00:00"
+ "time": "2023-02-20T00:48:41+00:00"
},
{
"name": "webimpress/coding-standard",
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index f222c747..ef71b018 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -2,23 +2,21 @@
+ colors="true"
+>
./test
-
./src
-
-
+ include_path or via Composer. -->
+
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
index b1746d30..e7d42e5b 100644
--- a/psalm-baseline.xml
+++ b/psalm-baseline.xml
@@ -1,62 +1,77 @@
-
+
-
+
$directive
-
+
$value
-
+
self
-
+
self::{$method}($value)
+
+ encoding
+ getValue
+ ticks
+
-
- ! is_array($options) && ! $options instanceof Traversable
+
+
-
+
$optionName
$optionValue
-
+
$optionName
-
+
(bool) $isSourceDirty
(string) $indentation
-
+
+ AbstractMemberGenerator
+ AbstractMemberGenerator
+ AbstractMemberGenerator
+ AbstractMemberGenerator
+
+
(string) $name
-
+
+ setContent
+
+
(string) $content
-
+
$method
$name
-
+
DocBlockGenerator::fromArray($value)
-
+
+ empty($name) || ! is_string($name)
is_string($name)
is_string($name)
-
+
string
-
- $array['name']
+
+
$value
$value
$value
@@ -76,250 +91,281 @@
array_values($property)
array_values($property)
-
+
$name
-
+
$value
-
+
static::IMPLEMENTS_KEYWORD
static::OBJECT_TYPE
-
- $this->traitUsageGenerator->getUseAlias($fqnClassName)
+
+ traitUsageGenerator->getUseAlias($fqnClassName)]]>
-
- strrpos($name, '\\')
+
+
-
- strrpos($name, '\\')
+
+
-
+
$namespaceAlias
-
+
+ self
+ static
+ static
+ static
+ static
+
+
is_array($constant)
-
+
! is_string($name)
-
- new static($array['name'])
- new static($classReflection->getName())
+
+
+ getName())]]>
-
- $tagManager->createTagFromReflection($reflectionTag)
+
+ createTagFromReflection($reflectionTag)]]>
-
+
Tag
+
+ fromReflection
+ getDescription
+ setDescription
+
-
- $tagManager->createTagFromReflection($reflectionTag)
+
+ createTagFromReflection($reflectionTag)]]>
-
+
AuthorTag
+
+ fromReflection
+
-
+
$this
$this
string|null
-
- $this->name
+
+ name]]>
-
- $tagManager->createTagFromReflection($reflectionTag)
+
+ createTagFromReflection($reflectionTag)]]>
-
+
ReturnTag
+
+ fromReflection
+
-
+
(bool) $isStatic
-
- $tagManager->createTagFromReflection($reflectionTag)
- $this->setTypes($datatype)
+
+ createTagFromReflection($reflectionTag)]]>
+ setTypes($datatype)]]>
-
+
$types
-
+
ParamTag
ParamTag
-
+
+ fromReflection
+ getDatatype
+ getParamName
+ setParamName
+
+
+ ParamTag
+
+
$variableName
-
- $tagManager->createTagFromReflection($reflectionTag)
- $this->setTypes($datatype)
+
+ createTagFromReflection($reflectionTag)]]>
+ setTypes($datatype)]]>
-
+
ReturnTag
ReturnTag
+
+ fromReflection
+ getDatatype
+
+
+ ReturnTag
+
-
+
new Tag()
-
+
$value
$value
$value
-
+
$name
-
+
$value
-
- $this->tags
+
+ tags]]>
TagInterface[]
-
+
(bool) $value
-
+
new static()
new static()
-
- $type === 'int' || $type === 'string'
- $type === 'string'
+
+
+
-
+
$type
-
- $backingType->getName()
- static fn(ReflectionEnumBackedCase $case): string => $case->getName()
- static fn(ReflectionEnumBackedCase $case): string|int => $case->getBackingValue()
+
+ getName()]]>
+ $case->getName()]]>
+ $case->getBackingValue()]]>
-
- $case->getName()
- $singleCase->getName()
-
-
- non-empty-string
- non-empty-string
-
-
+
ClassGenerator::fromArray($class)
ClassGenerator::fromArray($value)
- DeclareStatement::fromArray([$directive => $value])
+ $value])]]>
-
+
$docBlock
-
- [$directive => $value]
+
+ $value]]]>
-
+
$uses
-
-
- array<int, array{string, null|string, false|null|string}>
-
-
+
+
$value
-
+
$value
$value
$value
$value
$value
-
+
$name
$name
-
+
$value
-
+
+ ]]>
+
+
current($use)
-
+
$alias
$import
+ $uses[$useIndex][0]
+ $uses[$useIndex][1]
-
+
+ getFilename
+ setBody
+ setClasses
+ setDocBlock
+
+
(string) $body
(string) $filename
(string) $namespace
-
+
new static()
-
- $name
-
-
+
DocBlockGenerator::fromArray($value)
-
+
IMPLEMENTS_KEYWORD
OBJECT_TYPE
-
- $array['name']
+
+
$value
$value
$value
$value
$value
-
+
$name
-
+
$value
$value
-
- new static($array['name'])
- new static($classReflection->getName())
+
+
+ getName())]]>
-
- $reflectionMethod->getReturnType()
+
+ getReturnType()]]>
-
+
DocBlockGenerator::fromArray($value)
ParameterGenerator::fromArray($parameter)
-
+
__toString
-
- $array['name']
+
+
$value
$value
$value
@@ -331,29 +377,29 @@
$value
$value
-
+
$name
-
+
$value
-
- $reflectionMethod->getDocBlock()
+
+ getDocBlock()]]>
-
+
(bool) $returnsReference
-
- new static($array['name'])
+
+
new static()
-
- $reflectionParameter->getType()
+
+ getType()]]>
-
- $array['name']
+
+
$value
$value
$value
@@ -362,31 +408,31 @@
$value
$value
-
+
$name
-
+
$value
-
+
(bool) $passedByReference
(bool) $variadic
(int) $position
(string) $name
-
- new static($array['name'])
+
+
-
- $reflectionProperty->getType()
+
+ getType()]]>
-
+
DocBlockGenerator::fromArray($value)
-
- $array['name']
+
+
$value
$value
$value
@@ -396,77 +442,80 @@
$value
$value
-
+
$name
-
+
$defaultValue
-
- new static($array['name'])
+
+ $isConst
+
+
+
new static()
-
+
DocBlockGenerator::fromArray($value)
-
+
OBJECT_TYPE
-
- $array['name']
+
+
$value
$value
$value
$value
$value
-
+
$name
-
+
$value
-
- $classReflection->getDocBlock()
+
+ getDocBlock()]]>
-
- new static($array['name'])
- new static($classReflection->getName())
+
+
+ getName())]]>
-
+
is_string($alias)
-
+
$method
- $this->traitOverrides[$method]
- $this->traitOverrides[$traitAndMethod]
+ traitOverrides[$method]]]>
+ traitOverrides[$traitAndMethod]]]>
$traitAndMethod
$traitAndMethod
$traitAndMethod
-
+
$traits
-
- $this->traitOverrides[$method][$key]
+
+ traitOverrides[$method][$key]]]>
-
- $this->traitOverrides[$traitAndMethod][]
+
+ traitOverrides[$traitAndMethod][]]]>
-
- $this->traitOverrides[$method][$key]
- $this->traitOverrides[$traitAndMethod]
- $this->traitOverrides[$traitAndMethod]
- $this->traitOverrides[$traitAndMethod]
+
+ traitOverrides[$method][$key]]]>
+ traitOverrides[$traitAndMethod]]]>
+ traitOverrides[$traitAndMethod]]]>
+ traitOverrides[$traitAndMethod]]]>
-
- $this->traitOverrides[$traitAndMethod]
+
+ traitOverrides[$traitAndMethod]]]>
-
+
$alias
$insteadof
$insteadofTrait
@@ -475,22 +524,27 @@
$traitAndMethod
$traitToRemove
-
+
$insteadofTrait
-
+
addTraitOverride
addTraitOverride
-
-
+
+
+
+
addAlias
-
+
$value
$value
-
+
$key
$key
$key
@@ -499,264 +553,353 @@
$method
+
+
+ $this
+ $this
+ self
+ self
+ self
+ self
+
+
-
-
- allowsNull
- getTypes
- getTypes
-
-
+
$type
-
- $atomicType !== 'null'
- $atomicType->type !== 'mixed' && $atomicType !== 'null'
+
+
+ type !== 'mixed' && $atomicType !== 'null']]>
-
+
$type instanceof ReflectionNamedType
-
-
- getName
- getName
- getParentClass
-
-
-
+
getConstants
-
+
$constants instanceof SplArrayObject || $constants instanceof StdlibArrayObject
$constants instanceof StdlibArrayObject
-
+
__toString
-
+
initEnvironmentConstants
-
+
$constant
$n
$value
-
+
$constant
$curValue
$n
$v
- $value
-
+
$value
-
+
+ addConstant
+ deleteConstant
+ getArrayDepth
+ getOutputMode
+
+
+ $allowedTypes
+
+
(int) $arrayDepth
(string) $outputMode
(string) $type
-
- 'float'
+
+
-
+
$newPrototype
-
+
PrototypeInterface
-
+
setName
-
+
$newPrototype
-
- clone $this->genericPrototype
+
+ genericPrototype]]>
-
+
+ $filter
+ $filter
+
+
Exception\ExceptionInterface
-
+
+ int|false
+
+
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+
+
__toString
-
+
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+
+
$lines
-
+
$startnum
-
+
$startnum
- $this->getStartLine()
+ getStartLine()]]>
-
+
getStartLine
-
+
__toString
-
+
+ contentSplitCharacter]]>
+
+
string|null
-
+
__toString
-
- $this->name
+
+ name]]>
+
+ getContent
+
-
+
__toString
-
+
__toString
+
+
+ getDescription
+
+
-
+
__toString
-
+
! is_string($filter)
-
+
__toString
-
- $tag['name']
- $tag['value']
- $this->docComment
+
+
+
+ docComment]]>
-
- $tag['name']
- $tag['value']
+
+
+
-
+
$returnTags[]
$tag
$tag
$tag
$tag
$tag
- $this->docComment
- $this->endLine
- $this->startLine
+ docComment]]>
+ endLine]]>
+ startLine]]>
-
+
DocBlockTagInterface|false
-
+
getName
getName
getName
-
+
$tag
-
+
$tag
-
+
$returnTags
- $this->tags
+ tags]]>
DocBlockTagInterface[]
-
+
+ export
+
+
$endLine
$reflector
$startLine
-
+
is_string($commentOrReflector)
-
+
getStartLine
getStartLine
+
+
+ BadMethodCallException
+
+
-
+
detectType
-
+
+ parent::getStartLine()
+
+
+ int
+
+
+ $endLine
+ $endLine
+
+
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+ public function __toString()
+
+
__toString
-
+
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+ public function __toString()
+
+
$returnTypes
$returnTypes
-
+
$lines
$lines
-
+
$returnTypes[0]
-
+
$returnType
$returnTypes
-
- $prototype['return']
+
+
-
- strrpos($this->getName(), '\\')
- strrpos($this->getName(), '\\')
+
+ getName(), '\\')]]>
+ getName(), '\\')]]>
-
+
getDescription
getTypes
-
- $endLine
- $endLine
+
$startLine
$startLine
$startLine
$startLine
-
+
+ getReturn
+
+
getDescription
getTypes
-
+
detectType
-
+
+ parent::getStartLine()
+
+
+ int
+
+
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+
+
__toString
-
+
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+
+
$haystack[$i][0]
$haystack[$i][0]
$haystack[$i][0]
$returnTypes
$returnTypes
-
+
$lines
-
+
$returnTypes[0]
-
+
$returnType
$returnTypes
$tokenType
@@ -765,72 +908,75 @@
$tokenValue
$tokenValue
-
- $prototype['return']
+
+
$tokenValue
-
+
getStartLine
getTypes
-
+
getTypes
-
- $function->getName()
+
+ getName()]]>
-
- getDeclaringClass
+
getDocBlock
getDocBlock
- getModifiers
- getModifiers
- getModifiers
- getName
- getName
- getName
- getName
- getName
- getName
getProperty
getTags
-
+
string|null
-
- $type->getName()
+
+ getName()]]>
-
+
+ $isFromMethod
+
+
getName
getName
isBuiltin
+
+
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+
+
+ #[ReturnTypeWillChange]
+ #[ReturnTypeWillChange]
+
+
-
- $this->tags[$tagIndex]
- $this->tags[$tagIndex]
+
+ tags[$tagIndex]]]>
+ tags[$tagIndex]]]>
-
+
$length
$positionsForward
$type
-
- function ($length) use (&$currentWord, &$tokens, &$tokenIndex) {
+
+
function ($positionsForward = 1) use (
- function ($type) use (&$tokenIndex, &$tokens) {
- function () use (&$currentChar, &$tokens, &$tokenIndex) {
- function () use (&$currentLine, &$MACRO_STREAM_ADVANCE_CHAR) {
- function () use (&$currentLine, &$tokens, &$tokenIndex) {
- function () use (&$currentWord, &$MACRO_STREAM_ADVANCE_CHAR) {
- function () use (&$currentWord, &$tokens, &$tokenIndex) {
- function () use (&$tokenIndex, &$tokens) {
+
+
+
+
+
+
+
-
+
$currentLine
$currentWord
$currentWord
@@ -841,10 +987,10 @@
$streamIndex
$tokens
-
+
$stream[$streamIndex]
- $this->tags[$tagIndex]['value']
- $this->tags[$tagIndex]['value']
+ tags[$tagIndex]['value']]]>
+ tags[$tagIndex]['value']]]>
$token[0]
$token[1]
$token[1]
@@ -862,8 +1008,8 @@
$tokens[$tokenIndex][1]
$tokens[$tokenIndex][1]
-
- $this->tags[$tagIndex]['value']
+
+ tags[$tagIndex]['value']]]>
$tokens[$tokenIndex]
$tokens[$tokenIndex]
$tokens[$tokenIndex]
@@ -876,7 +1022,7 @@
$tokens[$tokenIndex][1]
$tokens[$tokenIndex][1]
-
+
$stream[$streamIndex]
$stream[$streamIndex]
$tokens[$tokenIndex]
@@ -891,7 +1037,7 @@
$tokens[$tokenIndex]
$tokens[$tokenIndex]
-
+
$context
$context
$context
@@ -904,17 +1050,17 @@
$tokenIndex
$tokens[$tokenIndex][0]
-
+
$MACRO_STREAM_ADVANCE_CHAR()
$MACRO_STREAM_ADVANCE_CHAR()
$MACRO_STREAM_ADVANCE_CHAR()
$MACRO_STREAM_ADVANCE_CHAR(strlen($currentLine))
$MACRO_STREAM_ADVANCE_CHAR(strlen($currentWord))
-
+
array
-
+
$CONTEXT_INSIDE_ASTERISK
$CONTEXT_INSIDE_ASTERISK
$CONTEXT_INSIDE_ASTERISK
@@ -923,7 +1069,7 @@
$CONTEXT_INSIDE_DOCBLOCK
$context
$streamIndex
- $this->tags[$tagIndex]['value']
+ tags[$tagIndex]['value']]]>
$tokenIndex
$token[1]
$token[1]
@@ -936,17 +1082,17 @@
~$CONTEXT_INSIDE_ASTERISK
~$CONTEXT_INSIDE_DOCBLOCK
-
+
$tokens
-
+
$context === 0x00
- $mode <= 2
+
-
+
$tagIndex !== null
-
+
$MACRO_TOKEN_APPEND_WORD_PARTIAL
$context
$context
@@ -955,37 +1101,81 @@
-
+
testConstructor
testSetOptionsThrowsExceptionOnInvalidArgument
-
+
new stdClass()
-
+
testSetDocBlockThrowsExceptionWithInvalidType
testSetFlagsWithArray
-
- 'bool'
+
+
-
- ''
- 'ExtendedClass'
- 'ExtendedClass'
- 'ExtendedClass'
- 'LaminasTest_Code_NsTest_BarClass'
- 'ParentClass'
- ['Class1', 'Class2']
+
+
+
+
+
+
+
+
-
-
+
+ 'SampleClass',
+ 'flags' => ClassGenerator::FLAG_ABSTRACT,
+ 'extendedClass' => 'ExtendedClassName',
+ 'implementedInterfaces' => ['Iterator', 'Traversable'],
+ 'properties' => [
+ 'foo',
+ ['name' => 'bar'],
+ ],
+ 'methods' => [
+ ['name' => 'baz'],
+ ],
+ ])]]>
+ 'ClassWithFinalConst',
+ 'properties' => [
+ [
+ 'FINAL',
+ 'const',
+ PropertyGenerator::FLAG_CONSTANT |
+ PropertyGenerator::FLAG_PUBLIC |
+ PropertyGenerator::FLAG_FINAL,
+ ],
+ ],
+ ])]]>
+ 'SampleClass',
+ 'docblock' => [
+ 'shortdescription' => 'foo',
+ ],
+ ])]]>
+ 'SampleClass',
+ 'docblock' => new DocBlockGenerator('foo'),
+ ])]]>
+ 'SomeClass',
+ 'flags' => ClassGenerator::FLAG_FINAL | ClassGenerator::FLAG_READONLY,
+ ])]]>
+ 'SomeClass',
+ 'flags' => ClassGenerator::FLAG_FINAL,
+ ])]]>
+
+
$reflClass
$reflClass
$reflClass
@@ -993,9 +1183,9 @@
$reflector
$reflector
$reflector
- ''
- 'public'
- 'public'
+
+
+
ExceptionInterface::class
[]
new ClassGenerator()
@@ -1006,28 +1196,28 @@
true
true
-
+
[]
new ClassGenerator()
-
+
FooClass
FooClass
-
- $overrides['myTrait::foo']
- $overrides['myTrait::foo']
- $overrides['myTrait::foo']
- $overrides['myTrait::foo']
+
+
+
+
+
FooClass::class
FooClass::class
-
- $overrides['myTrait::foo'][0]
- $overrides['myTrait::foo'][1]
- $overrides['myTrait::foo'][1]
+
+
+
+
-
+
getDefaultValue
getDefaultValue
getDefaultValue
@@ -1044,59 +1234,59 @@
getDefaultValue
getDefaultValue
-
- ['Class1', 'Class2']
+
+
-
+
testConstructorWithOptions
testCreatingTagFromReflection
testGetterAndSetterPersistValue
testNameIsCorrect
testParamProducesCorrectDocBlockLine
-
+
$reflectionTag
-
+
null
null
-
+
testConstructorWithOptions
testCreatingTagFromReflection
testGetterAndSetterPersistValue
testParamProducesCorrectDocBlockLine
-
+
$reflectionTag
-
+
null
null
-
+
testConstructorWithOptions
testCreatingTagFromReflection
testGetterAndSetterPersistValue
testLicenseProducesCorrectDocBlockLine
testNameIsCorrect
-
+
$reflectionTag
-
+
null
null
-
+
testConstructorWithOptions
testCreatingTagFromReflection
testGetterAndSetterPersistValue
@@ -1104,16 +1294,16 @@
testNameIsCorrect
testParamProducesCorrectDocBlockLine
-
+
$reflectionTag
-
+
null
null
-
+
testConstructorWithOptions
testCreatingTagFromReflection
testGetterAndSetterPersistValue
@@ -1121,16 +1311,16 @@
testNameIsCorrect
testParamProducesCorrectDocBlockLine
-
+
$reflectionTag
-
+
null
null
-
+
testConstructorWithOptions
testCreatingTagFromReflection
testGetterAndSetterPersistValue
@@ -1138,44 +1328,44 @@
testNameIsCorrect
testParamProducesCorrectDocBlockLine
-
+
$reflectionTag
-
+
null
null
-
+
testCreatingTagFromReflection
testNameIsCorrect
testReturnProducesCorrectDocBlockLine
-
+
$reflectionTag
-
+
null
null
-
+
testCreatingTagFromReflection
testNameIsCorrect
testParamProducesCorrectDocBlockLine
-
+
$reflectionTag
-
+
null
null
-
+
testConstructorWithOptions
testGetterAndSetterPersistValue
testGetterForTypesAsStringWithMultipleTypes
@@ -1183,16 +1373,26 @@
testGetterForTypesAsStringWithSingleType
testGetterForTypesAsStringWithSingleTypeAndDelimiter
-
+
null
-
+
+ 'foo',
+ 'longdescription' => 'bar',
+ 'tags' => [
+ [
+ 'name' => 'foo',
+ 'description' => 'bar',
+ ],
+ ],
+ ])]]>
setDatatype
setDatatype
-
+
testCanPassTagsToConstructor
testCreateFromArray
testDocBlockFromReflectionAuthorTag
@@ -1210,12 +1410,85 @@
testTagGettersAndSetters
+
+
+ validEnumSpecifications
+ validOptionSpecifications
+
+
-
-
- $file->getUses()
+
+ [
+ 'name' => 'SampleClass',
+ ],
+ ])]]>
+ [
+ 'fubar' => 1,
+ ],
+ 'class' => [
+ 'name' => 'SampleClass',
+ ],
+ ])]]>
+ [
+ 'strict_types' => 'wrong type',
+ ],
+ 'class' => [
+ 'name' => 'SampleClass',
+ ],
+ ])]]>
+ [
+ 'strict_types' => 1,
+ 'ticks' => 2,
+ ],
+ 'class' => [
+ 'name' => 'SampleClass',
+ ],
+ ])]]>
+ [
+ 'strict_types' => 1,
+ ],
+ 'class' => [
+ 'name' => 'SampleClass',
+ ],
+ ])]]>
+ 'foo.php',
+ 'class' => [
+ 'name' => 'bar',
+ ],
+ ])]]>
+ 'foo.php',
+ 'class' => new ClassGenerator('bar'),
+ ])]]>
+ ['SampleClass.php'],
+ 'class' => [
+ 'abstract' => true,
+ 'name' => 'SampleClass',
+ 'extendedClass' => 'ExtendedClassName',
+ 'implementedInterfaces' => ['Iterator', 'Traversable'],
+ ],
+ ])]]>
+ ['SampleClass.php'],
+ 'class' => [
+ 'flags' => ClassGenerator::FLAG_ABSTRACT,
+ 'name' => 'SampleClass',
+ 'extendedClass' => 'ExtendedClassName',
+ 'implementedInterfaces' => ['Iterator', 'Traversable'],
+ ],
+ ])]]>
+
+
+ getUses()]]>
-
+
testClassNotFoundException
testConstruction
testCreateFromArrayWithClassFromArray
@@ -1235,15 +1508,32 @@
-
- ['Class1', 'Class2']
+
+
-
-
+
+ 'MyInterface',
+ 'docblock' => new DocBlockGenerator('foo'),
+ ])]]>
+ 'SampleClass',
+ 'docblock' => [
+ 'shortdescription' => 'foo',
+ ],
+ ])]]>
+ 'SampleInterface',
+ 'methods' => [
+ ['name' => 'baz'],
+ ],
+ ])]]>
+
+
$reflClass
new ClassReflection(self::class)
-
+
testAbstractAccessorsReturnsFalse
testClassNotAnInterfaceException
testCodeGenerationShouldTakeIntoAccountNamespacesFromReflection
@@ -1262,27 +1552,50 @@
testSetextendedclassShouldNotIgnoreNonEmptyClassnameOnGenerate
testToString
-
+
isInterface
isInterface
-
- ['Class1', 'Class2']
+
+
-
+
$className
-
- ParameterGenerator::fromArray(['name' => 'bar', 'type' => 'array'])
- ParameterGenerator::fromArray(['name' => 'baz', 'type' => stdClass::class, 'position' => 1])
- ParameterGenerator::fromArray(['name' => 'baz', 'type' => stdClass::class])
+
+ 'SampleMethod',
+ 'returnsreference' => $value,
+ ])]]>
+ 'SampleMethod',
+ 'body' => 'foo',
+ 'docblock' => [
+ 'shortdescription' => 'foo',
+ ],
+ 'abstract' => true,
+ 'final' => true,
+ 'static' => true,
+ 'visibility' => MethodGenerator::VISIBILITY_PROTECTED,
+ 'returntype' => '\\SampleType',
+ ])]]>
+ 'execute',
+ 'interface' => true,
+ 'docblock' => [
+ 'shortdescription' => 'Short Description',
+ ],
+ ])]]>
+ 'bar', 'type' => 'array'])]]>
+ 'baz', 'type' => stdClass::class, 'position' => 1])]]>
+ 'baz', 'type' => stdClass::class])]]>
-
+
new stdClass()
-
+
testByRefReturnType
testCopyMethodSignature
testCreateFromArray
@@ -1306,28 +1619,51 @@
testSetReturnType
testSetReturnTypeWithNull
-
+
generate
+
+ php80Methods
+ returnTypeHintClasses
+ returnsReferenceValues
+
-
- 'LaminasTest_Code_NsTest_BarClass'
- 'Namespaced\TypeHint\Bar'
+
+
-
-
-
+
+ 'SampleParameter',
+ 'type' => 'int',
+ 'defaultvalue' => 'default-foo',
+ 'passedbyreference' => false,
+ 'position' => 1,
+ 'sourcedirty' => false,
+ 'sourcecontent' => 'foo',
+ 'indentation' => '-',
+ 'omitdefaultvalue' => true,
+ ])]]>
+
+
+ $definition[0] . '#' . $definition[1],
+ $parameters
+ ),
+ $parameters
+ )]]>
+
+
string[][]
-
+
testCallableTypeHint
testCreateFromArray
testDefaultValueGetterAndSetterPersistValue
testFromReflectionGenerate
testFromReflectionGetArrayHint
testFromReflectionGetDefaultValue
- testFromReflectionGetDefaultValueNotOptional
testFromReflectionGetParameterName
testFromReflectionGetParameterType
testFromReflectionGetReference
@@ -1347,50 +1683,127 @@
testTypeHintWithValidClassName
testTypehintsWithNamespaceInNamepsacedClassReturnTypewithBackslash
+
+ dataFromReflectionGenerate
+ php80Methods
+ reflectionHints
+ simpleHints
+ validClassName
+ variadicHints
+
+
+ setAccessible
+
-
+
$type
-
-
+
+ 'SampleProperty',
+ 'const' => false,
+ 'defaultvalue' => 'default-foo',
+ 'docblock' => [
+ 'shortdescription' => 'foo',
+ ],
+ 'abstract' => true,
+ 'final' => true,
+ 'static' => true,
+ 'visibility' => PropertyGenerator::VISIBILITY_PROTECTED,
+ 'omitdefaultvalue' => true,
+ 'type' => TypeGenerator::fromTypeString(self::class),
+ ])]]>
+ 'ReadonlyProperty',
+ 'readonly' => true,
+ ])]]>
+ 'someVal',
+ 'type' => 'invalidStringn',
+ ])]]>
+
+
new stdClass()
-
-
+
+
+
+
bool[][]|string[][]|int[][]|null[][]
-
+
testOmitType
-
+
$generator
-
- Generator
-
-
- testSetBogusTypeSetValueGenerateUseAutoDetection
- testSetBogusTypeSetValueGenerateUseAutoDetection
- testSetDefaultValue
- testSetTypeSetValueGenerate
- testSetTypeSetValueGenerate
-
-
+
+ dataSetTypeSetValueGenerate
+ visibility
+
+
assertIsArray
+
+ setAccessible
+
-
+
testPropertyValueAddsSemicolonToValueGenerator
-
- 'LaminasTest_Code_NsTest_BarClass'
+
+
-
-
+
+ new DocBlockGenerator('foo'),
+ ])]]>
+ 'SampleClass',
+ 'containingfile' => new FileGenerator(),
+ ])]]>
+ 'SampleClass',
+ 'namespacename' => $namespace,
+ ])]]>
+ 'SampleClass',
+ 'properties' => [
+ 'foo',
+ ['name' => 'bar'],
+ ],
+ 'methods' => [
+ ['name' => 'baz'],
+ ],
+ ])]]>
+ 'SampleClass',
+ 'docblock' => [
+ 'shortdescription' => 'foo',
+ ],
+ ])]]>
+ 'SampleClass',
+ 'docblock' => new DocBlockGenerator('foo'),
+ ])]]>
+
+
$reflClass
$reflClass
$reflClass
@@ -1400,32 +1813,48 @@
true
true
+
+ setAccessible
+
-
- iterable
-
+
+ validType
+
+
+
+
+ invalidIntersectionsExamples
+ sortingExamples
+
+
+
+
+ invalidUnionsExamples
+ sortingExamples
+
-
- testFromValidTypeString
+
testIsAGenerator
- testRejectsInvalidTypeString
- testStringCastFromValidTypeString
+
+ invalidType
+ validClassName
+
-
+
getConstants
getConstants
initEnvironmentConstants
initEnvironmentConstants
initEnvironmentConstants
-
+
$constants
-
+
testEscaping
testPropertyDefaultValueCanHandleArray
testPropertyDefaultValueCanHandleArrayWithUnsortedKeys
@@ -1436,33 +1865,30 @@
testPropertyDefaultValueConstructor
testPropertyDefaultValueIsSettable
-
- Generator
- array
- array
- array
- array
-
+
+ complexArray
+ complexArrayWCustomIndent
+ constantsType
+ getEscapedParameters
+ invalidValue
+ simpleArray
+ unsortedKeysArray
+ validConstantTypes
+
-
- setMethods
-
-
+
testAddAndGetPrototype
testFallBackToGeneric
testSetNameOnGenericIsCalledOnce
-
- null
-
-
- 'ReflectionClass'
- __NAMESPACE__ . '\\' . $className
+
+
+
-
+
testGetContentsReturnsContents
testGetContentsReturnsContentsWithImplementsOnSeparateLine
testGetContentsReturnsEmptyContentsOnEvaldCode
@@ -1474,42 +1900,39 @@
testPropertyReturns
testStartLine
-
- $parent
-
-
+
getName
-
+
$traitsArray[TestTraitClass3::class]
-
+
testParseName
testParseNameAndEmail
-
+
testParse
-
+
testParseUrl
testParseUrlAndLicenseName
-
+
getReturnType
getReturnType
getReturnType
getReturnType
getReturnType
-
+
testParseName
testParseNameAndStatic
testParseNameAndStaticAndDescription
@@ -1518,13 +1941,13 @@
-
+
getType
getType
getType
getType
-
+
testParseName
testParseNameAndDescription
testParseTypeAndName
@@ -1532,7 +1955,7 @@
-
+
testAllCharactersFromTypenameAreSupported
testMultipleTypesWithDescription
testMultipleTypesWithoutDescription
@@ -1541,22 +1964,22 @@
-
+
testParse
-
- array
-
+
+ varTagProvider
+
-
+
getType
getType
getType
getType
getType
-
+
testDocBlockContents
testDocBlockLines
testDocBlockLongDescription
@@ -1567,7 +1990,7 @@
testTabbedDocBlockTags
testToString
-
+
getContents
getLongDescription
getShortDescription
@@ -1595,7 +2018,7 @@
hasTag
hasTag
-
+
getDescription
getType
getType
@@ -1603,39 +2026,44 @@
-
- __NAMESPACE__ . '\\' . $functionName
+
+
-
+
getPrototype
getPrototype
-
- 'LaminasTest\Code\Reflection\TestAsset\function1'
- 'LaminasTest\Code\Reflection\TestAsset\function1'
- 'LaminasTest\Code\Reflection\TestAsset\function10'
- 'LaminasTest\Code\Reflection\TestAsset\function10'
- 'LaminasTest\Code\Reflection\TestAsset\function11'
- 'LaminasTest\Code\Reflection\TestAsset\function11'
- 'LaminasTest\Code\Reflection\TestAsset\function12'
- 'LaminasTest\Code\Reflection\TestAsset\function12'
- 'LaminasTest\Code\Reflection\TestAsset\function2'
- 'LaminasTest\Code\Reflection\TestAsset\function3'
- 'LaminasTest\Code\Reflection\TestAsset\function3'
- 'LaminasTest\Code\Reflection\TestAsset\function4'
- 'LaminasTest\Code\Reflection\TestAsset\function4'
- 'LaminasTest\Code\Reflection\TestAsset\function5'
- 'LaminasTest\Code\Reflection\TestAsset\function5'
- 'LaminasTest\Code\Reflection\TestAsset\function6'
- 'LaminasTest\Code\Reflection\TestAsset\function6'
- 'LaminasTest\Code\Reflection\TestAsset\function7'
- 'LaminasTest\Code\Reflection\TestAsset\function7'
- 'LaminasTest\Code\Reflection\TestAsset\function8'
- 'LaminasTest\Code\Reflection\TestAsset\function8'
- 'LaminasTest\Code\Reflection\TestAsset\function9'
- 'LaminasTest\Code\Reflection\TestAsset\function9'
+
+
+ $list2[0]
+ $list3[0]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
testFunctionBodyReturn
testFunctionClosureBodyReturn
testFunctionClosureContentsReturnWithDocBlock
@@ -1650,7 +2078,17 @@
testInternalFunctionContentsReturn
testParemeterReturn
-
+
+ $function5
+ $function6
+ $function7
+
+
+ $function5
+ $function6
+ $function7
+
+
$function1
$function10
$function10
@@ -1658,25 +2096,12 @@
$function2
$function3
$function4
- $function5
- $function6
- $function7
$function8
$function9
$function9
$function9
-
-
- $list1['closure']
- $list2[0]
- $list3[0]
-
-
- $function5
- $function6
- $function7
-
-
+
+
$body
$body
$body
@@ -1696,34 +2121,18 @@
$body
$body
-
- $function1
- $function10
- $function10
- $function2
- $function2
- $function3
- $function4
- $function8
- $function9
- $function9
- $function9
- $list1
- $list2
- $list3
-
-
- 'DOMDocument'
- 'DOMDocument'
- 'DateTime'
- 'FooClass'
- 'ReflectionClass'
- 'ReflectionException'
- __NAMESPACE__ . '\\' . $className
+
+
+
+
+
+
+
+
-
+
getPrototype
getPrototype
getPrototype
@@ -1733,7 +2142,7 @@
getPrototype
getPrototype
-
+
testCanParseClassBodyWhenUsingTrait
testCodeGetBodyReturnsEmptyWithCommentedFunction
testCodeGetContentsDoesNotThrowExceptionOnDocBlock
@@ -1752,35 +2161,36 @@
-
+
detectType
detectType
detectType
detectType
detectType
-
+
testCallableTypeHint
testClassReturn
testClassReturnNoClassGivenReturnsNull
testDeclaringClassReturn
- testDetectType
- testDetectTypeWithDocBlockOnlyTypes
- testGetType
- testGetTypeWithDocBlockOnlyTypes
- testTypeReturn
-
+
+ docBlockHints
+ paramType
+ paramTypeWithNotAllParamsDeclared
+ reflectionHints
+
+
getName
-
+
testDeclaringClassReturn
-
+
testAllowsMultipleSpacesInDocBlockTagLine
testAllowsMultipleSpacesInDocBlockTagLine2
testNamespaceInParam
@@ -1794,10 +2204,7 @@
testTypeParam
testVariableName
-
- array
-
-
+
getAuthorEmail
getAuthorName
getContent
@@ -1828,10 +2235,13 @@
getVariableName
getVariableName
-
+
$tag
-
+
+ propertyVarDocProvider
+
+
getAuthorEmail
getAuthorName
getContent
@@ -1851,18 +2261,18 @@
-
+
testDocBlockScannerDescriptions
testDocBlockScannerParsesTagsWithNoValuesProperly
testInvalidDocBlock
-
+
$tags[0]
$tags[0]
-
- $tags[0]['name']
- $tags[0]['value']
+
+
+
diff --git a/psalm.xml b/psalm.xml
index 2501d42c..c76c4c57 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -5,6 +5,8 @@
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
findUnusedPsalmSuppress="true"
+ findUnusedBaselineEntry="true"
+ findUnusedCode="true"
errorBaseline="psalm-baseline.xml"
>
diff --git a/test/Generator/AbstractGeneratorTest.php b/test/Generator/AbstractGeneratorTest.php
index 58ea2eac..acc256bd 100644
--- a/test/Generator/AbstractGeneratorTest.php
+++ b/test/Generator/AbstractGeneratorTest.php
@@ -5,12 +5,11 @@
use Laminas\Code\Generator\AbstractGenerator;
use Laminas\Code\Generator\Exception\InvalidArgumentException;
use Laminas\Code\Generator\GeneratorInterface;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- */
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
class AbstractGeneratorTest extends TestCase
{
public function testConstructor()
diff --git a/test/Generator/AbstractMemberGeneratorTest.php b/test/Generator/AbstractMemberGeneratorTest.php
index b76348f7..f6b54237 100644
--- a/test/Generator/AbstractMemberGeneratorTest.php
+++ b/test/Generator/AbstractMemberGeneratorTest.php
@@ -5,13 +5,13 @@
use Laminas\Code\Generator\AbstractMemberGenerator;
use Laminas\Code\Generator\DocBlockGenerator;
use Laminas\Code\Generator\Exception\InvalidArgumentException;
+use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use stdClass;
class AbstractMemberGeneratorTest extends TestCase
{
- /** @var AbstractMemberGenerator */
- private $fixture;
+ private MockObject&AbstractMemberGenerator $fixture;
protected function setUp(): void
{
diff --git a/test/Generator/ClassGeneratorTest.php b/test/Generator/ClassGeneratorTest.php
index c81e7547..2a5d54ac 100644
--- a/test/Generator/ClassGeneratorTest.php
+++ b/test/Generator/ClassGeneratorTest.php
@@ -16,6 +16,8 @@
use LaminasTest\Code\Generator\TestAsset\ClassWithPromotedParameter;
use LaminasTest\Code\Generator\TestAsset\ReadonlyClassWithPromotedParameter;
use LaminasTest\Code\TestAsset\FooClass;
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RequiresPhp;
use PHPUnit\Framework\TestCase;
use ReflectionMethod;
use Serializable;
@@ -27,10 +29,8 @@
use function fopen;
use function key;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- */
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
class ClassGeneratorTest extends TestCase
{
public function testConstruction(): void
@@ -201,9 +201,7 @@ public function testSetMethodNameAlreadyExistsThrowsException(): void
$classGenerator->addMethodFromGenerator($methodB);
}
- /**
- * @group Laminas-7361
- */
+ #[Group('Laminas-7361')]
public function testHasMethod(): void
{
$classGenerator = new ClassGenerator();
@@ -222,9 +220,7 @@ public function testRemoveMethod(): void
self::assertFalse($classGenerator->hasMethod('methodOne'));
}
- /**
- * @group Laminas-7361
- */
+ #[Group('Laminas-7361')]
public function testHasProperty(): void
{
$classGenerator = new ClassGenerator();
@@ -277,9 +273,7 @@ public function baz()
self::assertSame($expectedOutput, $output, $output);
}
- /**
- * @group Laminas-7909
- */
+ #[Group('Laminas-7909')]
public function testClassFromReflectionThatImplementsInterfaces(): void
{
$reflClass = new ClassReflection(TestAsset\ClassWithInterface::class);
@@ -295,9 +289,7 @@ public function testClassFromReflectionThatImplementsInterfaces(): void
self::assertStringContainsString($expectedClassDef, $code);
}
- /**
- * @group Laminas-7909
- */
+ #[Group('Laminas-7909')]
public function testClassFromReflectionDiscardParentImplementedInterfaces(): void
{
$reflClass = new ClassReflection(TestAsset\NewClassWithInterface::class);
@@ -313,9 +305,7 @@ public function testClassFromReflectionDiscardParentImplementedInterfaces(): voi
self::assertStringContainsString($expectedClassDef, $code);
}
- /**
- * @group 4988
- */
+ #[Group('4988')]
public function testNonNamespaceClassReturnsAllMethods(): void
{
require_once __DIR__ . '/../TestAsset/NonNamespaceClass.php';
@@ -325,9 +315,7 @@ public function testNonNamespaceClassReturnsAllMethods(): void
self::assertCount(1, $classGenerator->getMethods());
}
- /**
- * @group Laminas-9602
- */
+ #[Group('Laminas-9602')]
public function testSetextendedclassShouldIgnoreEmptyClassnameOnGenerate(): void
{
$classGeneratorClass = new ClassGenerator();
@@ -344,9 +332,7 @@ class MyClass
self::assertSame($expected, $classGeneratorClass->generate());
}
- /**
- * @group Laminas-9602
- */
+ #[Group('Laminas-9602')]
public function testSetextendedclassShouldNotIgnoreNonEmptyClassnameOnGenerate(): void
{
$classGeneratorClass = new ClassGenerator();
@@ -363,9 +349,7 @@ class MyClass extends ParentClass
self::assertSame($expected, $classGeneratorClass->generate());
}
- /**
- * @group namespace
- */
+ #[Group('namespace')]
public function testCodeGenerationShouldTakeIntoAccountNamespacesFromReflection(): void
{
$reflClass = new ClassReflection(TestAsset\ClassWithNamespace::class);
@@ -384,9 +368,7 @@ class ClassWithNamespace
self::assertSame($expected, $received, $received);
}
- /**
- * @group namespace
- */
+ #[Group('namespace')]
public function testSetNameShouldDetermineIfNamespaceSegmentIsPresent(): void
{
$classGeneratorClass = new ClassGenerator();
@@ -394,9 +376,7 @@ public function testSetNameShouldDetermineIfNamespaceSegmentIsPresent(): void
self::assertSame('My\Namespaced', $classGeneratorClass->getNamespaceName());
}
- /**
- * @group namespace
- */
+ #[Group('namespace')]
public function testPassingANamespacedClassnameShouldGenerateANamespaceDeclaration(): void
{
$classGeneratorClass = new ClassGenerator();
@@ -405,9 +385,7 @@ public function testPassingANamespacedClassnameShouldGenerateANamespaceDeclarati
self::assertStringContainsString('namespace My\Namespaced;', $received, $received);
}
- /**
- * @group namespace
- */
+ #[Group('namespace')]
public function testPassingANamespacedClassnameShouldGenerateAClassnameWithoutItsNamespace(): void
{
$classGeneratorClass = new ClassGenerator();
@@ -458,9 +436,7 @@ public function testRemoveUseAlias(): void
self::assertFalse($classGenerator->hasUseAlias('My\First\Use\Class'));
}
- /**
- * @group Laminas-151
- */
+ #[Group('Laminas-151')]
public function testAddUses(): void
{
$classGenerator = new ClassGenerator();
@@ -473,9 +449,7 @@ public function testAddUses(): void
self::assertStringContainsString('use My\Second\Use\Class as MyAlias;', $generated);
}
- /**
- * @group 4990
- */
+ #[Group('4990')]
public function testAddOneUseTwiceOnlyAddsOne(): void
{
$classGenerator = new ClassGenerator();
@@ -489,9 +463,7 @@ public function testAddOneUseTwiceOnlyAddsOne(): void
self::assertStringContainsString('use My\First\Use\Class;', $generated);
}
- /**
- * @group 4990
- */
+ #[Group('4990')]
public function testAddOneUseWithAliasTwiceOnlyAddsOne(): void
{
$classGenerator = new ClassGenerator();
@@ -580,9 +552,7 @@ public function methodOne()
self::assertSame($expected, $output);
}
- /**
- * @group 6274
- */
+ #[Group('6274')]
public function testCanAddConstant(): void
{
$classGenerator = new ClassGenerator();
@@ -602,9 +572,7 @@ public function testCanAddConstant(): void
self::assertSame('value', $defaultValue->getValue());
}
- /**
- * @group 6274
- */
+ #[Group('6274')]
public function testCanAddConstantsWithArrayOfGenerators(): void
{
$classGenerator = new ClassGenerator();
@@ -624,9 +592,7 @@ public function testCanAddConstantsWithArrayOfGenerators(): void
self::assertSame('value2', $valueY->getValue());
}
- /**
- * @group 6274
- */
+ #[Group('6274')]
public function testCanAddConstantsWithArrayOfKeyValues(): void
{
$classGenerator = new ClassGenerator();
@@ -647,9 +613,7 @@ public function testCanAddConstantsWithArrayOfKeyValues(): void
self::assertSame('value2', $valueY->getValue());
}
- /**
- * @group 6274
- */
+ #[Group('6274')]
public function testAddConstantThrowsExceptionWithInvalidName(): void
{
$classGenerator = new ClassGenerator();
@@ -725,7 +689,7 @@ public function testAddConstantRejectsResourceConstantValue(): void
$classGenerator->addConstant('a', $resource);
$this->fail('Not supposed to be reached');
- } catch (InvalidArgumentException $e) {
+ } catch (InvalidArgumentException) {
self::assertEmpty($classGenerator->getConstants());
} finally {
fclose($resource);
@@ -740,9 +704,7 @@ public function testAddConstantRejectsArrayWithInvalidNestedValue(): void
$classGenerator->addConstant('a', [new stdClass()]);
}
- /**
- * @group 6274
- */
+ #[Group('6274')]
public function testAddConstantThrowsExceptionOnDuplicate(): void
{
$classGenerator = new ClassGenerator();
@@ -762,9 +724,7 @@ public function testRemoveConstant(): void
self::assertFalse($classGenerator->hasConstant('constantOne'));
}
- /**
- * @group 6274
- */
+ #[Group('6274')]
public function testAddPropertyIsBackwardsCompatibleWithConstants(): void
{
$classGenerator = new ClassGenerator();
@@ -776,9 +736,7 @@ public function testAddPropertyIsBackwardsCompatibleWithConstants(): void
self::assertSame('value1', $valueX->getValue());
}
- /**
- * @group 6274
- */
+ #[Group('6274')]
public function testAddPropertiesIsBackwardsCompatibleWithConstants(): void
{
$constants = [
@@ -799,9 +757,7 @@ public function testAddPropertiesIsBackwardsCompatibleWithConstants(): void
self::assertSame('value2', $valueY->getValue());
}
- /**
- * @group 6274
- */
+ #[Group('6274')]
public function testConstantsAddedFromReflection(): void
{
$reflector = new ClassReflection(TestAsset\TestClassWithManyProperties::class);
@@ -813,9 +769,7 @@ public function testConstantsAddedFromReflection(): void
self::assertSame('foo', $constantValue->getValue());
}
- /**
- * @group 6274
- */
+ #[Group('6274')]
public function testClassCanBeGeneratedWithConstantAndPropertyWithSameName(): void
{
$reflector = new ClassReflection(TestAsset\TestSampleSingleClass::class);
@@ -863,9 +817,7 @@ protected function withParamsAndReturnType($mixed, array $array, ?callable $call
self::assertSame($contents, $classGenerator->generate());
}
- /**
- * @group 6253
- */
+ #[Group('6253')]
public function testHereDoc(): void
{
$reflector = new ClassReflection(TestAsset\TestClassWithHeredoc::class);
@@ -1128,9 +1080,7 @@ public function testCanRemoveAllTraitOverrides(): void
self::assertCount(0, $overrides);
}
- /**
- * @group generate
- */
+ #[Group('generate')]
public function testUseTraitGeneration(): void
{
$classGenerator = new ClassGenerator();
@@ -1149,9 +1099,7 @@ class myClass
self::assertSame($output, $classGenerator->generate());
}
- /**
- * @group generate
- */
+ #[Group('generate')]
public function testTraitGenerationWithAliasesAndOverrides(): void
{
$classGenerator = new ClassGenerator();
@@ -1222,9 +1170,7 @@ public function testCorrectExtendNames(): void
self::assertStringContainsString('class ClassName extends FooClass', $classGenerator->generate());
}
- /**
- * @group 75
- */
+ #[Group('75')]
public function testCorrectlyExtendsFullyQualifiedParentClass(): void
{
$classGenerator = new ClassGenerator();
@@ -1234,9 +1180,7 @@ public function testCorrectlyExtendsFullyQualifiedParentClass(): void
self::assertStringContainsString('class ClassName extends \DateTime', $classGenerator->generate());
}
- /**
- * @group 75
- */
+ #[Group('75')]
public function testCorrectlyExtendsRelativeParentClass(): void
{
$classGenerator = new ClassGenerator();
@@ -1245,9 +1189,7 @@ public function testCorrectlyExtendsRelativeParentClass(): void
self::assertStringContainsString('class ClassName extends DateTime', $classGenerator->generate());
}
- /**
- * @group 75
- */
+ #[Group('75')]
public function testCorrectExtendNamesFromGlobalNamespace(): void
{
$classGenerator = new ClassGenerator();
@@ -1335,7 +1277,6 @@ public function testCorrectImplementNames(): void
self::assertStringContainsString($expected, $classGenerator->generate());
}
- /** @requires PHP >= 8.1 */
public function testFinalConstantsAddedFromReflection(): void
{
$reflector = new ClassReflection(TestAsset\ClassWithFinalConst::class);
@@ -1378,7 +1319,6 @@ class ClassWithFinalConst
self::assertSame($expectedOutput, $output, $output);
}
- /** @requires PHP >= 8.0 */
public function testGenerateClassWithPromotedConstructorParameter(): void
{
$classGenerator = new ClassGenerator();
@@ -1405,7 +1345,6 @@ public function __construct(private \Foo \$bar)
self::assertEquals($expectedOutput, $classGenerator->generate());
}
- /** @requires PHP >= 8.0 */
public function testClassWithPromotedParameterFromReflection(): void
{
$classGenerator = ClassGenerator::fromReflection(
@@ -1427,7 +1366,6 @@ public function __construct(private string \$promotedParameter)
self::assertEquals($expectedOutput, $classGenerator->generate());
}
- /** @requires PHP >= 8.0 */
public function testFailToGenerateClassWithPromotedParameterOnNonConstructorMethod(): void
{
$classGenerator = new ClassGenerator();
@@ -1442,7 +1380,7 @@ public function testFailToGenerateClassWithPromotedParameterOnNonConstructorMeth
]);
}
- /** @requires PHP >= 8.2 */
+ #[RequiresPhp('>= 8.2')]
public function testReadonlyClassWithPromotedParameterFromReflection(): void
{
$classGenerator = ClassGenerator::fromReflection(
@@ -1464,7 +1402,7 @@ public function __construct(private string \$promotedParameter)
self::assertEquals($expectedOutput, $classGenerator->generate());
}
- /** @requires PHP >= 8.2 */
+ #[RequiresPhp('>= 8.2')]
public function testDnfClass(): void
{
$classGenerator = ClassGenerator::fromReflection(
diff --git a/test/Generator/DocBlock/Tag/AuthorTagTest.php b/test/Generator/DocBlock/Tag/AuthorTagTest.php
index ebe3f310..143e5014 100644
--- a/test/Generator/DocBlock/Tag/AuthorTagTest.php
+++ b/test/Generator/DocBlock/Tag/AuthorTagTest.php
@@ -5,12 +5,11 @@
use Laminas\Code\Generator\DocBlock\Tag\AuthorTag;
use Laminas\Code\Generator\DocBlock\TagManager;
use Laminas\Code\Reflection\DocBlockReflection;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- */
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
class AuthorTagTest extends TestCase
{
/** @var AuthorTag */
diff --git a/test/Generator/DocBlock/Tag/GenericTagTest.php b/test/Generator/DocBlock/Tag/GenericTagTest.php
index 3bbd8cf9..311af4ba 100644
--- a/test/Generator/DocBlock/Tag/GenericTagTest.php
+++ b/test/Generator/DocBlock/Tag/GenericTagTest.php
@@ -5,12 +5,11 @@
use Laminas\Code\Generator\DocBlock\Tag\GenericTag;
use Laminas\Code\Generator\DocBlock\TagManager;
use Laminas\Code\Reflection\DocBlockReflection;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- */
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
class GenericTagTest extends TestCase
{
/** @var GenericTag */
diff --git a/test/Generator/DocBlock/Tag/LicenseTagTest.php b/test/Generator/DocBlock/Tag/LicenseTagTest.php
index 2bc1fbf3..7f821a5d 100644
--- a/test/Generator/DocBlock/Tag/LicenseTagTest.php
+++ b/test/Generator/DocBlock/Tag/LicenseTagTest.php
@@ -5,12 +5,11 @@
use Laminas\Code\Generator\DocBlock\Tag\LicenseTag;
use Laminas\Code\Generator\DocBlock\TagManager;
use Laminas\Code\Reflection\DocBlockReflection;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- */
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
class LicenseTagTest extends TestCase
{
/** @var LicenseTag */
diff --git a/test/Generator/DocBlock/Tag/MethodTagTest.php b/test/Generator/DocBlock/Tag/MethodTagTest.php
index da80c585..5424c902 100644
--- a/test/Generator/DocBlock/Tag/MethodTagTest.php
+++ b/test/Generator/DocBlock/Tag/MethodTagTest.php
@@ -5,12 +5,11 @@
use Laminas\Code\Generator\DocBlock\Tag\MethodTag;
use Laminas\Code\Generator\DocBlock\TagManager;
use Laminas\Code\Reflection\DocBlockReflection;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- */
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
class MethodTagTest extends TestCase
{
/** @var MethodTag */
diff --git a/test/Generator/DocBlock/Tag/ParamTagTest.php b/test/Generator/DocBlock/Tag/ParamTagTest.php
index 94682e06..f6dd45c5 100644
--- a/test/Generator/DocBlock/Tag/ParamTagTest.php
+++ b/test/Generator/DocBlock/Tag/ParamTagTest.php
@@ -5,12 +5,11 @@
use Laminas\Code\Generator\DocBlock\Tag\ParamTag;
use Laminas\Code\Generator\DocBlock\TagManager;
use Laminas\Code\Reflection\DocBlockReflection;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- */
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
class ParamTagTest extends TestCase
{
/** @var ParamTag */
diff --git a/test/Generator/DocBlock/Tag/PropertyTagTest.php b/test/Generator/DocBlock/Tag/PropertyTagTest.php
index 4a7d5786..07932e5a 100644
--- a/test/Generator/DocBlock/Tag/PropertyTagTest.php
+++ b/test/Generator/DocBlock/Tag/PropertyTagTest.php
@@ -5,12 +5,11 @@
use Laminas\Code\Generator\DocBlock\Tag\PropertyTag;
use Laminas\Code\Generator\DocBlock\TagManager;
use Laminas\Code\Reflection\DocBlockReflection;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- */
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
class PropertyTagTest extends TestCase
{
/** @var PropertyTag */
diff --git a/test/Generator/DocBlock/Tag/ReturnTagTest.php b/test/Generator/DocBlock/Tag/ReturnTagTest.php
index f5e630ea..06ca2986 100644
--- a/test/Generator/DocBlock/Tag/ReturnTagTest.php
+++ b/test/Generator/DocBlock/Tag/ReturnTagTest.php
@@ -5,12 +5,11 @@
use Laminas\Code\Generator\DocBlock\Tag\ReturnTag;
use Laminas\Code\Generator\DocBlock\TagManager;
use Laminas\Code\Reflection\DocBlockReflection;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- */
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
class ReturnTagTest extends TestCase
{
/** @var ReturnTag */
diff --git a/test/Generator/DocBlock/Tag/ThrowsTagTest.php b/test/Generator/DocBlock/Tag/ThrowsTagTest.php
index e00786de..b90fa499 100644
--- a/test/Generator/DocBlock/Tag/ThrowsTagTest.php
+++ b/test/Generator/DocBlock/Tag/ThrowsTagTest.php
@@ -5,12 +5,11 @@
use Laminas\Code\Generator\DocBlock\Tag\ThrowsTag;
use Laminas\Code\Generator\DocBlock\TagManager;
use Laminas\Code\Reflection\DocBlockReflection;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- */
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
class ThrowsTagTest extends TestCase
{
/** @var ThrowsTag */
diff --git a/test/Generator/DocBlock/Tag/TypableTagTest.php b/test/Generator/DocBlock/Tag/TypableTagTest.php
index 70851906..01b51d1e 100644
--- a/test/Generator/DocBlock/Tag/TypableTagTest.php
+++ b/test/Generator/DocBlock/Tag/TypableTagTest.php
@@ -3,12 +3,11 @@
namespace LaminasTest\Code\Generator\DocBlock\Tag;
use LaminasTest\Code\Generator\TestAsset\TypeableTag;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- */
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
class TypableTagTest extends TestCase
{
/** @var TypeableTag */
diff --git a/test/Generator/DocBlock/Tag/VarTagTest.php b/test/Generator/DocBlock/Tag/VarTagTest.php
index e714a6c8..98b39cad 100644
--- a/test/Generator/DocBlock/Tag/VarTagTest.php
+++ b/test/Generator/DocBlock/Tag/VarTagTest.php
@@ -6,11 +6,10 @@
use Laminas\Code\Generator\DocBlock\TagManager;
use Laminas\Code\Reflection\DocBlock\Tag\VarTag as ReflectionVarTag;
use Laminas\Code\Reflection\DocBlockReflection;
+use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\TestCase;
-/**
- * @covers \Laminas\Code\Generator\DocBlock\Tag\VarTag
- */
+#[CoversClass(VarTag::class)]
class VarTagTest extends TestCase
{
private VarTag $tag;
diff --git a/test/Generator/DocBlockGeneratorTest.php b/test/Generator/DocBlockGeneratorTest.php
index b8aa0157..78d5e943 100644
--- a/test/Generator/DocBlockGeneratorTest.php
+++ b/test/Generator/DocBlockGeneratorTest.php
@@ -9,12 +9,12 @@
use Laminas\Code\Generator\DocBlock\Tag\ReturnTag;
use Laminas\Code\Generator\DocBlockGenerator;
use Laminas\Code\Reflection\DocBlockReflection;
+use PHPUnit\Framework\Attributes\Depends;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- */
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
class DocBlockGeneratorTest extends TestCase
{
/** @var DocBlockGenerator */
@@ -116,9 +116,7 @@ public function testCreateFromArray()
self::assertCount(1, $docBlock->getTags());
}
- /**
- * @group #3753
- */
+ #[Group('#3753')]
public function testGenerateWordWrapIsEnabledByDefault()
{
$largeStr = '@var This is a very large string that will be wrapped if it contains more than 80 characters';
@@ -131,9 +129,7 @@ public function testGenerateWordWrapIsEnabledByDefault()
self::assertSame($expected, $this->docBlockGenerator->generate());
}
- /**
- * @group #3753
- */
+ #[Group('#3753')]
public function testGenerateWithWordWrapDisabled()
{
$largeStr = '@var This is a very large string that will not be wrapped if it contains more than 80 characters';
@@ -161,36 +157,28 @@ public function testDocBlockFromReflectionTagsCount()
self::assertCount(4, $this->reflectionDocBlockGenerator->getTags());
}
- /**
- * @depends testDocBlockFromReflectionTagsCount
- */
+ #[Depends('testDocBlockFromReflectionTagsCount')]
public function testDocBlockFromReflectionParamTag()
{
$tags = $this->reflectionDocBlockGenerator->getTags();
self::assertInstanceOf(ParamTag::class, $tags[0]);
}
- /**
- * @depends testDocBlockFromReflectionTagsCount
- */
+ #[Depends('testDocBlockFromReflectionTagsCount')]
public function testDocBlockFromReflectionAuthorTag()
{
$tags = $this->reflectionDocBlockGenerator->getTags();
self::assertInstanceOf(AuthorTag::class, $tags[1]);
}
- /**
- * @depends testDocBlockFromReflectionTagsCount
- */
+ #[Depends('testDocBlockFromReflectionTagsCount')]
public function testDocBlockFromReflectionLicenseTag()
{
$tags = $this->reflectionDocBlockGenerator->getTags();
self::assertInstanceOf(LicenseTag::class, $tags[2]);
}
- /**
- * @depends testDocBlockFromReflectionTagsCount
- */
+ #[Depends('testDocBlockFromReflectionTagsCount')]
public function testDocBlockFromReflectionReturnTag()
{
$tags = $this->reflectionDocBlockGenerator->getTags();
diff --git a/test/Generator/EnumGeneratorTest.php b/test/Generator/EnumGeneratorTest.php
index 0122c1ad..0b4ab32e 100644
--- a/test/Generator/EnumGeneratorTest.php
+++ b/test/Generator/EnumGeneratorTest.php
@@ -4,6 +4,7 @@
use InvalidArgumentException;
use Laminas\Code\Generator\EnumGenerator\EnumGenerator;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use ReflectionEnum;
@@ -12,7 +13,6 @@
final class EnumGeneratorTest extends TestCase
{
/**
- * @dataProvider validOptionSpecifications
* @psalm-param array{
* name: non-empty-string,
* pureCases: list,
@@ -24,6 +24,7 @@ final class EnumGeneratorTest extends TestCase
* },
* } $options
*/
+ #[DataProvider('validOptionSpecifications')]
public function testGenerateValidEnums(array $options, string $expected): void
{
self::assertSame($expected, EnumGenerator::withConfig($options)->generate());
@@ -123,22 +124,11 @@ enum Suit: int {
];
}
- /** @requires PHP < 8.1 */
- public function testReflectionEnumFailsForUnsupportedPhpVersions(): void
- {
- $this->expectException(InvalidArgumentException::class);
- $this->expectExceptionMessage('This feature only works from PHP 8.1 onwards.');
-
- EnumGenerator::fromReflection(new ReflectionEnum(new class {
- }));
- }
-
/**
- * @requires PHP >= 8.1
- * @dataProvider validEnumSpecifications
* @psalm-param non-empty-string $enumClass
* @psalm-param non-empty-string $expected
*/
+ #[DataProvider('validEnumSpecifications')]
public function testReflectionEnumWorks(string $enumClass, string $expected): void
{
if (! class_exists($enumClass, false)) {
diff --git a/test/Generator/FileGeneratorTest.php b/test/Generator/FileGeneratorTest.php
index 367e6252..d1015b6d 100644
--- a/test/Generator/FileGeneratorTest.php
+++ b/test/Generator/FileGeneratorTest.php
@@ -7,6 +7,7 @@
use Laminas\Code\Generator\ClassGenerator;
use Laminas\Code\Generator\Exception\ClassNotFoundException;
use Laminas\Code\Generator\FileGenerator;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use stdClass;
@@ -18,17 +19,15 @@
use function strrpos;
use function sys_get_temp_dir;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- * @group Laminas_Code_Generator_Php_File
- */
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
+#[Group('Laminas_Code_Generator_Php_File')]
class FileGeneratorTest extends TestCase
{
public function testConstruction()
{
$file = new FileGenerator();
- self::assertSame(FileGenerator::class, get_class($file));
+ self::assertSame(FileGenerator::class, $file::class);
}
public function testSourceContentGetterAndSetter()
@@ -86,9 +85,7 @@ public function testClassNotFoundException()
$fileGenerator->getClass('TestClass');
}
- /**
- * @group test
- */
+ #[Group('test')]
public function testFileLineEndingsAreAlwaysLineFeed()
{
$codeGenFile = FileGenerator::fromArray([
@@ -109,9 +106,7 @@ public function testFileLineEndingsAreAlwaysLineFeed()
self::assertSame(';', $lines[2][$targetLength - 1]);
}
- /**
- * @group Laminas-11218
- */
+ #[Group('Laminas-11218')]
public function testGeneratesUseStatements()
{
$file = new FileGenerator();
@@ -358,7 +353,7 @@ public function testWrongDeclareTypeShouldRaiseException(): void
$generator->setDeclares([new stdClass()]);
}
- /** @group gh-42 */
+ #[Group('gh-42')]
public function testDeclareStatementsArePutBeforeNamespace(): void
{
$generator = new FileGenerator();
diff --git a/test/Generator/InterfaceGeneratorTest.php b/test/Generator/InterfaceGeneratorTest.php
index 92e286ec..4afba156 100644
--- a/test/Generator/InterfaceGeneratorTest.php
+++ b/test/Generator/InterfaceGeneratorTest.php
@@ -12,12 +12,11 @@
use Laminas\Code\Generator\PropertyGenerator;
use Laminas\Code\Reflection\ClassReflection;
use LaminasTest\Code\TestAsset\FooInterface;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- */
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
class InterfaceGeneratorTest extends TestCase
{
public function testAbstractAccessorsReturnsFalse()
@@ -125,9 +124,7 @@ interface MyInterface
self::assertSame($expected, $classGeneratorClass->generate());
}
- /**
- * @group namespace
- */
+ #[Group('namespace')]
public function testCodeGenerationShouldTakeIntoAccountNamespacesFromReflection()
{
$reflClass = new ClassReflection(FooInterface::class);
@@ -152,9 +149,7 @@ public function fooBarBaz();
self::assertSame($expected, $received, $received);
}
- /**
- * @group namespace
- */
+ #[Group('namespace')]
public function testSetNameShouldDetermineIfNamespaceSegmentIsPresent()
{
$classGeneratorClass = new InterfaceGenerator();
@@ -162,9 +157,7 @@ public function testSetNameShouldDetermineIfNamespaceSegmentIsPresent()
self::assertSame('My\Namespaced', $classGeneratorClass->getNamespaceName());
}
- /**
- * @group namespace
- */
+ #[Group('namespace')]
public function testPassingANamespacedClassnameShouldGenerateANamespaceDeclaration()
{
$classGeneratorClass = new InterfaceGenerator();
@@ -173,9 +166,7 @@ public function testPassingANamespacedClassnameShouldGenerateANamespaceDeclarati
self::assertStringContainsString('namespace My\Namespaced;', $received, $received);
}
- /**
- * @group namespace
- */
+ #[Group('namespace')]
public function testPassingANamespacedClassnameShouldGenerateAClassnameWithoutItsNamespace()
{
$classGeneratorClass = new InterfaceGenerator();
diff --git a/test/Generator/MethodGeneratorTest.php b/test/Generator/MethodGeneratorTest.php
index 8c0ea7b1..27402ebe 100644
--- a/test/Generator/MethodGeneratorTest.php
+++ b/test/Generator/MethodGeneratorTest.php
@@ -17,6 +17,8 @@
use LaminasTest\Code\TestAsset\ObjectHintsClass;
use LaminasTest\Code\TestAsset\Php80Types;
use LaminasTest\Code\TestAsset\ReturnTypeHintedClass;
+use PHPUnit\Framework\Attributes\DataProvider;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use stdClass;
@@ -25,10 +27,8 @@
use function array_shift;
use function array_values;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- */
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
class MethodGeneratorTest extends TestCase
{
public function testMethodConstructor()
@@ -135,7 +135,6 @@ protected function withParamsAndReturnType($mixed, array $array, ?callable $call
self::assertSame($target, (string) $methodGenerator);
}
- /** @requires PHP >= 8.0 */
public function testCopyMethodSignatureForPromotedParameter(): void
{
$ref = new MethodReflection(TestAsset\ClassWithPromotedParameter::class, '__construct');
@@ -194,9 +193,7 @@ public function someMethod()
self::assertSame($target, (string) $methodGenerator);
}
- /**
- * @group Laminas-6444
- */
+ #[Group('Laminas-6444')]
public function testMethodWithStaticModifierIsEmitted()
{
$methodGenerator = new MethodGenerator();
@@ -214,9 +211,7 @@ public static function foo(\$one)
self::assertSame($expected, $methodGenerator->generate());
}
- /**
- * @group Laminas-6444
- */
+ #[Group('Laminas-6444')]
public function testMethodWithFinalModifierIsEmitted()
{
$methodGenerator = new MethodGenerator();
@@ -233,9 +228,7 @@ final public function foo(\$one)
self::assertSame($expected, $methodGenerator->generate());
}
- /**
- * @group Laminas-6444
- */
+ #[Group('Laminas-6444')]
public function testMethodWithFinalModifierIsNotEmittedWhenMethodIsAbstract()
{
$methodGenerator = new MethodGenerator();
@@ -250,9 +243,7 @@ abstract public function foo(\$one);
self::assertSame($expected, $methodGenerator->generate());
}
- /**
- * @group Laminas-7205
- */
+ #[Group('Laminas-7205')]
public function testMethodCanHaveDocBlock()
{
$methodGeneratorProperty = new MethodGenerator(
@@ -275,9 +266,7 @@ protected static function someFoo()
self::assertSame($expected, $methodGeneratorProperty->generate());
}
- /**
- * @group Laminas-7268
- */
+ #[Group('Laminas-7268')]
public function testDefaultValueGenerationDoesNotIncludeTrailingSemicolon()
{
$method = new MethodGenerator('setOptions');
@@ -319,11 +308,10 @@ public function testCreateFromArray()
}
/**
- * @dataProvider returnsReferenceValues
- * @param bool|string|int $value
* @param bool $expected
*/
- public function testCreateFromArrayWithReturnsReference($value, $expected): void
+ #[DataProvider('returnsReferenceValues')]
+ public function testCreateFromArrayWithReturnsReference(bool|string|int $value, $expected): void
{
$methodGenerator = MethodGenerator::fromArray([
'name' => 'SampleMethod',
@@ -376,9 +364,7 @@ public function execute(\Runnable $command);
self::assertInstanceOf(DocBlockGenerator::class, $methodGenerator->getDocBlock());
}
- /**
- * @group zendframework/zend-code#29
- */
+ #[Group('zendframework/zend-code#29')]
public function testSetReturnType()
{
$methodGenerator = new MethodGenerator();
@@ -395,9 +381,7 @@ public function foo() : \bar
self::assertSame($expected, $methodGenerator->generate());
}
- /**
- * @group zendframework/zend-code#29
- */
+ #[Group('zendframework/zend-code#29')]
public function testSetReturnTypeWithNull()
{
$methodGenerator = new MethodGenerator();
@@ -415,12 +399,12 @@ public function foo()
}
/**
- * @group zendframework/zend-code#29
- * @dataProvider returnTypeHintClasses
* @param string $className
* @param string $methodName
* @param string $expectedReturnSignature
*/
+ #[DataProvider('returnTypeHintClasses')]
+ #[Group('zendframework/zend-code#29')]
public function testFrom($className, $methodName, $expectedReturnSignature)
{
$methodGenerator = MethodGenerator::fromReflection(new MethodReflection($className, $methodName));
@@ -470,9 +454,7 @@ public static function returnTypeHintClasses()
];
}
- /**
- * @group zendframework/zend-code#29
- */
+ #[Group('zendframework/zend-code#29')]
public function testByRefReturnType()
{
$methodGenerator = new MethodGenerator('foo');
@@ -486,9 +468,7 @@ public function testByRefReturnType()
self::assertStringMatchesFormat('%Apublic function foo()%A', $methodGenerator->generate());
}
- /**
- * @group zendframework/zend-code#29
- */
+ #[Group('zendframework/zend-code#29')]
public function testFromByReferenceMethodReflection()
{
$methodGenerator = MethodGenerator::fromReflection(
@@ -499,13 +479,12 @@ public function testFromByReferenceMethodReflection()
}
/**
- * @requires PHP >= 8.0
- * @group laminas/laminas-code#53
- * @dataProvider php80Methods
* @psalm-param class-string $className
* @psalm-param non-empty-string $method
* @psalm-param non-empty-string $expectedGeneratedSignature
*/
+ #[DataProvider('php80Methods')]
+ #[Group('laminas/laminas-code#53')]
public function testGeneratedReturnTypeForPhp80ReturnType(
string $className,
string $method,
diff --git a/test/Generator/ParameterGeneratorTest.php b/test/Generator/ParameterGeneratorTest.php
index 56a483b1..46d1029c 100644
--- a/test/Generator/ParameterGeneratorTest.php
+++ b/test/Generator/ParameterGeneratorTest.php
@@ -20,7 +20,11 @@
use LaminasTest\Code\TestAsset\ObjectHintsClass;
use LaminasTest\Code\TestAsset\Php80Types;
use LaminasTest\Code\TestAsset\VariadicParametersClass;
+use Namespaced\TypeHint\Bar;
use Phar;
+use PHPUnit\Framework\Attributes\CoversNothing;
+use PHPUnit\Framework\Attributes\DataProvider;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use ReflectionProperty;
use stdClass;
@@ -33,10 +37,8 @@
use function strpos;
use function strtolower;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- */
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
class ParameterGeneratorTest extends TestCase
{
public function testTypeGetterAndSetterPersistValue()
@@ -114,24 +116,6 @@ public function testFromReflectionGetDefaultValue()
self::assertSame('\'foo\'', (string) $defaultValue);
}
- /**
- * @group 95
- * @requires PHP < 8.1
- */
- public function testFromReflectionGetDefaultValueNotOptional()
- {
- $method = new MethodReflection(ParameterClass::class, 'defaultObjectEqualsNullAndNotOptional');
-
- $params = $method->getParameters();
-
- self::assertCount(2, $params);
-
- $firstParameter = ParameterGenerator::fromReflection($params[0]);
- $valueGenerator = $firstParameter->getDefaultValue();
- self::assertInstanceOf(ValueGenerator::class, $valueGenerator);
- self::assertNull($valueGenerator->getSourceContent());
- }
-
public function testFromReflectionGetArrayHint()
{
$reflectionParameter = $this->getFirstReflectionParameter('fromArray');
@@ -159,10 +143,10 @@ public function testCallableTypeHint()
}
/**
- * @dataProvider dataFromReflectionGenerate
* @param string $methodName
* @param string $expectedCode
*/
+ #[DataProvider('dataFromReflectionGenerate')]
public function testFromReflectionGenerate($methodName, $expectedCode)
{
$reflectionParameter = $this->getFirstReflectionParameter($methodName);
@@ -241,9 +225,7 @@ public function testCreateFromArray()
self::assertTrue($reflectionOmitDefaultValue->getValue($parameterGenerator));
}
- /**
- * @group 4988
- */
+ #[Group('4988')]
public function testParameterGeneratorReturnsCorrectTypeForNonNamespaceClasses()
{
require_once __DIR__ . '/../TestAsset/NonNamespaceClass.php';
@@ -256,25 +238,21 @@ public function testParameterGeneratorReturnsCorrectTypeForNonNamespaceClasses()
self::assertSame('LaminasTest_Code_NsTest_BarClass', $param->getType());
}
- /**
- * @group 5193
- */
+ #[Group('5193')]
public function testTypehintsWithNamespaceInNamepsacedClassReturnTypewithBackslash()
{
require_once __DIR__ . '/TestAsset/NamespaceTypeHintClass.php';
- $reflClass = new ClassReflection('Namespaced\TypeHint\Bar');
+ $reflClass = new ClassReflection(Bar::class);
$params = $reflClass->getMethod('method')->getParameters();
$param = ParameterGenerator::fromReflection($params[0]);
- self::assertSame('OtherNamespace\ParameterClass', $param->getType());
+ self::assertSame(\OtherNamespace\ParameterClass::class, $param->getType());
}
- /**
- * @group 6023
- * @coversNothing
- */
+ #[Group('6023')]
+ #[CoversNothing]
public function testGeneratedParametersHaveEscapedDefaultValues()
{
$parameter = new ParameterGenerator();
@@ -287,11 +265,11 @@ public function testGeneratedParametersHaveEscapedDefaultValues()
}
/**
- * @group zendframework/zend-code#29
- * @dataProvider simpleHints
* @param string $type
* @param string $expectedType
*/
+ #[DataProvider('simpleHints')]
+ #[Group('zendframework/zend-code#29')]
public function testGeneratesSimpleHints($type, $expectedType)
{
$parameter = new ParameterGenerator();
@@ -330,10 +308,10 @@ public static function simpleHints()
}
/**
- * @group zendframework/zend-code#29
- * @dataProvider validClassName
* @param string $className
*/
+ #[DataProvider('validClassName')]
+ #[Group('zendframework/zend-code#29')]
public function testTypeHintWithValidClassName($className)
{
$parameter = new ParameterGenerator();
@@ -366,13 +344,13 @@ public static function validClassName()
}
/**
- * @group zendframework/zend-code#29
- * @dataProvider reflectionHints
* @param string $className
* @param string $methodName
* @param string $parameterName
* @param string|null $expectedType
*/
+ #[DataProvider('reflectionHints')]
+ #[Group('zendframework/zend-code#29')]
public function testTypeHintFromReflection($className, $methodName, $parameterName, $expectedType)
{
$parameter = ParameterGenerator::fromReflection(new ParameterReflection(
@@ -390,13 +368,13 @@ public function testTypeHintFromReflection($className, $methodName, $parameterNa
}
/**
- * @group zendframework/zend-code#29
- * @dataProvider reflectionHints
* @param string $className
* @param string $methodName
* @param string $parameterName
* @param string|null $expectedType
*/
+ #[DataProvider('reflectionHints')]
+ #[Group('zendframework/zend-code#29')]
public function testTypeHintFromReflectionGeneratedCode($className, $methodName, $parameterName, $expectedType)
{
$parameter = ParameterGenerator::fromReflection(new ParameterReflection(
@@ -487,13 +465,13 @@ public static function reflectionHints()
}
/**
- * @group zendframework/zend-code#29
- * @dataProvider variadicHints
* @param string $className
* @param string $methodName
* @param string $parameterName
* @param string $expectedGeneratedSignature
*/
+ #[DataProvider('variadicHints')]
+ #[Group('zendframework/zend-code#29')]
public function testVariadicArgumentFromReflection(
$className,
$methodName,
@@ -538,9 +516,7 @@ public static function variadicHints()
];
}
- /**
- * @group zendframework/zend-code#29
- */
+ #[Group('zendframework/zend-code#29')]
public function testSetGetVariadic()
{
$parameter = new ParameterGenerator('foo');
@@ -590,9 +566,7 @@ public function testMakingParameterVariadicWithExistingDefaultValueThrowsInvalid
$parameter->setVariadic(true);
}
- /**
- * @group zendframework/zend-code#29
- */
+ #[Group('zendframework/zend-code#29')]
public function testGetInternalClassDefaultParameterValue()
{
$parameter = ParameterGenerator::fromReflection(new ParameterReflection([Phar::class, 'compress'], 1));
@@ -601,14 +575,13 @@ public function testGetInternalClassDefaultParameterValue()
}
/**
- * @requires PHP >= 8.0
- * @group laminas/laminas-code#53
- * @dataProvider php80Methods
* @psalm-param class-string $className
* @psalm-param non-empty-string $method
* @psalm-param positive-int|0 $parameterIndex
* @psalm-param non-empty-string $expectedGeneratedSignature
*/
+ #[DataProvider('php80Methods')]
+ #[Group('laminas/laminas-code#53')]
public function testGeneratedSignatureForPhp80ParameterType(
string $className,
string $method,
diff --git a/test/Generator/PropertyGeneratorTest.php b/test/Generator/PropertyGeneratorTest.php
index e51b21c1..87ce7cd9 100644
--- a/test/Generator/PropertyGeneratorTest.php
+++ b/test/Generator/PropertyGeneratorTest.php
@@ -14,6 +14,8 @@
use Laminas\Code\Reflection\ClassReflection;
use Laminas\Code\Reflection\PropertyReflection;
use LaminasTest\Code\Generator\TestAsset\ClassWithTypedProperty;
+use PHPUnit\Framework\Attributes\DataProvider;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use ReflectionProperty;
use stdClass;
@@ -23,10 +25,8 @@
use function str_replace;
use function uniqid;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- */
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
class PropertyGeneratorTest extends TestCase
{
public function testPropertyConstructor(): void
@@ -55,11 +55,8 @@ public static function dataSetTypeSetValueGenerate(): array
];
}
- /**
- * @dataProvider dataSetTypeSetValueGenerate
- * @param mixed $value
- */
- public function testSetTypeSetValueGenerate(string $type, $value, string $code): void
+ #[DataProvider('dataSetTypeSetValueGenerate')]
+ public function testSetTypeSetValueGenerate(string $type, mixed $value, string $code): void
{
$defaultValue = new PropertyValueGenerator();
$defaultValue->setType($type);
@@ -69,11 +66,8 @@ public function testSetTypeSetValueGenerate(string $type, $value, string $code):
self::assertSame($code, $defaultValue->generate());
}
- /**
- * @dataProvider dataSetTypeSetValueGenerate
- * @param mixed $value
- */
- public function testSetBogusTypeSetValueGenerateUseAutoDetection(string $type, $value, string $code): void
+ #[DataProvider('dataSetTypeSetValueGenerate')]
+ public function testSetBogusTypeSetValueGenerateUseAutoDetection(string $type, mixed $value, string $code): void
{
if ('constant' === $type) {
self::markTestSkipped('constant can only be detected explicitly');
@@ -129,9 +123,7 @@ public static function visibility(): Generator
yield 'private' => [PropertyGenerator::FLAG_PRIVATE, 'private'];
}
- /**
- * @dataProvider visibility
- */
+ #[DataProvider('visibility')]
public function testPropertyCanProduceConstantWithVisibility(int $flag, string $visibility): void
{
$codeGenProperty = new PropertyGenerator('FOO', 'bar', [PropertyGenerator::FLAG_CONSTANT, $flag]);
@@ -154,9 +146,7 @@ public function testPropertyCanProduceFinalConstantModifier(): void
self::assertSame(' final public const someVal = \'some string value\';', $codeGenProperty->generate());
}
- /**
- * @dataProvider visibility
- */
+ #[DataProvider('visibility')]
public function testPropertyCanProduceReadonlyModifier(int $flag, string $visibility): void
{
$codeGenProperty = new PropertyGenerator(
@@ -191,9 +181,7 @@ public function testFailToProduceReadonlyConstant(): void
$codeGenProperty->setFlags(PropertyGenerator::FLAG_READONLY | PropertyGenerator::FLAG_CONSTANT);
}
- /**
- * @group PR-704
- */
+ #[Group('PR-704')]
public function testPropertyCanProduceConstantModifierWithSetter(): void
{
$codeGenProperty = new PropertyGenerator('someVal', 'some string value');
@@ -207,9 +195,7 @@ public function testPropertyCanProduceStaticModifier(): void
self::assertSame(' public static $someVal = \'some string value\';', $codeGenProperty->generate());
}
- /**
- * @group Laminas-6444
- */
+ #[Group('Laminas-6444')]
public function testPropertyWillLoadFromReflection(): void
{
$reflectionClass = new ClassReflection(TestAsset\TestClassWithManyProperties::class);
@@ -238,9 +224,7 @@ public function testPropertyWillLoadFromReflection(): void
self::assertSame('private', $cgProp->getVisibility());
}
- /**
- * @group Laminas-6444
- */
+ #[Group('Laminas-6444')]
public function testPropertyWillEmitStaticModifier(): void
{
$codeGenProperty = new PropertyGenerator(
@@ -251,9 +235,7 @@ public function testPropertyWillEmitStaticModifier(): void
self::assertSame(' protected static $someVal = \'some string value\';', $codeGenProperty->generate());
}
- /**
- * @group Laminas-7205
- */
+ #[Group('Laminas-7205')]
public function testPropertyCanHaveDocBlock(): void
{
$codeGenProperty = new PropertyGenerator(
@@ -335,9 +317,7 @@ public function testCreateReadonlyFromArray(): void
self::assertSame(PropertyGenerator::VISIBILITY_PUBLIC, $propertyGenerator->getVisibility());
}
- /**
- * @group 3491
- */
+ #[Group('3491')]
public function testPropertyDocBlockWillLoadFromReflection(): void
{
$reflectionClass = new ClassReflection(TestAsset\TestClassWithManyProperties::class);
@@ -357,11 +337,8 @@ public function testPropertyDocBlockWillLoadFromReflection(): void
self::assertSame('var', $tag->getName());
}
- /**
- * @dataProvider dataSetTypeSetValueGenerate
- * @param mixed $value
- */
- public function testSetDefaultValue(string $type, $value): void
+ #[DataProvider('dataSetTypeSetValueGenerate')]
+ public function testSetDefaultValue(string $type, mixed $value): void
{
$property = new PropertyGenerator();
$property->setDefaultValue($value, $type);
@@ -401,7 +378,6 @@ public function testFromReflectionWithTypeHintInTypedProperty(): void
self::assertSame(' private string $typedProperty;', $code);
}
- /** @requires PHP >= 8.1 */
public function testFromReflectionReadonlyProperty(): void
{
$className = uniqid('ClassWithReadonlyProperty', false);
diff --git a/test/Generator/PropertyValueGeneratorTest.php b/test/Generator/PropertyValueGeneratorTest.php
index 4d1fbcdd..e02ab317 100644
--- a/test/Generator/PropertyValueGeneratorTest.php
+++ b/test/Generator/PropertyValueGeneratorTest.php
@@ -3,12 +3,11 @@
namespace LaminasTest\Code\Generator;
use Laminas\Code\Generator\PropertyValueGenerator;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- */
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
class PropertyValueGeneratorTest extends TestCase
{
public function testPropertyValueAddsSemicolonToValueGenerator()
diff --git a/test/Generator/TraitGeneratorTest.php b/test/Generator/TraitGeneratorTest.php
index a1a1c644..2317cfb0 100644
--- a/test/Generator/TraitGeneratorTest.php
+++ b/test/Generator/TraitGeneratorTest.php
@@ -13,6 +13,7 @@
use Laminas\Code\Generator\TraitGenerator;
use Laminas\Code\Reflection\ClassReflection;
use LaminasTest\Code\Generator\TestAsset\PrototypeClass;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use ReflectionClass;
use ReflectionException;
@@ -21,10 +22,8 @@
use function current;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- */
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
class TraitGeneratorTest extends TestCase
{
public function testConstruction(): void
@@ -193,9 +192,7 @@ public function testSetMethodNameAlreadyExistsThrowsException(): void
$classGenerator->addMethodFromGenerator($methodB);
}
- /**
- * @group Laminas-7361
- */
+ #[Group('Laminas-7361')]
public function testHasMethod(): void
{
$classGenerator = new TraitGenerator();
@@ -214,9 +211,7 @@ public function testRemoveMethod(): void
self::assertFalse($classGenerator->hasMethod('methodOne'));
}
- /**
- * @group Laminas-7361
- */
+ #[Group('Laminas-7361')]
public function testHasProperty(): void
{
$classGenerator = new TraitGenerator();
@@ -256,9 +251,7 @@ public function baz()
self::assertSame($expectedOutput, $output, $output);
}
- /**
- * @group Laminas-7909
- */
+ #[Group('Laminas-7909')]
public function testClassFromReflectionThatImplementsInterfaces(): void
{
$reflClass = new ClassReflection(TestAsset\ClassWithInterface::class);
@@ -272,9 +265,7 @@ public function testClassFromReflectionThatImplementsInterfaces(): void
self::assertStringContainsString($expectedClassDef, $code);
}
- /**
- * @group Laminas-7909
- */
+ #[Group('Laminas-7909')]
public function testClassFromReflectionDiscardParentImplementedInterfaces(): void
{
$reflClass = new ClassReflection(TestAsset\NewClassWithInterface::class);
@@ -288,9 +279,7 @@ public function testClassFromReflectionDiscardParentImplementedInterfaces(): voi
self::assertStringContainsString($expectedClassDef, $code);
}
- /**
- * @group 4988
- */
+ #[Group('4988')]
public function testNonNamespaceClassReturnsAllMethods(): void
{
require_once __DIR__ . '/../TestAsset/NonNamespaceClass.php';
@@ -308,9 +297,7 @@ public function testNamespacedClassReturnsAllMethods(): void
self::assertCount(1, $classGenerator->getMethods());
}
- /**
- * @group Laminas-9602
- */
+ #[Group('Laminas-9602')]
public function testSetextendedclassShouldIgnoreEmptyClassnameOnGenerate(): void
{
$classGeneratorClass = new TraitGenerator();
@@ -327,9 +314,7 @@ trait MyClass
self::assertSame($expected, $classGeneratorClass->generate());
}
- /**
- * @group Laminas-9602
- */
+ #[Group('Laminas-9602')]
public function testSetextendedclassShouldNotIgnoreNonEmptyClassnameOnGenerate(): void
{
$classGeneratorClass = new TraitGenerator();
@@ -346,9 +331,7 @@ trait MyClass
self::assertSame($expected, $classGeneratorClass->generate());
}
- /**
- * @group namespace
- */
+ #[Group('namespace')]
public function testCodeGenerationShouldTakeIntoAccountNamespacesFromReflection(): void
{
$reflClass = new ClassReflection(TestAsset\ClassWithNamespace::class);
@@ -367,9 +350,7 @@ trait ClassWithNamespace
self::assertSame($expected, $received, $received);
}
- /**
- * @group namespace
- */
+ #[Group('namespace')]
public function testSetNameShouldDetermineIfNamespaceSegmentIsPresent(): void
{
$classGeneratorClass = new TraitGenerator();
@@ -377,9 +358,7 @@ public function testSetNameShouldDetermineIfNamespaceSegmentIsPresent(): void
self::assertSame('My\Namespaced', $classGeneratorClass->getNamespaceName());
}
- /**
- * @group namespace
- */
+ #[Group('namespace')]
public function testPassingANamespacedClassnameShouldGenerateANamespaceDeclaration(): void
{
$classGeneratorClass = new TraitGenerator();
@@ -388,9 +367,7 @@ public function testPassingANamespacedClassnameShouldGenerateANamespaceDeclarati
self::assertStringContainsString('namespace My\Namespaced;', $received, $received);
}
- /**
- * @group namespace
- */
+ #[Group('namespace')]
public function testPassingANamespacedClassnameShouldGenerateAClassnameWithoutItsNamespace(): void
{
$classGeneratorClass = new TraitGenerator();
@@ -399,9 +376,7 @@ public function testPassingANamespacedClassnameShouldGenerateAClassnameWithoutIt
self::assertStringContainsString('trait FunClass', $received, $received);
}
- /**
- * @group Laminas-151
- */
+ #[Group('Laminas-151')]
public function testAddUses(): void
{
$classGenerator = new TraitGenerator();
@@ -414,9 +389,7 @@ public function testAddUses(): void
self::assertStringContainsString('use My\Second\Use\Class as MyAlias;', $generated);
}
- /**
- * @group 4990
- */
+ #[Group('4990')]
public function testAddOneUseTwiceOnlyAddsOne(): void
{
$classGenerator = new TraitGenerator();
@@ -430,9 +403,7 @@ public function testAddOneUseTwiceOnlyAddsOne(): void
self::assertStringContainsString('use My\First\Use\Class;', $generated);
}
- /**
- * @group 4990
- */
+ #[Group('4990')]
public function testAddOneUseWithAliasTwiceOnlyAddsOne(): void
{
$classGenerator = new TraitGenerator();
diff --git a/test/Generator/TypeGenerator/CompositeTypeTest.php b/test/Generator/TypeGenerator/CompositeTypeTest.php
index c063c8bc..990431df 100644
--- a/test/Generator/TypeGenerator/CompositeTypeTest.php
+++ b/test/Generator/TypeGenerator/CompositeTypeTest.php
@@ -5,14 +5,14 @@
namespace LaminasTest\Code\Generator\TypeGenerator;
use Laminas\Code\Generator\TypeGenerator\CompositeType;
+use PHPUnit\Framework\Attributes\CoversClass;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
-/** @covers \Laminas\Code\Generator\TypeGenerator\CompositeType */
+#[CoversClass(CompositeType::class)]
class CompositeTypeTest extends TestCase
{
- /**
- * @dataProvider validType
- */
+ #[DataProvider('validType')]
public function testFromValidTypeString(string $typeString, string $expectedReturnType): void
{
$type = CompositeType::fromString($typeString);
diff --git a/test/Generator/TypeGenerator/IntersectionTypeTest.php b/test/Generator/TypeGenerator/IntersectionTypeTest.php
index 31c15ba1..4921c253 100644
--- a/test/Generator/TypeGenerator/IntersectionTypeTest.php
+++ b/test/Generator/TypeGenerator/IntersectionTypeTest.php
@@ -7,16 +7,18 @@
use Laminas\Code\Generator\Exception\InvalidArgumentException;
use Laminas\Code\Generator\TypeGenerator\AtomicType;
use Laminas\Code\Generator\TypeGenerator\IntersectionType;
+use PHPUnit\Framework\Attributes\CoversClass;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
-/** @covers \Laminas\Code\Generator\TypeGenerator\IntersectionType */
+#[CoversClass(IntersectionType::class)]
class IntersectionTypeTest extends TestCase
{
/**
- * @dataProvider sortingExamples
* @param non-empty-list $types
* @param non-empty-string $expected
*/
+ #[DataProvider('sortingExamples')]
public function testTypeSorting(array $types, string $expected): void
{
self::assertSame(
@@ -58,9 +60,9 @@ public static function sortingExamples(): array
}
/**
- * @dataProvider invalidIntersectionsExamples
* @param non-empty-list $types
*/
+ #[DataProvider('invalidIntersectionsExamples')]
public function testWillRejectInvalidIntersections(array $types): void
{
$this->expectException(InvalidArgumentException::class);
diff --git a/test/Generator/TypeGenerator/UnionTypeTest.php b/test/Generator/TypeGenerator/UnionTypeTest.php
index 44edd74f..5d879149 100644
--- a/test/Generator/TypeGenerator/UnionTypeTest.php
+++ b/test/Generator/TypeGenerator/UnionTypeTest.php
@@ -8,16 +8,18 @@
use Laminas\Code\Generator\TypeGenerator\AtomicType;
use Laminas\Code\Generator\TypeGenerator\IntersectionType;
use Laminas\Code\Generator\TypeGenerator\UnionType;
+use PHPUnit\Framework\Attributes\CoversClass;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
-/** @covers \Laminas\Code\Generator\TypeGenerator\UnionType */
+#[CoversClass(UnionType::class)]
class UnionTypeTest extends TestCase
{
/**
- * @dataProvider sortingExamples
* @param non-empty-list $types
* @param non-empty-string $expected
*/
+ #[DataProvider('sortingExamples')]
public function testTypeSorting(array $types, string $expected): void
{
self::assertSame(
@@ -95,9 +97,9 @@ public static function sortingExamples(): array
}
/**
- * @dataProvider invalidUnionsExamples
* @param non-empty-list $types
*/
+ #[DataProvider('invalidUnionsExamples')]
public function testWillRejectInvalidUnions(array $types): void
{
$this->expectException(InvalidArgumentException::class);
diff --git a/test/Generator/TypeGeneratorTest.php b/test/Generator/TypeGeneratorTest.php
index 8ddd8ee6..9ffffcb5 100644
--- a/test/Generator/TypeGeneratorTest.php
+++ b/test/Generator/TypeGeneratorTest.php
@@ -5,6 +5,10 @@
use Laminas\Code\Exception\InvalidArgumentException;
use Laminas\Code\Generator\GeneratorInterface;
use Laminas\Code\Generator\TypeGenerator;
+use Laminas\Code\Generator\TypeGenerator\AtomicType;
+use PHPUnit\Framework\Attributes\CoversClass;
+use PHPUnit\Framework\Attributes\DataProvider;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use function array_combine;
@@ -16,11 +20,9 @@
use function str_starts_with;
use function strpos;
-/**
- * @group zendframework/zend-code#29
- * @covers \Laminas\Code\Generator\TypeGenerator
- * @covers \Laminas\Code\Generator\TypeGenerator\AtomicType
- */
+#[Group('zendframework/zend-code#29')]
+#[CoversClass(TypeGenerator::class)]
+#[CoversClass(AtomicType::class)]
class TypeGeneratorTest extends TestCase
{
public function testIsAGenerator()
@@ -28,24 +30,16 @@ public function testIsAGenerator()
self::assertContains(GeneratorInterface::class, class_implements(TypeGenerator::class));
}
- /**
- * @dataProvider validType
- * @param string $typeString
- * @param string $expectedReturnType
- */
- public function testFromValidTypeString($typeString, $expectedReturnType)
+ #[DataProvider('validType')]
+ public function testFromValidTypeString(string $typeString, string $expectedReturnType): void
{
$generator = TypeGenerator::fromTypeString($typeString);
self::assertSame($expectedReturnType, $generator->generate());
}
- /**
- * @dataProvider validType
- * @param string $typeString
- * @param string $expectedReturnType
- */
- public function testStringCastFromValidTypeString($typeString, $expectedReturnType)
+ #[DataProvider('validType')]
+ public function testStringCastFromValidTypeString(string $typeString, string $expectedReturnType): void
{
$generator = TypeGenerator::fromTypeString($typeString);
@@ -55,11 +49,8 @@ public function testStringCastFromValidTypeString($typeString, $expectedReturnTy
);
}
- /**
- * @dataProvider invalidType
- * @param string $typeString
- */
- public function testRejectsInvalidTypeString($typeString)
+ #[DataProvider('invalidType')]
+ public function testRejectsInvalidTypeString(string $typeString): void
{
$this->expectException(InvalidArgumentException::class);
diff --git a/test/Generator/ValueGeneratorTest.php b/test/Generator/ValueGeneratorTest.php
index c4646d7f..2486c8ec 100644
--- a/test/Generator/ValueGeneratorTest.php
+++ b/test/Generator/ValueGeneratorTest.php
@@ -13,17 +13,18 @@
use Laminas\Code\Generator\ValueGenerator;
use Laminas\Stdlib\ArrayObject as StdlibArrayObject;
use LaminasTest\Code\Generator\TestAsset\TestEnum;
+use PHPUnit\Framework\Attributes\CoversClass;
+use PHPUnit\Framework\Attributes\DataProvider;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use function fopen;
use function sprintf;
use function str_replace;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- * @covers \Laminas\Code\Generator\ValueGenerator
- */
+#[CoversClass(ValueGenerator::class)]
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
class ValueGeneratorTest extends TestCase
{
public function testDefaultInstance(): void
@@ -42,11 +43,8 @@ public function testInvalidConstantsType(): void
new ValueGenerator(null, ValueGenerator::TYPE_AUTO, ValueGenerator::OUTPUT_MULTIPLE_LINE, $constants);
}
- /**
- * @dataProvider constantsType
- * @param SplArrayObject|StdlibArrayObject $constants
- */
- public function testAllowedPossibleConstantsType($constants): void
+ #[DataProvider('constantsType')]
+ public function testAllowedPossibleConstantsType(SplArrayObject|StdlibArrayObject $constants): void
{
$valueGenerator = new ValueGenerator(
null,
@@ -71,10 +69,10 @@ public static function constantsType(): array
}
/**
- * @group #94
- * @dataProvider validConstantTypes
* @param string $expectedOutput
*/
+ #[DataProvider('validConstantTypes')]
+ #[Group('#94')]
public function testValidConstantTypes(PropertyValueGenerator $generator, $expectedOutput): void
{
$propertyGenerator = new PropertyGenerator('FOO', $generator);
@@ -83,7 +81,6 @@ public function testValidConstantTypes(PropertyValueGenerator $generator, $expec
}
/**
- * @return array
* @psalm-return non-empty-list
*/
public static function validConstantTypes(): array
@@ -126,7 +123,6 @@ public static function validConstantTypes(): array
/**
* @param string $longOutput
- * @param array $value
* @return array
*/
protected static function generateArrayData($longOutput, array $value)
@@ -336,11 +332,10 @@ public static function unsortedKeysArray()
}
/**
- * @dataProvider unsortedKeysArray
* @param string $type
- * @param array $value
* @param string $expected
*/
+ #[DataProvider('unsortedKeysArray')]
public function testPropertyDefaultValueCanHandleArrayWithUnsortedKeys($type, array $value, $expected)
{
$valueGenerator = new ValueGenerator();
@@ -405,11 +400,10 @@ public function testPropertyDefaultValueCanHandleEnums(): void
}
/**
- * @dataProvider simpleArray
* @param string $type
- * @param array $value
* @param string $expected
*/
+ #[DataProvider('simpleArray')]
public function testPropertyDefaultValueCanHandleArray($type, array $value, $expected)
{
$valueGenerator = new ValueGenerator();
@@ -436,11 +430,10 @@ public function testPropertyDefaultValueCanHandleUnquotedString()
}
/**
- * @dataProvider complexArray
* @param string $type
- * @param array $value
* @param string $expected
*/
+ #[DataProvider('complexArray')]
public function testPropertyDefaultValueCanHandleComplexArrayOfTypes($type, array $value, $expected)
{
$valueGenerator = new ValueGenerator();
@@ -451,9 +444,7 @@ public function testPropertyDefaultValueCanHandleComplexArrayOfTypes($type, arra
self::assertSame($expected, $valueGenerator->generate());
}
- /**
- * @dataProvider complexArrayWCustomIndent
- */
+ #[DataProvider('complexArrayWCustomIndent')]
public function testPropertyDefaultValueCanHandleComplexArrayWCustomIndentOfTypes(
string $type,
array $value,
@@ -468,11 +459,11 @@ public function testPropertyDefaultValueCanHandleComplexArrayWCustomIndentOfType
}
/**
- * @group 6023
- * @dataProvider getEscapedParameters
* @param string $input
* @param string $expectedEscapedValue
*/
+ #[DataProvider('getEscapedParameters')]
+ #[Group('6023')]
public function testEscaping($input, $expectedEscapedValue)
{
self::assertSame($expectedEscapedValue, ValueGenerator::escape($input, false));
@@ -498,11 +489,8 @@ public static function invalidValue(): Generator
yield 'resource' => [fopen('php://input', 'r'), 'resource (stream)'];
}
- /**
- * @dataProvider invalidValue
- * @param mixed $value
- */
- public function testExceptionInvalidValue($value, string $type): void
+ #[DataProvider('invalidValue')]
+ public function testExceptionInvalidValue(mixed $value, string $type): void
{
$valueGenerator = new ValueGenerator($value);
diff --git a/test/Generic/Prototype/PrototypeClassFactoryTest.php b/test/Generic/Prototype/PrototypeClassFactoryTest.php
index 12dac4d8..12e57fc4 100644
--- a/test/Generic/Prototype/PrototypeClassFactoryTest.php
+++ b/test/Generic/Prototype/PrototypeClassFactoryTest.php
@@ -5,27 +5,20 @@
use Laminas\Code\Generic\Prototype\PrototypeClassFactory;
use LaminasTest\Code\Generator\TestAsset\PrototypeClass;
use LaminasTest\Code\Generator\TestAsset\PrototypeGenericClass;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Code_Generator
- * @group Laminas_Code_Generator_Php
- */
+#[Group('Laminas_Code_Generator')]
+#[Group('Laminas_Code_Generator_Php')]
class PrototypeClassFactoryTest extends TestCase
{
- /** @var PrototypeClassFactory */
- protected $prototypeFactory;
+ protected PrototypeClassFactory $prototypeFactory;
protected function setUp(): void
{
$this->prototypeFactory = new PrototypeClassFactory();
}
- protected function tearDown(): void
- {
- $this->prototypeFactory = null;
- }
-
public function testAddAndGetPrototype()
{
$proto = new PrototypeClass();
@@ -45,7 +38,7 @@ public function testFallBackToGeneric()
public function testSetNameOnGenericIsCalledOnce()
{
$mockProto = $this->getMockBuilder(PrototypeGenericClass::class)
- ->setMethods(['setName'])
+ ->onlyMethods(['setName'])
->getMock();
$mockProto->expects($this->once())->method('setName')->willReturn('notexist');
$this->prototypeFactory->setGenericPrototype($mockProto);
diff --git a/test/Reflection/ClassReflectionTest.php b/test/Reflection/ClassReflectionTest.php
index 40f772d8..f94eb5e3 100644
--- a/test/Reflection/ClassReflectionTest.php
+++ b/test/Reflection/ClassReflectionTest.php
@@ -6,6 +6,7 @@
use Laminas\Code\Reflection\MethodReflection;
use Laminas\Code\Reflection\PropertyReflection;
use LaminasTest\Code\Reflection\TestAsset\TestTraitClass3;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use function array_shift;
@@ -13,10 +14,8 @@
use function trim;
use function uniqid;
-/**
- * @group Laminas_Reflection
- * @group Laminas_Reflection_Class
- */
+#[Group('Laminas_Reflection')]
+#[Group('Laminas_Reflection_Class')]
class ClassReflectionTest extends TestCase
{
public function testMethodReturns()
@@ -24,7 +23,7 @@ public function testMethodReturns()
$reflectionClass = new ClassReflection(TestAsset\TestSampleClass2::class);
$methodByName = $reflectionClass->getMethod('getProp1');
- self::assertEquals(MethodReflection::class, get_class($methodByName));
+ self::assertEquals(MethodReflection::class, $methodByName::class);
$methodsAll = $reflectionClass->getMethods();
self::assertCount(3, $methodsAll);
@@ -52,7 +51,7 @@ public function testParentReturn()
$reflectionClass = new ClassReflection(TestAsset\TestSampleClass::class);
$parent = $reflectionClass->getParentClass();
- self::assertEquals(ClassReflection::class, get_class($parent));
+ self::assertEquals(ClassReflection::class, $parent::class);
self::assertEquals('ArrayObject', $parent->getName());
}
diff --git a/test/Reflection/DocBlock/Tag/AuthorTagTest.php b/test/Reflection/DocBlock/Tag/AuthorTagTest.php
index bd2cb926..e2ebf46f 100644
--- a/test/Reflection/DocBlock/Tag/AuthorTagTest.php
+++ b/test/Reflection/DocBlock/Tag/AuthorTagTest.php
@@ -3,12 +3,11 @@
namespace LaminasTest\Code\Reflection\DocBlock\Tag;
use Laminas\Code\Reflection\DocBlock\Tag\AuthorTag;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Reflection
- * @group Laminas_Reflection_DocBlock
- */
+#[Group('Laminas_Reflection')]
+#[Group('Laminas_Reflection_DocBlock')]
class AuthorTagTest extends TestCase
{
/** @var AuthorTag */
diff --git a/test/Reflection/DocBlock/Tag/GenericTagTest.php b/test/Reflection/DocBlock/Tag/GenericTagTest.php
index 1421074b..307b3568 100644
--- a/test/Reflection/DocBlock/Tag/GenericTagTest.php
+++ b/test/Reflection/DocBlock/Tag/GenericTagTest.php
@@ -3,17 +3,14 @@
namespace LaminasTest\Code\Reflection\DocBlock\Tag;
use Laminas\Code\Reflection\DocBlock\Tag\GenericTag;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Reflection
- * @group Laminas_Reflection_DocBlock
- */
+#[Group('Laminas_Reflection')]
+#[Group('Laminas_Reflection_DocBlock')]
class GenericTagTest extends TestCase
{
- /**
- * @group Laminas-146
- */
+ #[Group('Laminas-146')]
public function testParse()
{
$tag = new GenericTag();
diff --git a/test/Reflection/DocBlock/Tag/LicenseTagTest.php b/test/Reflection/DocBlock/Tag/LicenseTagTest.php
index d3cb5244..7e1fc0a5 100644
--- a/test/Reflection/DocBlock/Tag/LicenseTagTest.php
+++ b/test/Reflection/DocBlock/Tag/LicenseTagTest.php
@@ -3,12 +3,11 @@
namespace LaminasTest\Code\Reflection\DocBlock\Tag;
use Laminas\Code\Reflection\DocBlock\Tag\LicenseTag;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Reflection
- * @group Laminas_Reflection_DocBlock
- */
+#[Group('Laminas_Reflection')]
+#[Group('Laminas_Reflection_DocBlock')]
class LicenseTagTest extends TestCase
{
/** @var LicenseTag */
diff --git a/test/Reflection/DocBlock/Tag/MethodTagTest.php b/test/Reflection/DocBlock/Tag/MethodTagTest.php
index b5957e46..d3e9ba6c 100644
--- a/test/Reflection/DocBlock/Tag/MethodTagTest.php
+++ b/test/Reflection/DocBlock/Tag/MethodTagTest.php
@@ -3,12 +3,11 @@
namespace LaminasTest\Code\Reflection\DocBlock\Tag;
use Laminas\Code\Reflection\DocBlock\Tag\MethodTag;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Reflection
- * @group Laminas_Reflection_DocBlock
- */
+#[Group('Laminas_Reflection')]
+#[Group('Laminas_Reflection_DocBlock')]
class MethodTagTest extends TestCase
{
public function testParseName()
diff --git a/test/Reflection/DocBlock/Tag/PropertyTagTest.php b/test/Reflection/DocBlock/Tag/PropertyTagTest.php
index 5752386c..5baa3928 100644
--- a/test/Reflection/DocBlock/Tag/PropertyTagTest.php
+++ b/test/Reflection/DocBlock/Tag/PropertyTagTest.php
@@ -3,12 +3,11 @@
namespace LaminasTest\Code\Reflection\DocBlock\Tag;
use Laminas\Code\Reflection\DocBlock\Tag\PropertyTag;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Reflection
- * @group Laminas_Reflection_DocBlock
- */
+#[Group('Laminas_Reflection')]
+#[Group('Laminas_Reflection_DocBlock')]
class PropertyTagTest extends TestCase
{
public function testParseName()
diff --git a/test/Reflection/DocBlock/Tag/ThrowsTagTest.php b/test/Reflection/DocBlock/Tag/ThrowsTagTest.php
index c3f21b9e..aeec33b3 100644
--- a/test/Reflection/DocBlock/Tag/ThrowsTagTest.php
+++ b/test/Reflection/DocBlock/Tag/ThrowsTagTest.php
@@ -3,12 +3,11 @@
namespace LaminasTest\Code\Reflection\DocBlock\Tag;
use Laminas\Code\Reflection\DocBlock\Tag\ThrowsTag;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Reflection
- * @group Laminas_Reflection_DocBlock
- */
+#[Group('Laminas_Reflection')]
+#[Group('Laminas_Reflection_DocBlock')]
class ThrowsTagTest extends TestCase
{
public function testAllCharactersFromTypenameAreSupported()
diff --git a/test/Reflection/DocBlock/Tag/VarTagTest.php b/test/Reflection/DocBlock/Tag/VarTagTest.php
index 099528aa..e5da1cda 100644
--- a/test/Reflection/DocBlock/Tag/VarTagTest.php
+++ b/test/Reflection/DocBlock/Tag/VarTagTest.php
@@ -3,17 +3,15 @@
namespace LaminasTest\Code\Reflection\DocBlock\Tag;
use Laminas\Code\Reflection\DocBlock\Tag\VarTag;
+use PHPUnit\Framework\Attributes\DataProvider;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Reflection
- * @group Laminas_Reflection_DocBlock
- */
+#[Group('Laminas_Reflection')]
+#[Group('Laminas_Reflection_DocBlock')]
class VarTagTest extends TestCase
{
- /**
- * @dataProvider varTagProvider
- */
+ #[DataProvider('varTagProvider')]
public function testParse(
string $line,
array $expectedTypes,
diff --git a/test/Reflection/DocBlockReflectionTest.php b/test/Reflection/DocBlockReflectionTest.php
index 5f5f16c4..45a6bb15 100644
--- a/test/Reflection/DocBlockReflectionTest.php
+++ b/test/Reflection/DocBlockReflectionTest.php
@@ -10,12 +10,11 @@
use Laminas\Code\Reflection\DocBlock\Tag\TagInterface;
use Laminas\Code\Reflection\DocBlock\Tag\ThrowsTag;
use Laminas\Code\Reflection\DocBlockReflection;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Reflection
- * @group Laminas_Reflection_DocBlock
- */
+#[Group('Laminas_Reflection')]
+#[Group('Laminas_Reflection_DocBlock')]
class DocBlockReflectionTest extends TestCase
{
public function testDocBlockShortDescription()
diff --git a/test/Reflection/FunctionReflectionTest.php b/test/Reflection/FunctionReflectionTest.php
index 7a976185..e3496554 100644
--- a/test/Reflection/FunctionReflectionTest.php
+++ b/test/Reflection/FunctionReflectionTest.php
@@ -6,16 +6,15 @@
use Laminas\Code\Reflection\Exception\InvalidArgumentException;
use Laminas\Code\Reflection\FunctionReflection;
use Laminas\Code\Reflection\ParameterReflection;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use function array_shift;
use function trim;
use function uniqid;
-/**
- * @group Laminas_Reflection
- * @group Laminas_Reflection_Function
- */
+#[Group('Laminas_Reflection')]
+#[Group('Laminas_Reflection_Function')]
class FunctionReflectionTest extends TestCase
{
public function testParemeterReturn()
@@ -118,6 +117,16 @@ public function testFunctionBodyReturn()
public function testFunctionClosureBodyReturn()
{
+ $function1 = null;
+ $function2 = null;
+ $function3 = null;
+ $function4 = null;
+ $list1 = [];
+ $list2 = [];
+ $list3 = [];
+ $function8 = null;
+ $function9 = null;
+ $function10 = null;
require __DIR__ . '/TestAsset/closures.php';
$function = new FunctionReflection($function1);
@@ -222,11 +231,12 @@ public function testFunctionContentsReturnWithoutDocBlock()
self::assertEquals('function function12() {}', trim($content));
}
- /**
- * @group fail
- */
+ #[Group('fail')]
public function testFunctionClosureContentsReturnWithoutDocBlock()
{
+ $function2 = null;
+ $function9 = null;
+ $function10 = null;
require __DIR__ . '/TestAsset/closures.php';
$function = new FunctionReflection($function2);
@@ -257,6 +267,7 @@ public function testFunctionContentsReturnWithDocBlock()
public function testFunctionClosureContentsReturnWithDocBlock()
{
+ $function9 = null;
require __DIR__ . '/TestAsset/closures.php';
$function = new FunctionReflection($function9);
diff --git a/test/Reflection/MethodReflectionTest.php b/test/Reflection/MethodReflectionTest.php
index 9d5a9d8b..80c85607 100644
--- a/test/Reflection/MethodReflectionTest.php
+++ b/test/Reflection/MethodReflectionTest.php
@@ -5,16 +5,15 @@
use Laminas\Code\Reflection\ClassReflection;
use Laminas\Code\Reflection\MethodReflection;
use Laminas\Code\Reflection\ParameterReflection;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use function array_shift;
use function trim;
use function uniqid;
-/**
- * @group Laminas_Reflection
- * @group Laminas_Reflection_Method
- */
+#[Group('Laminas_Reflection')]
+#[Group('Laminas_Reflection_Method')]
class MethodReflectionTest extends TestCase
{
public function testDeclaringClassReturn()
@@ -102,9 +101,7 @@ public function testInternalMethodContentsReturn()
self::assertEquals('', $reflectionMethod->getContents());
}
- /**
- * @group 6275
- */
+ #[Group('6275')]
public function testMethodContentsReturnWithoutDocBlock()
{
$contents = <<= 8.0 */
public function testGetPrototypeMethodForPromotedParameter(): void
{
$reflectionMethod = new MethodReflection(
@@ -316,9 +312,7 @@ public function testGetPrototypeMethodForPromotedParameter(): void
);
}
- /**
- * @group 5062
- */
+ #[Group('5062')]
public function testGetContentsWithCoreClass()
{
$reflectionMethod = new MethodReflection('DateTime', 'format');
@@ -343,9 +337,7 @@ public function testGetContentsReturnsEmptyContentsOnInternalCode()
self::assertSame('', $reflectionMethod->getContents());
}
- /**
- * @group 6275
- */
+ #[Group('6275')]
public function testCodeGetContentsDoesNotThrowExceptionOnDocBlock()
{
$contents = <<<'CONTENTS'
@@ -374,9 +366,7 @@ function getCacheKey() {
self::assertEquals($contents, $reflectionMethod->getContents(false));
}
- /**
- * @group 6275
- */
+ #[Group('6275')]
public function testCodeGetBodyReturnsEmptyWithCommentedFunction()
{
$this->expectException('ReflectionException');
@@ -384,9 +374,7 @@ public function testCodeGetBodyReturnsEmptyWithCommentedFunction()
$reflectionMethod->getBody();
}
- /**
- * @group 6620
- */
+ #[Group('6620')]
public function testCanParseClassBodyWhenUsingTrait()
{
require_once __DIR__ . '/TestAsset/TestTraitClass1.php';
diff --git a/test/Reflection/ParameterReflectionTest.php b/test/Reflection/ParameterReflectionTest.php
index cfd61f03..b1382e38 100644
--- a/test/Reflection/ParameterReflectionTest.php
+++ b/test/Reflection/ParameterReflectionTest.php
@@ -9,13 +9,13 @@
use LaminasTest\Code\TestAsset\ClassTypeHintedClass;
use LaminasTest\Code\TestAsset\DocBlockOnlyHintsClass;
use LaminasTest\Code\TestAsset\InternalHintsClass;
+use PHPUnit\Framework\Attributes\DataProvider;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use ReflectionType;
-/**
- * @group Laminas_Reflection
- * @group Laminas_Reflection_Parameter
- */
+#[Group('Laminas_Reflection')]
+#[Group('Laminas_Reflection_Parameter')]
class ParameterReflectionTest extends TestCase
{
public function testDeclaringClassReturn()
@@ -45,12 +45,8 @@ public function testClassReturn()
self::assertInstanceOf(ClassReflection::class, $parameter->getClass());
}
- /**
- * @dataProvider paramType
- * @param string $param
- * @param string $type
- */
- public function testTypeReturn($param, $type)
+ #[DataProvider('paramType')]
+ public function testTypeReturn(string $param, string $type): void
{
$parameter = new Reflection\ParameterReflection(
[TestAsset\TestSampleClass5::class, 'doSomething'],
@@ -61,9 +57,8 @@ public function testTypeReturn($param, $type)
/**
* This test covers type detection when not all params declared in phpDoc block
- *
- * @dataProvider paramTypeWithNotAllParamsDeclared
*/
+ #[DataProvider('paramTypeWithNotAllParamsDeclared')]
public function testTypeReturnWithNotAllParamsDeclared(string $param, string $type): void
{
$parameter = new Reflection\ParameterReflection(
@@ -112,16 +107,14 @@ public static function paramTypeWithNotAllParamsDeclared(): array
];
}
- /**
- * @group zendframework/zend-code#29
- * @dataProvider reflectionHints
- * @param string $className
- * @param string $methodName
- * @param string $parameterName
- * @param string $expectedType
- */
- public function testGetType($className, $methodName, $parameterName, $expectedType)
- {
+ #[Group('zendframework/zend-code#29')]
+ #[DataProvider('reflectionHints')]
+ public function testGetType(
+ string $className,
+ string $methodName,
+ string $parameterName,
+ string $expectedType
+ ): void {
$reflection = new Reflection\ParameterReflection(
[$className, $methodName],
$parameterName
@@ -133,16 +126,14 @@ public function testGetType($className, $methodName, $parameterName, $expectedTy
self::assertSame($expectedType, $type->getName());
}
- /**
- * @group zendframework/zend-code#29
- * @dataProvider reflectionHints
- * @param string $className
- * @param string $methodName
- * @param string $parameterName
- * @param string $expectedType
- */
- public function testDetectType($className, $methodName, $parameterName, $expectedType)
- {
+ #[Group('zendframework/zend-code#29')]
+ #[DataProvider('reflectionHints')]
+ public function testDetectType(
+ string $className,
+ string $methodName,
+ string $parameterName,
+ string $expectedType
+ ): void {
$reflection = new Reflection\ParameterReflection(
[$className, $methodName],
$parameterName
@@ -176,14 +167,9 @@ public static function reflectionHints()
];
}
- /**
- * @group zendframework/zend-code#29
- * @dataProvider docBlockHints
- * @param string $className
- * @param string $methodName
- * @param string $parameterName
- */
- public function testGetTypeWithDocBlockOnlyTypes($className, $methodName, $parameterName)
+ #[Group('zendframework/zend-code#29')]
+ #[DataProvider('docBlockHints')]
+ public function testGetTypeWithDocBlockOnlyTypes(string $className, string $methodName, string $parameterName): void
{
$reflection = new Reflection\ParameterReflection(
[$className, $methodName],
@@ -193,16 +179,14 @@ public function testGetTypeWithDocBlockOnlyTypes($className, $methodName, $param
self::assertNull($reflection->getType());
}
- /**
- * @group zendframework/zend-code#29
- * @dataProvider docBlockHints
- * @param string $className
- * @param string $methodName
- * @param string $parameterName
- * @param string $expectedType
- */
- public function testDetectTypeWithDocBlockOnlyTypes($className, $methodName, $parameterName, $expectedType)
- {
+ #[Group('zendframework/zend-code#29')]
+ #[DataProvider('docBlockHints')]
+ public function testDetectTypeWithDocBlockOnlyTypes(
+ string $className,
+ string $methodName,
+ string $parameterName,
+ string $expectedType
+ ): void {
$reflection = new Reflection\ParameterReflection(
[$className, $methodName],
$parameterName
@@ -229,7 +213,6 @@ public static function docBlockHints()
];
}
- /** @requires PHP >= 8.0 */
public function testPromotedParameter(): void
{
$reflection = new Reflection\ParameterReflection(
diff --git a/test/Reflection/PropertyReflectionTest.php b/test/Reflection/PropertyReflectionTest.php
index b31c688d..bbfcd066 100644
--- a/test/Reflection/PropertyReflectionTest.php
+++ b/test/Reflection/PropertyReflectionTest.php
@@ -4,12 +4,11 @@
use Laminas\Code\Reflection\ClassReflection;
use Laminas\Code\Reflection\PropertyReflection;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Reflection
- * @group Laminas_Reflection_Property
- */
+#[Group('Laminas_Reflection')]
+#[Group('Laminas_Reflection_Property')]
class PropertyReflectionTest extends TestCase
{
public function testDeclaringClassReturn()
diff --git a/test/Reflection/ReflectionDocBlockTagTest.php b/test/Reflection/ReflectionDocBlockTagTest.php
index f03fba44..460d55d9 100644
--- a/test/Reflection/ReflectionDocBlockTagTest.php
+++ b/test/Reflection/ReflectionDocBlockTagTest.php
@@ -4,13 +4,13 @@
use Laminas\Code\Generator\DocBlock\Tag\VarTag;
use Laminas\Code\Reflection;
+use PHPUnit\Framework\Attributes\DataProvider;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
-/**
- * @group Laminas_Reflection
- * @group Laminas_Reflection_DocBlock
- * @group Laminas_Reflection_DocBlock_Tag
- */
+#[Group('Laminas_Reflection')]
+#[Group('Laminas_Reflection_DocBlock')]
+#[Group('Laminas_Reflection_DocBlock_Tag')]
class ReflectionDocBlockTagTest extends TestCase
{
public function testTagDescriptionIsReturned()
@@ -90,9 +90,7 @@ public function testAllowsMultipleSpacesInDocBlockTagLine()
);
}
- /**
- * @group Laminas-8307
- */
+ #[Group('Laminas-8307')]
public function testNamespaceInParam()
{
$classReflection = new Reflection\ClassReflection(TestAsset\TestSampleClass7::class);
@@ -125,9 +123,7 @@ public function testAllowsMultipleSpacesInDocBlockTagLine2()
);
}
- /**
- * @group Laminas-8307
- */
+ #[Group('Laminas-8307')]
public function testReturnClassWithNamespace()
{
$classReflection = new Reflection\ClassReflection(TestAsset\TestSampleClass7::class);
@@ -137,9 +133,7 @@ public function testReturnClassWithNamespace()
self::assertEquals('Laminas\Code\Reflection\DocBlock', $paramTag->getType());
}
- /**
- * @dataProvider propertyVarDocProvider
- */
+ #[DataProvider('propertyVarDocProvider')]
public function testPropertyVarDoc(
string $property,
array $expectedTypes,
diff --git a/test/Scanner/DocBlockScannerTest.php b/test/Scanner/DocBlockScannerTest.php
index 0a696564..f1e3bcc6 100644
--- a/test/Scanner/DocBlockScannerTest.php
+++ b/test/Scanner/DocBlockScannerTest.php
@@ -3,18 +3,15 @@
namespace LaminasTest\Code\Scanner;
use Laminas\Code\Scanner\DocBlockScanner;
+use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use function str_replace;
-/**
- * @group Laminas_Code_Scanner
- */
+#[Group('Laminas_Code_Scanner')]
class DocBlockScannerTest extends TestCase
{
- /**
- * @group Laminas-110
- */
+ #[Group('Laminas-110')]
public function testDocBlockScannerParsesTagsWithNoValuesProperly()
{
$docComment = <<