diff --git a/composer.json b/composer.json index 6aa47699..a74586b0 100644 --- a/composer.json +++ b/composer.json @@ -39,13 +39,13 @@ }, "require-dev": { "laminas/laminas-coding-standard": "~2.5.0", - "laminas/laminas-i18n": "^2.23", + "laminas/laminas-i18n": "^2.25.0", "laminas/laminas-uri": "^2.11.0", "pear/archive_tar": "^1.4.14", - "phpunit/phpunit": "^10.4.2", + "phpunit/phpunit": "^10.5.5", "psalm/plugin-phpunit": "^0.18.4", "psr/http-factory": "^1.0.2", - "vimeo/psalm": "^5.15.0" + "vimeo/psalm": "^5.18.0" }, "conflict": { "laminas/laminas-validator": "<2.10.1", diff --git a/composer.lock b/composer.lock index 999a982c..c80ad189 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": "4725652ff0b79f76f2859d8244db2db3", + "content-hash": "4ceacdd5c30994c19940a4943a8fc22e", "packages": [ { "name": "laminas/laminas-servicemanager", @@ -877,16 +877,16 @@ }, { "name": "fidry/cpu-core-counter", - "version": "0.5.1", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623" + "reference": "85193c0b0cb5c47894b5eaec906e946f054e7077" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/b58e5a3933e541dc286cc91fc4f3898bbc6f1623", - "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/85193c0b0cb5c47894b5eaec906e946f054e7077", + "reference": "85193c0b0cb5c47894b5eaec906e946f054e7077", "shasum": "" }, "require": { @@ -894,13 +894,13 @@ }, "require-dev": { "fidry/makefile": "^0.2.0", + "fidry/php-cs-fixer-config": "^1.1.2", "phpstan/extension-installer": "^1.2.0", "phpstan/phpstan": "^1.9.2", "phpstan/phpstan-deprecation-rules": "^1.0.0", "phpstan/phpstan-phpunit": "^1.2.2", "phpstan/phpstan-strict-rules": "^1.4.4", - "phpunit/phpunit": "^9.5.26 || ^8.5.31", - "theofidry/php-cs-fixer-config": "^1.0", + "phpunit/phpunit": "^8.5.31 || ^9.5.26", "webmozarts/strict-phpunit": "^7.5" }, "type": "library", @@ -926,7 +926,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/0.5.1" + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.0.0" }, "funding": [ { @@ -934,7 +934,7 @@ "type": "github" } ], - "time": "2022-12-24T12:35:10+00:00" + "time": "2023-09-17T21:38:23+00:00" }, { "name": "laminas/laminas-coding-standard", @@ -1056,16 +1056,16 @@ }, { "name": "laminas/laminas-i18n", - "version": "2.24.0", + "version": "2.25.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-i18n.git", - "reference": "4f23433e415b14c4d66a7d7d1983c5890ac9ed2a" + "reference": "4b6df8501bfe96648dadaf8de681cbbaea906e04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-i18n/zipball/4f23433e415b14c4d66a7d7d1983c5890ac9ed2a", - "reference": "4f23433e415b14c4d66a7d7d1983c5890ac9ed2a", + "url": "https://api.github.com/repos/laminas/laminas-i18n/zipball/4b6df8501bfe96648dadaf8de681cbbaea906e04", + "reference": "4b6df8501bfe96648dadaf8de681cbbaea906e04", "shasum": "" }, "require": { @@ -1137,7 +1137,7 @@ "type": "community_bridge" } ], - "time": "2023-11-06T09:22:50+00:00" + "time": "2023-12-22T15:51:21+00:00" }, { "name": "laminas/laminas-uri", @@ -1199,16 +1199,16 @@ }, { "name": "laminas/laminas-validator", - "version": "2.42.0", + "version": "2.46.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-validator.git", - "reference": "a5221732b2ff6df59908bbf2eb274ed3688665bc" + "reference": "98330256f8d8a1357a93f6f7f1a987036aff6329" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/a5221732b2ff6df59908bbf2eb274ed3688665bc", - "reference": "a5221732b2ff6df59908bbf2eb274ed3688665bc", + "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/98330256f8d8a1357a93f6f7f1a987036aff6329", + "reference": "98330256f8d8a1357a93f6f7f1a987036aff6329", "shasum": "" }, "require": { @@ -1223,15 +1223,15 @@ "require-dev": { "laminas/laminas-coding-standard": "^2.5", "laminas/laminas-db": "^2.18", - "laminas/laminas-filter": "^2.32", - "laminas/laminas-i18n": "^2.23", - "laminas/laminas-session": "^2.16", - "laminas/laminas-uri": "^2.10.0", - "phpunit/phpunit": "^10.3.3", + "laminas/laminas-filter": "^2.33", + "laminas/laminas-i18n": "^2.24.1", + "laminas/laminas-session": "^2.17", + "laminas/laminas-uri": "^2.11.0", + "phpunit/phpunit": "^10.5.2", "psalm/plugin-phpunit": "^0.18.4", - "psr/http-client": "^1.0.2", + "psr/http-client": "^1.0.3", "psr/http-factory": "^1.0.2", - "vimeo/psalm": "^5.15" + "vimeo/psalm": "^5.17" }, "suggest": { "laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator", @@ -1279,7 +1279,7 @@ "type": "community_bridge" } ], - "time": "2023-11-06T09:13:00+00:00" + "time": "2024-01-03T12:43:04+00:00" }, { "name": "myclabs/deep-copy", @@ -1393,16 +1393,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.17.1", + "version": "v4.18.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", "shasum": "" }, "require": { @@ -1443,9 +1443,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" }, - "time": "2023-08-13T19:53:39+00:00" + "time": "2023-12-10T21:03:43+00:00" }, { "name": "pear/archive_tar", @@ -1580,21 +1580,22 @@ }, { "name": "pear/pear-core-minimal", - "version": "v1.10.13", + "version": "v1.10.14", "source": { "type": "git", "url": "https://github.com/pear/pear-core-minimal.git", - "reference": "aed862e95fd286c53cc546734868dc38ff4b5b1d" + "reference": "a86fc145edb5caedbf96527214ce3cadc9de4a32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/aed862e95fd286c53cc546734868dc38ff4b5b1d", - "reference": "aed862e95fd286c53cc546734868dc38ff4b5b1d", + "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/a86fc145edb5caedbf96527214ce3cadc9de4a32", + "reference": "a86fc145edb5caedbf96527214ce3cadc9de4a32", "shasum": "" }, "require": { "pear/console_getopt": "~1.4", - "pear/pear_exception": "~1.0" + "pear/pear_exception": "~1.0", + "php": ">=5.4" }, "replace": { "rsky/pear-core-min": "self.version" @@ -1624,7 +1625,7 @@ "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR", "source": "https://github.com/pear/pear-core-minimal" }, - "time": "2023-04-19T19:15:47+00:00" + "time": "2023-11-26T16:15:38+00:00" }, { "name": "pear/pear_exception", @@ -2007,23 +2008,23 @@ }, { "name": "phpunit/php-code-coverage", - "version": "10.1.7", + "version": "10.1.11", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "355324ca4980b8916c18b9db29f3ef484078f26e" + "reference": "78c3b7625965c2513ee96569a4dbb62601784145" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/355324ca4980b8916c18b9db29f3ef484078f26e", - "reference": "355324ca4980b8916c18b9db29f3ef484078f26e", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/78c3b7625965c2513ee96569a4dbb62601784145", + "reference": "78c3b7625965c2513ee96569a4dbb62601784145", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.15", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=8.1", "phpunit/php-file-iterator": "^4.0", "phpunit/php-text-template": "^3.0", @@ -2073,7 +2074,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.7" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.11" }, "funding": [ { @@ -2081,7 +2082,7 @@ "type": "github" } ], - "time": "2023-10-04T15:34:17+00:00" + "time": "2023-12-21T15:38:30+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2328,16 +2329,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.4.2", + "version": "10.5.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "cacd8b9dd224efa8eb28beb69004126c7ca1a1a1" + "reference": "ed21115d505b4b4f7dc7b5651464e19a2c7f7856" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/cacd8b9dd224efa8eb28beb69004126c7ca1a1a1", - "reference": "cacd8b9dd224efa8eb28beb69004126c7ca1a1a1", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ed21115d505b4b4f7dc7b5651464e19a2c7f7856", + "reference": "ed21115d505b4b4f7dc7b5651464e19a2c7f7856", "shasum": "" }, "require": { @@ -2377,7 +2378,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "10.4-dev" + "dev-main": "10.5-dev" } }, "autoload": { @@ -2409,7 +2410,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.4.2" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.5" }, "funding": [ { @@ -2425,7 +2426,7 @@ "type": "tidelift" } ], - "time": "2023-10-26T07:21:45+00:00" + "time": "2023-12-27T15:13:52+00:00" }, { "name": "psalm/plugin-phpunit", @@ -2891,20 +2892,20 @@ }, { "name": "sebastian/complexity", - "version": "3.1.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "68cfb347a44871f01e33ab0ef8215966432f6957" + "reference": "68ff824baeae169ec9f2137158ee529584553799" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68cfb347a44871f01e33ab0ef8215966432f6957", - "reference": "68cfb347a44871f01e33ab0ef8215966432f6957", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799", + "reference": "68ff824baeae169ec9f2137158ee529584553799", "shasum": "" }, "require": { - "nikic/php-parser": "^4.10", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=8.1" }, "require-dev": { @@ -2913,7 +2914,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.1-dev" + "dev-main": "3.2-dev" } }, "autoload": { @@ -2937,7 +2938,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/3.1.0" + "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0" }, "funding": [ { @@ -2945,20 +2946,20 @@ "type": "github" } ], - "time": "2023-09-28T11:50:59+00:00" + "time": "2023-12-21T08:37:17+00:00" }, { "name": "sebastian/diff", - "version": "5.0.3", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b" + "reference": "fbf413a49e54f6b9b17e12d900ac7f6101591b7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b", - "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/fbf413a49e54f6b9b17e12d900ac7f6101591b7f", + "reference": "fbf413a49e54f6b9b17e12d900ac7f6101591b7f", "shasum": "" }, "require": { @@ -2971,7 +2972,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -3004,7 +3005,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/diff/tree/5.1.0" }, "funding": [ { @@ -3012,7 +3013,7 @@ "type": "github" } ], - "time": "2023-05-01T07:48:21+00:00" + "time": "2023-12-22T10:55:06+00:00" }, { "name": "sebastian/environment", @@ -3220,20 +3221,20 @@ }, { "name": "sebastian/lines-of-code", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d" + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/649e40d279e243d985aa8fb6e74dd5bb28dc185d", - "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0", + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0", "shasum": "" }, "require": { - "nikic/php-parser": "^4.10", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=8.1" }, "require-dev": { @@ -3266,7 +3267,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.1" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2" }, "funding": [ { @@ -3274,7 +3275,7 @@ "type": "github" } ], - "time": "2023-08-31T09:25:50+00:00" + "time": "2023-12-21T08:38:20+00:00" }, { "name": "sebastian/object-enumerator", @@ -3623,16 +3624,16 @@ }, { "name": "spatie/array-to-xml", - "version": "3.2.0", + "version": "3.2.2", "source": { "type": "git", "url": "https://github.com/spatie/array-to-xml.git", - "reference": "f9ab39c808500c347d5a8b6b13310bd5221e39e7" + "reference": "96be97e664c87613121d073ea39af4c74e57a7f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/f9ab39c808500c347d5a8b6b13310bd5221e39e7", - "reference": "f9ab39c808500c347d5a8b6b13310bd5221e39e7", + "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/96be97e664c87613121d073ea39af4c74e57a7f8", + "reference": "96be97e664c87613121d073ea39af4c74e57a7f8", "shasum": "" }, "require": { @@ -3670,7 +3671,7 @@ "xml" ], "support": { - "source": "https://github.com/spatie/array-to-xml/tree/3.2.0" + "source": "https://github.com/spatie/array-to-xml/tree/3.2.2" }, "funding": [ { @@ -3682,20 +3683,20 @@ "type": "github" } ], - "time": "2023-07-19T18:30:26+00:00" + "time": "2023-11-14T14:08:51+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.7.2", + "version": "3.8.0", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "5805f7a4e4958dbb5e944ef1e6edae0a303765e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/5805f7a4e4958dbb5e944ef1e6edae0a303765e7", + "reference": "5805f7a4e4958dbb5e944ef1e6edae0a303765e7", "shasum": "" }, "require": { @@ -3705,7 +3706,7 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/phpcs", @@ -3724,35 +3725,58 @@ "authors": [ { "name": "Greg Sherwood", - "role": "lead" + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", "keywords": [ "phpcs", "standards", "static analysis" ], "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" }, - "time": "2023-02-22T23:07:41+00:00" + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2023-12-08T12:32:31+00:00" }, { "name": "symfony/console", - "version": "v6.3.4", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6" + "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/eca495f2ee845130855ddf1cf18460c38966c8b6", - "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6", + "url": "https://api.github.com/repos/symfony/console/zipball/0254811a143e6bc6c8deea08b589a7e68a37f625", + "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625", "shasum": "" }, "require": { @@ -3760,7 +3784,7 @@ "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^5.4|^6.0" + "symfony/string": "^5.4|^6.0|^7.0" }, "conflict": { "symfony/dependency-injection": "<5.4", @@ -3774,12 +3798,16 @@ }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/lock": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/var-dumper": "^5.4|^6.0" + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -3813,7 +3841,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.3.4" + "source": "https://github.com/symfony/console/tree/v6.4.2" }, "funding": [ { @@ -3829,11 +3857,11 @@ "type": "tidelift" } ], - "time": "2023-08-16T10:10:12+00:00" + "time": "2023-12-10T16:15:48+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", @@ -3880,7 +3908,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" }, "funding": [ { @@ -3900,16 +3928,16 @@ }, { "name": "symfony/filesystem", - "version": "v6.3.1", + "version": "v6.4.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" + "reference": "952a8cb588c3bc6ce76f6023000fb932f16a6e59" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/952a8cb588c3bc6ce76f6023000fb932f16a6e59", + "reference": "952a8cb588c3bc6ce76f6023000fb932f16a6e59", "shasum": "" }, "require": { @@ -3943,7 +3971,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.3.1" + "source": "https://github.com/symfony/filesystem/tree/v6.4.0" }, "funding": [ { @@ -3959,7 +3987,7 @@ "type": "tidelift" } ], - "time": "2023-06-01T08:30:39+00:00" + "time": "2023-07-26T17:27:13+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4293,33 +4321,29 @@ }, { "name": "symfony/service-contracts", - "version": "v2.5.2", + "version": "v3.4.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" + "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/fe07cbc8d837f60caf7018068e350cc5163681a0", + "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" + "php": ">=8.1", + "psr/container": "^1.1|^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" }, - "suggest": { - "symfony/service-implementation": "" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -4329,7 +4353,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4356,7 +4383,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/service-contracts/tree/v3.4.1" }, "funding": [ { @@ -4372,20 +4399,20 @@ "type": "tidelift" } ], - "time": "2022-05-30T19:17:29+00:00" + "time": "2023-12-26T14:02:43+00:00" }, { "name": "symfony/string", - "version": "v6.3.5", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339" + "reference": "7cb80bc10bfcdf6b5492741c0b9357dac66940bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339", - "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339", + "url": "https://api.github.com/repos/symfony/string/zipball/7cb80bc10bfcdf6b5492741c0b9357dac66940bc", + "reference": "7cb80bc10bfcdf6b5492741c0b9357dac66940bc", "shasum": "" }, "require": { @@ -4399,11 +4426,11 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^5.4|^6.0", - "symfony/http-client": "^5.4|^6.0", - "symfony/intl": "^6.2", + "symfony/error-handler": "^5.4|^6.0|^7.0", + "symfony/http-client": "^5.4|^6.0|^7.0", + "symfony/intl": "^6.2|^7.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^5.4|^6.0" + "symfony/var-exporter": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -4442,7 +4469,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.5" + "source": "https://github.com/symfony/string/tree/v6.4.2" }, "funding": [ { @@ -4458,20 +4485,20 @@ "type": "tidelift" } ], - "time": "2023-09-18T10:38:32+00:00" + "time": "2023-12-10T16:15:48+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", "shasum": "" }, "require": { @@ -4500,7 +4527,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.2" }, "funding": [ { @@ -4508,20 +4535,20 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2023-11-20T00:12:19+00:00" }, { "name": "vimeo/psalm", - "version": "5.15.0", + "version": "5.18.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "5c774aca4746caf3d239d9c8cadb9f882ca29352" + "reference": "b113f3ed0259fd6e212d87c3df80eec95a6abf19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/5c774aca4746caf3d239d9c8cadb9f882ca29352", - "reference": "5c774aca4746caf3d239d9c8cadb9f882ca29352", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/b113f3ed0259fd6e212d87c3df80eec95a6abf19", + "reference": "b113f3ed0259fd6e212d87c3df80eec95a6abf19", "shasum": "" }, "require": { @@ -4540,14 +4567,14 @@ "ext-tokenizer": "*", "felixfbecker/advanced-json-rpc": "^3.1", "felixfbecker/language-server-protocol": "^1.5.2", - "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1", + "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1 || ^1.0.0", "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", "nikic/php-parser": "^4.16", "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.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/console": "^4.1.6 || ^5.0 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0" }, "conflict": { "nikic/php-parser": "4.17.0" @@ -4569,7 +4596,7 @@ "psalm/plugin-phpunit": "^0.18", "slevomat/coding-standard": "^8.4", "squizlabs/php_codesniffer": "^3.6", - "symfony/process": "^4.4 || ^5.0 || ^6.0" + "symfony/process": "^4.4 || ^5.0 || ^6.0 || ^7.0" }, "suggest": { "ext-curl": "In order to send data to shepherd", @@ -4582,7 +4609,7 @@ "psalm-refactor", "psalter" ], - "type": "library", + "type": "project", "extra": { "branch-alias": { "dev-master": "5.x-dev", @@ -4614,23 +4641,24 @@ "static analysis" ], "support": { + "docs": "https://psalm.dev/docs", "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/5.15.0" + "source": "https://github.com/vimeo/psalm" }, - "time": "2023-08-20T23:07:30+00:00" + "time": "2023-12-16T09:37:35+00:00" }, { "name": "webimpress/coding-standard", - "version": "1.3.1", + "version": "1.3.2", "source": { "type": "git", "url": "https://github.com/webimpress/coding-standard.git", - "reference": "b26557e2386711ecb74f22718f4b4bde5ddbc899" + "reference": "710f71ac95d36d931e76b47132b599c39abfab11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/b26557e2386711ecb74f22718f4b4bde5ddbc899", - "reference": "b26557e2386711ecb74f22718f4b4bde5ddbc899", + "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/710f71ac95d36d931e76b47132b599c39abfab11", + "reference": "710f71ac95d36d931e76b47132b599c39abfab11", "shasum": "" }, "require": { @@ -4638,7 +4666,7 @@ "squizlabs/php_codesniffer": "^3.7.2" }, "require-dev": { - "phpunit/phpunit": "^9.6.4" + "phpunit/phpunit": "^9.6.15" }, "type": "phpcodesniffer-standard", "extra": { @@ -4664,7 +4692,7 @@ ], "support": { "issues": "https://github.com/webimpress/coding-standard/issues", - "source": "https://github.com/webimpress/coding-standard/tree/1.3.1" + "source": "https://github.com/webimpress/coding-standard/tree/1.3.2" }, "funding": [ { @@ -4672,7 +4700,7 @@ "type": "github" } ], - "time": "2023-03-09T15:05:18+00:00" + "time": "2023-12-18T07:25:41+00:00" }, { "name": "webmozart/assert", diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 0895782c..ea983a29 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + $value @@ -102,15 +102,9 @@ - - $options - ($option is null ? array : mixed) - - $adapterOptions - getOptions($option)]]> @@ -329,16 +323,6 @@ - - string - - - filter($value)]]> - - - $value - $value - $value @@ -386,7 +370,6 @@ $value - $value $options @@ -531,31 +514,9 @@ - - - - - $value - $value - $value - $value - $value - - string|array - - - $uploadData - $value - $value - $value - - - $value - $value - $uploadData @@ -824,13 +785,8 @@ - tagsAllowed[$tagName]]]> - - tagsAllowed[$tagName][$attributeName]]]> - - $attribute $attribute $element @@ -842,6 +798,7 @@ is_array($options) + is_string($attribute) @@ -1091,16 +1048,9 @@ - - $compressed - $input - $compressed - - null - returnUnfilteredDataProvider diff --git a/src/Compress.php b/src/Compress.php index d8675f31..1f90ffed 100644 --- a/src/Compress.php +++ b/src/Compress.php @@ -22,12 +22,12 @@ /** * Compresses a given string * - * phpcs:disable Generic.Files.LineLength.TooLong - * @psalm-type AdapterArg = class-string|CompressionAlgorithmInterface|'Bz2'|'Gz'|'Tar'|'Zip' + * @psalm-type AdapterType = 'Bz2'|'Gz'|'Tar'|'Zip'|class-string + * @psalm-type AdapterTypeOrInstance = CompressionAlgorithmInterface|AdapterType * @psalm-type Options = array{ - * adapter?: AdapterArg, - * adapter_options?: array, - * options?: array, + * adapter?: AdapterTypeOrInstance, + * options?: array, + * adapter_options?: array, * } * @extends AbstractFilter */ @@ -38,7 +38,7 @@ class Compress extends AbstractFilter /** * Compression adapter * - * @var AdapterArg + * @var AdapterTypeOrInstance */ private string|CompressionAlgorithmInterface $adapter = self::DEFAULT_ADAPTER; @@ -52,18 +52,22 @@ class Compress extends AbstractFilter /** * Given a string or a compression adapter interface, set the adapter. Otherwise, an iterable will set options * - * @param string|array|Traversable|CompressionAlgorithmInterface $options (Optional) Options to set + * @param Options|Traversable|null|AdapterTypeOrInstance $options */ public function __construct($options = null) { if ($options instanceof Traversable) { + /** @psalm-var Options $options */ $options = ArrayUtils::iteratorToArray($options); } - if (is_string($options)) { - $this->setAdapter($options); - } elseif ($options instanceof CompressionAlgorithmInterface) { + + if (is_string($options) || $options instanceof CompressionAlgorithmInterface) { $this->setAdapter($options); - } elseif (is_array($options)) { + + return; + } + + if (is_array($options)) { $this->setOptions($options); } } @@ -71,7 +75,7 @@ public function __construct($options = null) /** * Set filter state * - * @param Options|iterable $options + * @param Options|iterable $options * @throws Exception\InvalidArgumentException If options is not an array or Traversable. * @return $this */ @@ -145,7 +149,7 @@ public function getAdapterName(): string /** * Sets compression adapter * - * @param AdapterArg $adapter Adapter to use + * @param AdapterTypeOrInstance $adapter Adapter to use * @return $this * @throws Exception\InvalidArgumentException */ diff --git a/src/Decompress.php b/src/Decompress.php index 5ebd6034..04aeac9a 100644 --- a/src/Decompress.php +++ b/src/Decompress.php @@ -16,8 +16,8 @@ final class Decompress extends Compress * * Decompresses the content $value with the defined settings * - * @param string $value Content to decompress - * @return string The decompressed content + * @param mixed $value Content to decompress + * @return mixed|string The decompressed content */ public function __invoke(mixed $value): mixed { @@ -29,8 +29,8 @@ public function __invoke(mixed $value): mixed * * Decompresses the content $value with the defined settings * - * @param mixed $value Content to decompress - * @return mixed The decompressed content + * @param mixed $value Content to decompress + * @return mixed|string The decompressed content */ public function filter(mixed $value): mixed { diff --git a/src/File/Rename.php b/src/File/Rename.php index 610435bb..7aee66b6 100644 --- a/src/File/Rename.php +++ b/src/File/Rename.php @@ -177,7 +177,7 @@ public function getNewName($value, $source = false) * Returns the file $value, removing all but digit characters * * @param mixed $value Full path of file to change or $_FILES data array - * @return mixed The new filename which has been set + * @return mixed|string|array The new filename which has been set * @throws Exception\RuntimeException */ public function filter(mixed $value): mixed @@ -198,7 +198,7 @@ public function filter(mixed $value): mixed $value = $value['tmp_name']; } - $file = $this->getNewName($value, true); + $file = $this->getNewName((string) $value, true); if (is_string($file)) { if ($isFileUpload) { return $uploadData; diff --git a/src/File/UpperCase.php b/src/File/UpperCase.php index efc18056..d7ad3e23 100644 --- a/src/File/UpperCase.php +++ b/src/File/UpperCase.php @@ -12,6 +12,7 @@ use function file_put_contents; use function is_array; use function is_scalar; +use function is_string; use function is_writable; final class UpperCase extends StringToUpper @@ -21,8 +22,8 @@ final class UpperCase extends StringToUpper * * Does a lowercase on the content of the given file * - * @param string|array $value Full path of file to change or $_FILES data array - * @return string|array The given $value + * @param mixed $value Full path of file to change or $_FILES data array + * @return mixed|string|array The given $value * @throws Exception\RuntimeException * @throws Exception\InvalidArgumentException */ @@ -44,7 +45,7 @@ public function filter(mixed $value): mixed $value = $value['tmp_name']; } - if (! file_exists($value)) { + if (! is_string($value) || ! file_exists($value)) { throw new Exception\InvalidArgumentException("File '$value' not found"); } diff --git a/src/PregReplace.php b/src/PregReplace.php index 4844a86b..faabc3ca 100644 --- a/src/PregReplace.php +++ b/src/PregReplace.php @@ -9,9 +9,7 @@ use function func_get_args; use function get_debug_type; -use function gettype; use function is_array; -use function is_object; use function is_string; use function iterator_to_array; use function preg_match; @@ -76,7 +74,7 @@ public function setPattern($pattern) throw new Exception\InvalidArgumentException(sprintf( '%s expects pattern to be array or string; received "%s"', __METHOD__, - is_object($pattern) ? $pattern::class : gettype($pattern) + get_debug_type($pattern), )); } diff --git a/src/StringPrefix.php b/src/StringPrefix.php index 6643a3f2..b76116dd 100644 --- a/src/StringPrefix.php +++ b/src/StringPrefix.php @@ -4,8 +4,7 @@ namespace Laminas\Filter; -use function gettype; -use function is_object; +use function get_debug_type; use function is_scalar; use function is_string; use function sprintf; @@ -46,7 +45,7 @@ public function setPrefix($prefix) throw new Exception\InvalidArgumentException(sprintf( '%s expects "prefix" to be string; received "%s"', __METHOD__, - is_object($prefix) ? $prefix::class : gettype($prefix) + get_debug_type($prefix), )); } diff --git a/src/StringSuffix.php b/src/StringSuffix.php index f2614656..c602ea39 100644 --- a/src/StringSuffix.php +++ b/src/StringSuffix.php @@ -4,8 +4,7 @@ namespace Laminas\Filter; -use function gettype; -use function is_object; +use function get_debug_type; use function is_scalar; use function is_string; use function sprintf; @@ -46,7 +45,7 @@ public function setSuffix($suffix) throw new Exception\InvalidArgumentException(sprintf( '%s expects "suffix" to be string; received "%s"', __METHOD__, - is_object($suffix) ? $suffix::class : gettype($suffix) + get_debug_type($suffix), )); } diff --git a/src/StripTags.php b/src/StripTags.php index 9c7ecf23..b26af1d1 100644 --- a/src/StripTags.php +++ b/src/StripTags.php @@ -45,7 +45,7 @@ final class StripTags extends AbstractFilter * Tags are stored in the array keys, and the array values are themselves * arrays of the attributes allowed for the corresponding tag. * - * @var array + * @var array> */ protected $tagsAllowed = []; @@ -54,7 +54,7 @@ final class StripTags extends AbstractFilter * * Attributes stored here are allowed for all of the allowed tags. * - * @var array + * @var array */ protected $attributesAllowed = []; @@ -101,7 +101,7 @@ public function __construct($options = null) /** * Returns the tagsAllowed option * - * @return array + * @return array> */ public function getTagsAllowed() { @@ -153,7 +153,7 @@ public function setTagsAllowed($tagsAllowed) /** * Returns the attributesAllowed option * - * @return array + * @return array */ public function getAttributesAllowed() { @@ -163,7 +163,7 @@ public function getAttributesAllowed() /** * Sets the attributesAllowed option * - * @param array|string $attributesAllowed + * @param list|string $attributesAllowed * @return self Provides a fluent interface */ public function setAttributesAllowed($attributesAllowed) @@ -246,8 +246,7 @@ public function filter(mixed $value): mixed * @param string $tag * @return string */ - // @codingStandardsIgnoreStart - protected function _filterTag($tag) + protected function _filterTag($tag) // phpcs:ignore { // @codingStandardsIgnoreEnd // Parse the tag into: diff --git a/test/CompressTest.php b/test/CompressTest.php index 3c62aba1..2cff2fcf 100644 --- a/test/CompressTest.php +++ b/test/CompressTest.php @@ -22,6 +22,7 @@ use function uniqid; use function unlink; +/** @psalm-import-type AdapterType from CompressFilter */ class CompressTest extends TestCase { private string $tmpDir; @@ -48,19 +49,21 @@ public function tearDown(): void } } - /** @return iterable */ + /** @return iterable */ public static function returnFilterType(): iterable { if (extension_loaded('bz2')) { - yield ['bz2']; + yield ['Bz2']; } if (extension_loaded('zlib')) { - yield ['gz']; + yield ['Gz']; } } /** * Basic usage + * + * @param AdapterType $filterType */ #[DataProvider('returnFilterType')] public function testBasicUsage(string $filterType): void @@ -77,6 +80,8 @@ public function testBasicUsage(string $filterType): void /** * Setting Options + * + * @param AdapterType $filterType */ #[DataProvider('returnFilterType')] public function testGetSetAdapterOptionsInConstructor(string $filterType): void @@ -99,6 +104,8 @@ public function testGetSetAdapterOptionsInConstructor(string $filterType): void /** * Setting Options through constructor + * + * @param AdapterType $filterType */ #[DataProvider('returnFilterType')] public function testGetSetAdapterOptions(string $filterType): void @@ -124,7 +131,7 @@ public function testGetSetBlocksize(): void self::markTestSkipped('Extension bz2 is required for this test'); } - $filter = new CompressFilter('bz2'); + $filter = new CompressFilter('Bz2'); self::assertSame(4, $filter->getBlocksize()); $filter->setBlocksize(6); self::assertSame(6, $filter->getOptions('blocksize')); @@ -136,6 +143,8 @@ public function testGetSetBlocksize(): void /** * Setting Archive + * + * @param AdapterType $filterType */ #[DataProvider('returnFilterType')] public function testGetSetArchive(string $filterType): void @@ -149,6 +158,8 @@ public function testGetSetArchive(string $filterType): void /** * Setting Archive + * + * @param AdapterType $filterType */ #[DataProvider('returnFilterType')] public function testCompressToFile(string $filterType): void @@ -172,6 +183,8 @@ public function testCompressToFile(string $filterType): void /** * testing toString + * + * @param AdapterType $filterType */ #[DataProvider('returnFilterType')] public function testToString(string $filterType): void @@ -182,6 +195,8 @@ public function testToString(string $filterType): void /** * testing getAdapter + * + * @param AdapterType $filterType */ #[DataProvider('returnFilterType')] public function testGetAdapter(string $filterType): void @@ -214,6 +229,8 @@ public function testSetAdapter(): void /** * Decompress archive + * + * @param AdapterType $filterType */ #[DataProvider('returnFilterType')] public function testDecompressArchive(string $filterType): void @@ -258,6 +275,9 @@ public static function returnUnfilteredDataProvider(): iterable } } + /** + * @param AdapterType $filterType + */ #[DataProvider('returnUnfilteredDataProvider')] public function testReturnUnfiltered(string $filterType, mixed $input): void { diff --git a/test/DateTimeFormatterTest.php b/test/DateTimeFormatterTest.php index b77a2812..6c072aa7 100644 --- a/test/DateTimeFormatterTest.php +++ b/test/DateTimeFormatterTest.php @@ -17,6 +17,7 @@ class DateTimeFormatterTest extends TestCase { + /** @var non-empty-string */ private string $defaultTimezone; public function setUp(): void diff --git a/test/DecompressTest.php b/test/DecompressTest.php index b68c58c8..d03195b5 100644 --- a/test/DecompressTest.php +++ b/test/DecompressTest.php @@ -4,6 +4,7 @@ namespace LaminasTest\Filter; +use Laminas\Filter\Compress; use Laminas\Filter\Decompress as DecompressFilter; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; @@ -19,6 +20,7 @@ use function uniqid; use function unlink; +/** @psalm-import-type AdapterType from Compress */ class DecompressTest extends TestCase { private string $tmpDir; @@ -45,19 +47,21 @@ public function tearDown(): void } } - /** @return iterable */ + /** @return iterable */ public static function returnFilterType(): iterable { if (extension_loaded('bz2')) { - yield ['bz2']; + yield ['Bz2']; } if (extension_loaded('zlib')) { - yield ['gz']; + yield ['Gz']; } } /** * Basic usage + * + * @param AdapterType $filterType */ #[DataProvider('returnFilterType')] public function testBasicUsage(string $filterType): void @@ -74,6 +78,8 @@ public function testBasicUsage(string $filterType): void /** * Setting Archive + * + * @param AdapterType $filterType */ #[DataProvider('returnFilterType')] public function testCompressToFile(string $filterType): void @@ -97,6 +103,8 @@ public function testCompressToFile(string $filterType): void /** * Basic usage + * + * @param AdapterType $filterType */ #[DataProvider('returnFilterType')] public function testDecompressArchive(string $filterType): void @@ -113,6 +121,9 @@ public function testDecompressArchive(string $filterType): void self::assertSame('compress me', $content2); } + /** + * @param AdapterType $filterType + */ #[DataProvider('returnFilterType')] public function testFilterMethodProxiesToDecompress(string $filterType): void { @@ -143,6 +154,9 @@ public static function returnUnfilteredDataProvider(): iterable } } + /** + * @param AdapterType $filterType + */ #[DataProvider('returnUnfilteredDataProvider')] public function testReturnUnfiltered(string $filterType, mixed $input): void { diff --git a/test/StripTagsTest.php b/test/StripTagsTest.php index 8b727474..08d7532c 100644 --- a/test/StripTagsTest.php +++ b/test/StripTagsTest.php @@ -85,6 +85,7 @@ public function testSetAttributesAllowedArray(): void 'ok' => 'String', null, ]; + /** @psalm-suppress ArgumentTypeCoercion */ $this->filter->setAttributesAllowed($attributesAllowed); $attributesAllowedExpected = [ 'class' => null,