From 1e5ec6340e73698c757df034934df77bd50cf2b7 Mon Sep 17 00:00:00 2001 From: George Steel Date: Mon, 4 Mar 2024 15:39:53 +0000 Subject: [PATCH 1/2] Bump dev deps, refresh lock Signed-off-by: George Steel --- composer.json | 6 +- composer.lock | 304 +++++++++++++++++++++++++------------------------- 2 files changed, 153 insertions(+), 157 deletions(-) diff --git a/composer.json b/composer.json index fea22727..2e313a3d 100644 --- a/composer.json +++ b/composer.json @@ -40,13 +40,13 @@ "require-dev": { "laminas/laminas-coding-standard": "~2.5.0", "laminas/laminas-crypt": "^3.11", - "laminas/laminas-i18n": "^2.25.0", + "laminas/laminas-i18n": "^2.26.0", "laminas/laminas-uri": "^2.11", "pear/archive_tar": "^1.4.14", - "phpunit/phpunit": "^10.5.5", + "phpunit/phpunit": "^10.5.11", "psalm/plugin-phpunit": "^0.18.4", "psr/http-factory": "^1.0.2", - "vimeo/psalm": "^5.18.0" + "vimeo/psalm": "^5.22.2" }, "conflict": { "laminas/laminas-validator": "<2.10.1", diff --git a/composer.lock b/composer.lock index 2fdd9b6a..a454a96a 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": "f0a26528e993851a96af4dfdd476da22", + "content-hash": "3b19634564c54c6364f8f6111a98119d", "packages": [ { "name": "laminas/laminas-servicemanager", @@ -98,16 +98,16 @@ }, { "name": "laminas/laminas-stdlib", - "version": "3.18.0", + "version": "3.19.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "e85b29076c6216e7fc98e72b42dbe1bbc3b95ecf" + "reference": "6a192dd0882b514e45506f533b833b623b78fff3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/e85b29076c6216e7fc98e72b42dbe1bbc3b95ecf", - "reference": "e85b29076c6216e7fc98e72b42dbe1bbc3b95ecf", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/6a192dd0882b514e45506f533b833b623b78fff3", + "reference": "6a192dd0882b514e45506f533b833b623b78fff3", "shasum": "" }, "require": { @@ -118,10 +118,10 @@ }, "require-dev": { "laminas/laminas-coding-standard": "^2.5", - "phpbench/phpbench": "^1.2.14", - "phpunit/phpunit": "^10.3.3", + "phpbench/phpbench": "^1.2.15", + "phpunit/phpunit": "^10.5.8", "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.15.0" + "vimeo/psalm": "^5.20.0" }, "type": "library", "autoload": { @@ -153,7 +153,7 @@ "type": "community_bridge" } ], - "time": "2023-09-19T10:15:21+00:00" + "time": "2024-01-19T12:39:49+00:00" }, { "name": "psr/container", @@ -877,16 +877,16 @@ }, { "name": "fidry/cpu-core-counter", - "version": "1.0.0", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "85193c0b0cb5c47894b5eaec906e946f054e7077" + "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/85193c0b0cb5c47894b5eaec906e946f054e7077", - "reference": "85193c0b0cb5c47894b5eaec906e946f054e7077", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/f92996c4d5c1a696a6a970e20f7c4216200fcc42", + "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42", "shasum": "" }, "require": { @@ -926,7 +926,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/1.0.0" + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.1.0" }, "funding": [ { @@ -934,7 +934,7 @@ "type": "github" } ], - "time": "2023-09-17T21:38:23+00:00" + "time": "2024-02-07T09:43:46+00:00" }, { "name": "laminas/laminas-coding-standard", @@ -1330,16 +1330,16 @@ }, { "name": "laminas/laminas-validator", - "version": "2.46.0", + "version": "2.49.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-validator.git", - "reference": "98330256f8d8a1357a93f6f7f1a987036aff6329" + "reference": "d58c2e7d3cd420554400dd8cca694fafa3b8e45f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/98330256f8d8a1357a93f6f7f1a987036aff6329", - "reference": "98330256f8d8a1357a93f6f7f1a987036aff6329", + "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/d58c2e7d3cd420554400dd8cca694fafa3b8e45f", + "reference": "d58c2e7d3cd420554400dd8cca694fafa3b8e45f", "shasum": "" }, "require": { @@ -1353,16 +1353,16 @@ }, "require-dev": { "laminas/laminas-coding-standard": "^2.5", - "laminas/laminas-db": "^2.18", - "laminas/laminas-filter": "^2.33", - "laminas/laminas-i18n": "^2.24.1", - "laminas/laminas-session": "^2.17", + "laminas/laminas-db": "^2.19", + "laminas/laminas-filter": "^2.34", + "laminas/laminas-i18n": "^2.26.0", + "laminas/laminas-session": "^2.18", "laminas/laminas-uri": "^2.11.0", - "phpunit/phpunit": "^10.5.2", + "phpunit/phpunit": "^10.5.10", "psalm/plugin-phpunit": "^0.18.4", "psr/http-client": "^1.0.3", "psr/http-factory": "^1.0.2", - "vimeo/psalm": "^5.17" + "vimeo/psalm": "^5.22.1" }, "suggest": { "laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator", @@ -1410,7 +1410,7 @@ "type": "community_bridge" } ], - "time": "2024-01-03T12:43:04+00:00" + "time": "2024-02-22T16:46:06+00:00" }, { "name": "myclabs/deep-copy", @@ -1473,16 +1473,16 @@ }, { "name": "netresearch/jsonmapper", - "version": "v4.2.0", + "version": "v4.4.1", "source": { "type": "git", "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "f60565f8c0566a31acf06884cdaa591867ecc956" + "reference": "132c75c7dd83e45353ebb9c6c9f591952995bbf0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/f60565f8c0566a31acf06884cdaa591867ecc956", - "reference": "f60565f8c0566a31acf06884cdaa591867ecc956", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/132c75c7dd83e45353ebb9c6c9f591952995bbf0", + "reference": "132c75c7dd83e45353ebb9c6c9f591952995bbf0", "shasum": "" }, "require": { @@ -1493,7 +1493,7 @@ "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", + "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0 || ~10.0", "squizlabs/php_codesniffer": "~3.5" }, "type": "library", @@ -1518,9 +1518,9 @@ "support": { "email": "cweiske@cweiske.de", "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.2.0" + "source": "https://github.com/cweiske/jsonmapper/tree/v4.4.1" }, - "time": "2023-04-09T17:37:40+00:00" + "time": "2024-01-31T06:18:54+00:00" }, { "name": "nikic/php-parser", @@ -1819,20 +1819,21 @@ }, { "name": "phar-io/manifest", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-phar": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1", @@ -1873,9 +1874,15 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, - "time": "2021-07-20T11:28:43+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" }, { "name": "phar-io/version", @@ -2139,16 +2146,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "10.1.11", + "version": "10.1.12", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "78c3b7625965c2513ee96569a4dbb62601784145" + "reference": "842f72662d6b9edda84c4b6f13885fd9cd53dc63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/78c3b7625965c2513ee96569a4dbb62601784145", - "reference": "78c3b7625965c2513ee96569a4dbb62601784145", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/842f72662d6b9edda84c4b6f13885fd9cd53dc63", + "reference": "842f72662d6b9edda84c4b6f13885fd9cd53dc63", "shasum": "" }, "require": { @@ -2205,7 +2212,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.11" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.12" }, "funding": [ { @@ -2213,7 +2220,7 @@ "type": "github" } ], - "time": "2023-12-21T15:38:30+00:00" + "time": "2024-03-02T07:22:05+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2460,16 +2467,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.7", + "version": "10.5.11", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e5c5b397a95cb0db013270a985726fcae93e61b8" + "reference": "0d968f6323deb3dbfeba5bfd4929b9415eb7a9a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e5c5b397a95cb0db013270a985726fcae93e61b8", - "reference": "e5c5b397a95cb0db013270a985726fcae93e61b8", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0d968f6323deb3dbfeba5bfd4929b9415eb7a9a4", + "reference": "0d968f6323deb3dbfeba5bfd4929b9415eb7a9a4", "shasum": "" }, "require": { @@ -2541,7 +2548,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.5.7" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.11" }, "funding": [ { @@ -2557,7 +2564,7 @@ "type": "tidelift" } ], - "time": "2024-01-14T16:40:30+00:00" + "time": "2024-02-25T14:05:00+00:00" }, { "name": "psalm/plugin-phpunit", @@ -2779,16 +2786,16 @@ }, { "name": "sebastian/cli-parser", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae" + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efdc130dbbbb8ef0b545a994fd811725c5282cae", - "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084", "shasum": "" }, "require": { @@ -2823,7 +2830,8 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.0" + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1" }, "funding": [ { @@ -2831,7 +2839,7 @@ "type": "github" } ], - "time": "2023-02-03T06:58:15+00:00" + "time": "2024-03-02T07:12:49+00:00" }, { "name": "sebastian/code-unit", @@ -3081,16 +3089,16 @@ }, { "name": "sebastian/diff", - "version": "5.1.0", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "fbf413a49e54f6b9b17e12d900ac7f6101591b7f" + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/fbf413a49e54f6b9b17e12d900ac7f6101591b7f", - "reference": "fbf413a49e54f6b9b17e12d900ac7f6101591b7f", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", "shasum": "" }, "require": { @@ -3098,7 +3106,7 @@ }, "require-dev": { "phpunit/phpunit": "^10.0", - "symfony/process": "^4.2 || ^5" + "symfony/process": "^6.4" }, "type": "library", "extra": { @@ -3136,7 +3144,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.1.0" + "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" }, "funding": [ { @@ -3144,7 +3152,7 @@ "type": "github" } ], - "time": "2023-12-22T10:55:06+00:00" + "time": "2024-03-02T07:15:17+00:00" }, { "name": "sebastian/environment", @@ -3212,16 +3220,16 @@ }, { "name": "sebastian/exporter", - "version": "5.1.1", + "version": "5.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc" + "reference": "955288482d97c19a372d3f31006ab3f37da47adf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/64f51654862e0f5e318db7e9dcc2292c63cdbddc", - "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf", + "reference": "955288482d97c19a372d3f31006ab3f37da47adf", "shasum": "" }, "require": { @@ -3278,7 +3286,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.1" + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2" }, "funding": [ { @@ -3286,20 +3294,20 @@ "type": "github" } ], - "time": "2023-09-24T13:22:09+00:00" + "time": "2024-03-02T07:17:12+00:00" }, { "name": "sebastian/global-state", - "version": "6.0.1", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4" + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/7ea9ead78f6d380d2a667864c132c2f7b83055e4", - "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", "shasum": "" }, "require": { @@ -3333,14 +3341,14 @@ } ], "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", "security": "https://github.com/sebastianbergmann/global-state/security/policy", - "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.1" + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2" }, "funding": [ { @@ -3348,7 +3356,7 @@ "type": "github" } ], - "time": "2023-07-19T07:19:23+00:00" + "time": "2024-03-02T07:19:19+00:00" }, { "name": "sebastian/lines-of-code", @@ -3755,16 +3763,16 @@ }, { "name": "spatie/array-to-xml", - "version": "3.2.2", + "version": "3.2.3", "source": { "type": "git", "url": "https://github.com/spatie/array-to-xml.git", - "reference": "96be97e664c87613121d073ea39af4c74e57a7f8" + "reference": "c95fd4db94ec199f798d4b5b4a81757bd20d88ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/96be97e664c87613121d073ea39af4c74e57a7f8", - "reference": "96be97e664c87613121d073ea39af4c74e57a7f8", + "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/c95fd4db94ec199f798d4b5b4a81757bd20d88ab", + "reference": "c95fd4db94ec199f798d4b5b4a81757bd20d88ab", "shasum": "" }, "require": { @@ -3802,7 +3810,7 @@ "xml" ], "support": { - "source": "https://github.com/spatie/array-to-xml/tree/3.2.2" + "source": "https://github.com/spatie/array-to-xml/tree/3.2.3" }, "funding": [ { @@ -3814,20 +3822,20 @@ "type": "github" } ], - "time": "2023-11-14T14:08:51+00:00" + "time": "2024-02-07T10:39:02+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.8.1", + "version": "3.9.0", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "14f5fff1e64118595db5408e946f3a22c75807f7" + "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/14f5fff1e64118595db5408e946f3a22c75807f7", - "reference": "14f5fff1e64118595db5408e946f3a22c75807f7", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/d63cee4890a8afaf86a22e51ad4d97c91dd4579b", + "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b", "shasum": "" }, "require": { @@ -3894,20 +3902,20 @@ "type": "open_collective" } ], - "time": "2024-01-11T20:47:48+00:00" + "time": "2024-02-16T15:06:51+00:00" }, { "name": "symfony/console", - "version": "v6.4.2", + "version": "v6.4.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625" + "reference": "0d9e4eb5ad413075624378f474c4167ea202de78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0254811a143e6bc6c8deea08b589a7e68a37f625", - "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625", + "url": "https://api.github.com/repos/symfony/console/zipball/0d9e4eb5ad413075624378f474c4167ea202de78", + "reference": "0d9e4eb5ad413075624378f474c4167ea202de78", "shasum": "" }, "require": { @@ -3972,7 +3980,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.2" + "source": "https://github.com/symfony/console/tree/v6.4.4" }, "funding": [ { @@ -3988,7 +3996,7 @@ "type": "tidelift" } ], - "time": "2023-12-10T16:15:48+00:00" + "time": "2024-02-22T20:27:10+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4059,16 +4067,16 @@ }, { "name": "symfony/filesystem", - "version": "v6.4.0", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "952a8cb588c3bc6ce76f6023000fb932f16a6e59" + "reference": "7f3b1755eb49297a0827a7575d5d2b2fd11cc9fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/952a8cb588c3bc6ce76f6023000fb932f16a6e59", - "reference": "952a8cb588c3bc6ce76f6023000fb932f16a6e59", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/7f3b1755eb49297a0827a7575d5d2b2fd11cc9fb", + "reference": "7f3b1755eb49297a0827a7575d5d2b2fd11cc9fb", "shasum": "" }, "require": { @@ -4102,7 +4110,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.4.0" + "source": "https://github.com/symfony/filesystem/tree/v6.4.3" }, "funding": [ { @@ -4118,20 +4126,20 @@ "type": "tidelift" } ], - "time": "2023-07-26T17:27:13+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", "shasum": "" }, "require": { @@ -4145,9 +4153,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4184,7 +4189,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" }, "funding": [ { @@ -4200,20 +4205,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "875e90aeea2777b6f135677f618529449334a612" + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", - "reference": "875e90aeea2777b6f135677f618529449334a612", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", "shasum": "" }, "require": { @@ -4224,9 +4229,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4265,7 +4267,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" }, "funding": [ { @@ -4281,20 +4283,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", "shasum": "" }, "require": { @@ -4305,9 +4307,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4349,7 +4348,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" }, "funding": [ { @@ -4365,20 +4364,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", "shasum": "" }, "require": { @@ -4392,9 +4391,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4432,7 +4428,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" }, "funding": [ { @@ -4448,7 +4444,7 @@ "type": "tidelift" } ], - "time": "2023-07-28T09:04:16+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/service-contracts", @@ -4534,16 +4530,16 @@ }, { "name": "symfony/string", - "version": "v6.4.2", + "version": "v6.4.4", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "7cb80bc10bfcdf6b5492741c0b9357dac66940bc" + "reference": "4e465a95bdc32f49cf4c7f07f751b843bbd6dcd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/7cb80bc10bfcdf6b5492741c0b9357dac66940bc", - "reference": "7cb80bc10bfcdf6b5492741c0b9357dac66940bc", + "url": "https://api.github.com/repos/symfony/string/zipball/4e465a95bdc32f49cf4c7f07f751b843bbd6dcd9", + "reference": "4e465a95bdc32f49cf4c7f07f751b843bbd6dcd9", "shasum": "" }, "require": { @@ -4600,7 +4596,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.2" + "source": "https://github.com/symfony/string/tree/v6.4.4" }, "funding": [ { @@ -4616,20 +4612,20 @@ "type": "tidelift" } ], - "time": "2023-12-10T16:15:48+00:00" + "time": "2024-02-01T13:16:41+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.2", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", - "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -4658,7 +4654,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.2" + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { @@ -4666,20 +4662,20 @@ "type": "github" } ], - "time": "2023-11-20T00:12:19+00:00" + "time": "2024-03-03T12:36:25+00:00" }, { "name": "vimeo/psalm", - "version": "5.19.0", + "version": "5.22.2", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "06b71be009a6bd6d81b9811855d6629b9fe90e1b" + "reference": "d768d914152dbbf3486c36398802f74e80cfde48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/06b71be009a6bd6d81b9811855d6629b9fe90e1b", - "reference": "06b71be009a6bd6d81b9811855d6629b9fe90e1b", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/d768d914152dbbf3486c36398802f74e80cfde48", + "reference": "d768d914152dbbf3486c36398802f74e80cfde48", "shasum": "" }, "require": { @@ -4702,7 +4698,7 @@ "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", + "sebastian/diff": "^4.0 || ^5.0 || ^6.0", "spatie/array-to-xml": "^2.17.0 || ^3.0", "symfony/console": "^4.1.6 || ^5.0 || ^6.0 || ^7.0", "symfony/filesystem": "^5.4 || ^6.0 || ^7.0" @@ -4776,7 +4772,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2024-01-09T21:02:43+00:00" + "time": "2024-02-22T23:39:07+00:00" }, { "name": "webimpress/coding-standard", From 298b53c8cdcdb6c1b567fb81435642bef11ef348 Mon Sep 17 00:00:00 2001 From: George Steel Date: Mon, 4 Mar 2024 15:40:44 +0000 Subject: [PATCH 2/2] Upgrade Psalm to 5.22.x Signed-off-by: George Steel --- psalm-baseline.xml | 1333 ++++++++--------- src/Boolean.php | 2 +- src/Compress/Bz2.php | 8 +- src/Compress/Gz.php | 2 +- src/Compress/Tar.php | 4 +- src/Compress/Zip.php | 6 +- src/DataUnitFormatter.php | 13 +- src/DateTimeFormatter.php | 2 +- src/File/Decrypt.php | 4 +- src/File/Encrypt.php | 4 +- src/File/LowerCase.php | 4 +- src/File/Rename.php | 13 +- src/File/RenameUpload.php | 14 +- src/File/UpperCase.php | 4 +- src/FilterChain.php | 5 +- src/FilterPluginManagerFactory.php | 7 +- src/PregReplace.php | 4 +- src/RealPath.php | 4 +- src/StringTrim.php | 6 +- src/ToNull.php | 2 +- src/UriNormalize.php | 8 +- test/Compress/ZipTest.php | 23 +- test/File/RenameUploadTest.php | 3 + test/FilterPluginManagerCompatibilityTest.php | 4 +- 24 files changed, 744 insertions(+), 735 deletions(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index ad362ba9..9663d06b 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,18 +1,18 @@ - + - filterable + - $value + - setNullOnAllEmpty - setNullOnEmpty + + - $expectedInputs + @@ -23,80 +23,87 @@ - gettype($options) + - [] + - $value + options]]> - is_object($options) + - assert(is_string($encoding)) - is_string($encoding) + + - is_string($encoding) + - setList - setStrict + + - (bool) $strict + - DenyList + - $typeOrOptions + + + + ]]> + options['translations'][$message]]]> - $flag - $message + + - $value + + + options['casting']]]> + options['type']]]> + - $type + options['casting']]]> - options['translations']]]> options['type']]]> - getTranslations + - $constants + - (bool) $flag + - is_int($value) + @@ -104,59 +111,59 @@ options['callback'], $params)]]> - array - callable + + - new $callback() + options['callback']]]> options['callback_params']]]> - $options + - $callbackOrOptions + - getCallback + - (array) $params + - is_string($adapter) + - mixed + - $options + - $value + - new $adapter($options) + - $options + - getOptions + - [] + - $option + options[$option]]]> @@ -164,49 +171,56 @@ - $compressed + - string + - $content - $content + + options['archive']]]> - options['blocksize']]]> - (int) $blocksize - (string) $archive + + - null !== $content - null !== $content + + - bzclose - bzclose - bzwrite + + + + + + + - $compressed + - string + - $size + - $size + + + options['level']]]> + options['mode']]]> + - $content - $content + + options['archive']]]> @@ -215,33 +229,39 @@ options['mode']]]> - (int) $level - (string) $archive + + - null !== $content - null !== $content - null !== $content + + + - $content - $content + + - $options + - bool - string|null + + + + + + + options['target']]]> + - $content - $content + + options['archive']]]> @@ -250,74 +270,76 @@ options['target']]]> - (string) $target + - (string) $archive - (string) $password + + - ! $archive - ! $filelist - $archive - $filelist + + + + - $filelist + - $compressed - $compressed + + - string - string + + - $compressed - $compressed + + - $content - $content + + - $options + - $result === false + - string + + - $content + - $file[] + - $content - $directory - $file[] - $info + + + + - isFile + getArchive()]]> + options['target']]]> - $content - $content + + - $content + getArchive()]]> @@ -326,40 +348,40 @@ options['target']]]> - $file - $file + + - (string) $target + - (string) $archive + - $res - $res - $res - $res - $res + + + + + - string + - $res + options['archive']]]> - $content - $content + + - strrpos($content, DIRECTORY_SEPARATOR) - strrpos($content, DIRECTORY_SEPARATOR) + + getArchive()]]> @@ -370,46 +392,40 @@ options['target']]]> - (string) $target + - (string) $archive + - $res !== true + - setMode - setPrecision - setPrefixes - setUnit + + + + - $prefixes[$index] + - - options['mode']]]> - options['precision']]]> - options['prefixes']]]> - options['unit']]]> - - isDecimalMode - setMode - setPrecision - setPrefixes - setUnit + + + + + - (int) $precision - (string) $unit + + - $result + getCode()]]> @@ -417,100 +433,100 @@ - $value + - $value + - Encrypt + - Decrypt + - is_string($value) + - string + - decrypt + adapter->decrypt($value)]]> - $value + - return $value; + - setList - setStrict + + - (bool) $strict + - Encrypt\EncryptionAlgorithmInterface + - ! is_string($value) + - new $adapter($options) + - $adapter + - $adapter - $adapter - $adapter - $adapter - $adapter - $adapter + + + + + + adapter]]> adapter]]> - $adapter - $adapter + + - string - string + + - encrypt - new $adapter($options) - new $adapter($options) - toString + + + + adapter->encrypt($value)]]> adapter->toString()]]> - $value + - return $value; + - __call - getAdapter - getAdapterInstance + + + @@ -518,18 +534,18 @@ - BlockCipher + - is_array($options) - is_array($options) + + compression)]]> encryption)]]> - $encryption + encryption]]> encryption]]> encryption]]> @@ -539,7 +555,7 @@ encryption]]> - $value + compression]]> @@ -562,51 +578,51 @@ encryption['vector']]]> - $decrypted - $options - $value + + + - array - string - string - string + + + + encryption]]> - $decrypted - $decrypted + + encryption]]> encryption['key']]]> encryption['vector']]]> - $compression + - __construct - getCompression - getEncryption - getKey - getVector + + + + + - $compression + - setCipherAlgorithm - setHashAlgorithm - setKeyIteration - setSalt + + + + - decrypt - encrypt - toString + + + @@ -615,98 +631,101 @@ compression]]> - Openssl + - is_array($keys) + - array_values($keys) + - $envKey + - $length - $length + + - $key - $key - $key - $options + + + + - $fingerprints[$key] + - $count - $decrypted - $envKey - $i - $i + + + + + - $length - $option - $option - $option + + + + - string + - $i + keys]]> - $decrypted - $decrypted + + - __construct - getCompression - getPackage - getPrivateKey - getPublicKey - setEnvelopeKey - setPrivateKey - setPublicKey + + + + + + + + - (bool) $package + - is_string($key) + + + + - Filter\Decrypt - Filter\Decrypt - parent::filter($content) + + + - string|array - string|array + + filename]]> filename]]> filename]]> - $value - $value + + @@ -714,34 +733,34 @@ filename]]> - $value + - string|array + filename]]> filename]]> - $uploadData + - $value + - return $value; + - $filename + - $uploadData + - getFilename - setFilename + + - $filename + filename)]]> @@ -749,21 +768,21 @@ - Filter\Encrypt - parent::filter($content) + + - string|array + filename]]> filename]]> filename]]> - $value - $value + + @@ -771,34 +790,34 @@ filename]]> - $value + - string|array + filename]]> filename]]> - $uploadData + - $value + - return $value; + - $filename + - $uploadData + - getFilename - setFilename + + - $filename + filename)]]> @@ -806,29 +825,20 @@ - $value + - $uploadData + - is_array($options) - is_array($options) + + - - - - - $file - $this - $this + - - array - @@ -837,10 +847,10 @@ - $value + - $options + @@ -853,36 +863,37 @@ - $value - $value + + - string + + - $uploadData - $uploadData + + files]]> - is_string($file) + - $target === null - is_string($target) + + - string + options]]> @@ -903,15 +914,15 @@ ]]]> - $clientFilename - $sourceFile - $sourceFile - $sourceFile - $sourceFile - $sourceFile + + + + + + - $value + alreadyFiltered[$sourceFile]]]> @@ -919,14 +930,14 @@ alreadyFiltered[$sourceFile]]]> - $clientFilename - $sourceFile - $sourceFile + + + - UploadedFileInterface + ]]> - string + alreadyFiltered[$alreadyFilteredKey]]]> @@ -934,156 +945,147 @@ alreadyFiltered[$sourceFile]]]> - $fileData + alreadyFiltered[$sourceFile]]]> - $value + options['target']]]> - $sourceFile - $sourceFile + + - $sourceFile - $sourceFile + + - $clientFileName - $clientFileName - $clientFileName + + + - - options['overwrite']]]> - options['randomize']]]> - options['stream_factory']]]> - options['target']]]> - options['upload_file_factory']]]> - options['use_upload_extension']]]> - options['use_upload_name']]]> - - setOverwrite - setRandomize - setUseUploadExtension - setUseUploadName + + + + - bool + - (bool) $flag - (bool) $flag - (bool) $flag - (bool) $flag + + + + - $value + - $uploadData + - new PriorityQueue() + - $options + - plugin + - strtolower + - Blacklist::class - Decrypt::class - Decrypt::class - Decrypt::class - Decrypt::class - Decrypt::class - Encrypt::class - Encrypt::class - Encrypt::class - Encrypt::class - Encrypt::class - File\Decrypt::class - File\Decrypt::class - File\Decrypt::class - File\Decrypt::class - File\Decrypt::class - File\Decrypt::class - File\Encrypt::class - File\Encrypt::class - File\Encrypt::class - File\Encrypt::class - File\Encrypt::class - File\Encrypt::class - Whitelist::class + + + + + + + + + + + + + + + + + + + + + + + + InvokableFactory::class]]> InvokableFactory::class]]> - ($name is class-string ? InstanceType : callable(mixed): mixed) + - $factories + - $name + - validatePlugin + - $shareByDefault + - - $options ?: [] - - FilterPluginManagerFactory + - $name - $name - $requestedName + + + - $creationOptions + creationOptions]]> + + + - $container + - FilterProviderInterface + - is_array($options) + @@ -1096,11 +1098,11 @@ - $temp + - (bool) $doubleQuote - (string) $value + + @@ -1108,10 +1110,10 @@ - array_values($processedParts) + - $spec[0] + @@ -1122,26 +1124,26 @@ - $processedPart - $rule - $rules[$spec] - $source[$ruleName] - $spec + + + + + - $sourceName - $spec + + rules[$spec][]]]> - $processedPart - $processedPart - $rule - $ruleFilter - $ruleValue - $sourceValue + + + + + + @@ -1149,11 +1151,11 @@ - $ruleFilter($processedPart) + - FilterInterface|false - array|false + + @@ -1166,71 +1168,64 @@ - $source + - $source + - self + - $pluginManager - $target + + - (string) $targetReplacementIdentifier + - (bool) $throwTargetExceptionsOn - (string) $rule - (string) $spec - (string) $target - (string) $value + + + + + - $reference - $target + + - getConfig + - $moduleManager + - ModuleManager + - Module + - $pattern + - bool + - $args[0] - $args[1] + + - - options['pattern']]]> - options['pattern']]]> - options['pattern']]]> - options['replacement']]]> - options['replacement']]]> - - bool + @@ -1241,47 +1236,42 @@ ]]]> - $existsOrOptions - $existsOrOptions + + - - options['exists']]]> - options['exists']]]> - - (bool) $flag + - $existsOrOptions !== null + - is_string($prefix) + - is_string($suffix) + - $encodingOrOptions - $encodingOrOptions + + - $encodingOrOptions - $encodingOrOptions + + options['charlist']]]> options['charlist']]]> - options['charlist']]]> @@ -1290,55 +1280,52 @@ - $attribute - $element + + - $temp + - is_array($options) - is_string($attribute) + + - $typeOrOptions + - $value + - $type + - - options['type']]]> - - $constants + - is_int($value) + - $encodingOrOptions - $encodingOrOptions + + enforcedScheme && ! $uri->getScheme()) { + if ($this->enforcedScheme !== null && $uri->getScheme() === null) { $this->enforceScheme($uri); } } catch (UriException) { @@ -1347,30 +1334,30 @@ }]]> - $defaultScheme + - setDefaultScheme - setEnforcedScheme + + - AllowList + - is_string($separator) + - $separator + - $separator + - getSeparator + @@ -1379,22 +1366,22 @@ - $matches - $matches - $matches - $matches + + + + - $matches[1] - $matches[1] - $matches[2] - $matches[2] + + + + - $matches[1] - $matches[1] - $matches[2] - $matches[2] + + + + @@ -1410,103 +1397,103 @@ - SeparatorToSeparatorFactory + - $creationOptions + - setCreationOptions + - __construct - setCreationOptions + + - $value + - static function ($value) { + - $value - $value - $value + + + - is_array($value) ? array_map($lowerCaseFirst, $value) : $lowerCaseFirst($value) + - class extends AbstractUnicode { + - encodingProvider + - $strict + - $expected - $value + + - $data - [$value, $expected] + + - defaultTestProvider - listTestProvider + + - returnUnfilteredDataProvider + - new BlacklistFilter() + - $type + - $value - $value - $value - $value + + + + - $expected - $expected - $value - $value + + + + - $data - $data - $type - [$value, $expected] - [$value, $expected] + + + + + - combinedTypeTestProvider - defaultTestProvider - duplicateProvider - noCastingTestProvider - typeTestProvider + + + + + @@ -1517,203 +1504,199 @@ - assertTrue - assertTrue + + - testBz2DecompressNullValueIsAccepted + - null - null + + - assertTrue + - null - null + + - new Lzf() - new Lzf() + + - bool + - new SnappyCompression() - new SnappyCompression() - new SnappyCompression() - new SnappyCompression() - new SnappyCompression() - new SnappyCompression() + + + + + + - $compressed + - returnUnfilteredDataProvider + - getArchive - getArchive + + - binaryBytesTestProvider - decimalBytesTestProvider + + - provideFilter + - returnUnfilteredDataProvider + - provideFilter + - $compressed + - returnUnfilteredDataProvider + - $expected - $value + + - $data - [$value, $expected] + + - defaultTestProvider - listTestProvider + + - returnUnfilteredDataProvider + - returnUnfilteredDataProvider + - $input + - returnUnfilteredDataProvider + - 1234 - 1234 + + - returnUnfilteredDataProvider + - 1234 + sourceFile)]]> sourceFile)]]> sourceFile)]]> sourceFile)]]> - $firstResult + - $firstResult + - - - - - returnUnfilteredDataProvider + - $input + - returnUnfilteredDataProvider + - staticUcaseFilter + - getServiceLocator + - $container - $value - $value + + + $value]]> $value]]> - testFactoryConfiguresPluginManagerUnderServiceManagerV2 + - $container + - returnUnfilteredDataProvider + - assertNull - assertSame + + - $rule - $rule + + - $inflector + - _testOptions + @@ -1722,47 +1705,47 @@ - $rule - $rule + + - $filtered - $filtered - $filtered - $rules + + + + - getPluginManager - getRules - getTarget - getTargetReplacementIdentifier - isThrowTargetExceptionsOn + + + + + - $rule + - $rules - $rules + + - $filtered - $rule - $target + + + - provideFilter + - PregReplaceFilter::hasPcreUnicodeSupport() + - returnNonStringScalarValues - returnUnfilteredDataProvider + + @@ -1770,38 +1753,38 @@ - returnUnfilteredDataProvider + - $value - $value + + - $filteredValue + - $value - $value + + - $prefix + - invalidPrefixesDataProvider + - $suffix + - invalidSuffixesDataProvider + @@ -1809,159 +1792,159 @@ getMessage()]]> - returnUnfilteredDataProvider + - returnUnfilteredDataProvider + - getNonStringValues + - returnNonStringScalarValues - returnUnfilteredDataProvider + + - $filtered + - $filtered + - badCommentProvider - returnUnfilteredDataProvider + + - $value + - objectCallbackWithParams + - $value + - $value + - filterableValuesProvider - unfilterableValuesProvider + + - returnUnfilteredDataProvider + - $type + - true + - $value - $value - $value + + + - $expected - $expected - $value - $value + + + + - $data - $data - $type - [$value, $expected] - [$value, $expected] + + + + + - combinedTypeTestProvider - defaultTestProvider - duplicateTypeProvider - typeTestProvider + + + + - returnUnfilteredDataProvider + - abnormalUriProvider - enforcedSchemeTestcaseProvider - returnUnfilteredDataProvider + + + - returnNonStringScalarValues - returnUnfilteredDataProvider + + - $filtered - $filtered + + - returnNonStringScalarValues - returnUnfilteredDataProvider + + - returnNonStringScalarValues - returnUnfilteredDataProvider + + - returnNonStringScalarValues - returnUnfilteredDataProvider + + - $filtered - $filtered - $filtered - $filtered - $filtered + + + + + - $filtered - $filtered - $filtered - $filtered - $filtered - $filtered + + + + + + diff --git a/src/Boolean.php b/src/Boolean.php index e88c0742..ba892140 100644 --- a/src/Boolean.php +++ b/src/Boolean.php @@ -198,7 +198,7 @@ public function setTranslations($translations) */ public function getTranslations() { - return $this->options['translations']; + return $this->options['translations'] ?? []; } /** diff --git a/src/Compress/Bz2.php b/src/Compress/Bz2.php index e519a4fe..f3d6e215 100644 --- a/src/Compress/Bz2.php +++ b/src/Compress/Bz2.php @@ -29,6 +29,8 @@ */ class Bz2 extends AbstractCompressionAlgorithm { + private const DEFAULT_BLOCK_SIZE = 4; + /** * Compression Options * array( @@ -39,7 +41,7 @@ class Bz2 extends AbstractCompressionAlgorithm * @var Options */ protected $options = [ - 'blocksize' => 4, + 'blocksize' => self::DEFAULT_BLOCK_SIZE, 'archive' => null, ]; @@ -62,7 +64,7 @@ public function __construct($options = null) */ public function getBlocksize() { - return $this->options['blocksize']; + return $this->options['blocksize'] ?? self::DEFAULT_BLOCK_SIZE; } /** @@ -114,7 +116,7 @@ public function setArchive($archive) public function compress($content) { $archive = $this->getArchive(); - if (! empty($archive)) { + if ($archive !== null) { $file = bzopen($archive, 'w'); if (! $file) { throw new Exception\RuntimeException("Error opening the archive '" . $archive . "'"); diff --git a/src/Compress/Gz.php b/src/Compress/Gz.php index 6b4cb8eb..74b7def8 100644 --- a/src/Compress/Gz.php +++ b/src/Compress/Gz.php @@ -169,7 +169,7 @@ public function compress($content) $compressed = gzcompress($content, $this->getLevel()); } - if (! $compressed) { + if ($compressed === false) { throw new Exception\RuntimeException('Error during compression'); } diff --git a/src/Compress/Tar.php b/src/Compress/Tar.php index 4a41181c..bbd7078f 100644 --- a/src/Compress/Tar.php +++ b/src/Compress/Tar.php @@ -216,10 +216,10 @@ public function compress($content) */ public function decompress($content) { - $archive = $this->getArchive(); + $archive = (string) $this->getArchive(); if (file_exists($content)) { $archive = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, realpath($content)); - } elseif (empty($archive) || ! file_exists($archive)) { + } elseif ($archive === '' || ! file_exists($archive)) { throw new Exception\RuntimeException('Tar Archive not found'); } diff --git a/src/Compress/Zip.php b/src/Compress/Zip.php index 79af19f6..080a2f32 100644 --- a/src/Compress/Zip.php +++ b/src/Compress/Zip.php @@ -212,15 +212,15 @@ public function decompress($content) $res = $zip->open($archive); $target = $this->getTarget(); - if (! empty($target) && ! is_dir($target)) { + if (is_string($target) && ! is_dir($target)) { $target = dirname($target); } - if (! empty($target)) { + if (is_string($target)) { $target = rtrim($target, '/\\') . DIRECTORY_SEPARATOR; } - if (empty($target) || ! is_dir($target)) { + if (! is_string($target) || ! is_dir($target)) { throw new Exception\RuntimeException('No target for ZIP decompression set'); } diff --git a/src/DataUnitFormatter.php b/src/DataUnitFormatter.php index 62c657f9..132958fa 100644 --- a/src/DataUnitFormatter.php +++ b/src/DataUnitFormatter.php @@ -32,6 +32,7 @@ final class DataUnitFormatter extends AbstractFilter public const BASE_BINARY = 1024; public const BASE_DECIMAL = 1000; + private const DEFAULT_PRECISION = 2; /** * A list of all possible filter modes: * @@ -64,7 +65,7 @@ final class DataUnitFormatter extends AbstractFilter protected $options = [ 'mode' => self::MODE_DECIMAL, 'unit' => '', - 'precision' => 2, + 'precision' => self::DEFAULT_PRECISION, 'prefixes' => [], ]; @@ -106,7 +107,7 @@ protected function setMode($mode) */ protected function getMode() { - return $this->options['mode']; + return $this->options['mode'] ?? self::MODE_DECIMAL; } /** @@ -146,7 +147,7 @@ protected function setUnit($unit) */ protected function getUnit() { - return $this->options['unit']; + return $this->options['unit'] ?? ''; } /** @@ -166,7 +167,7 @@ protected function setPrecision($precision) */ protected function getPrecision() { - return $this->options['precision']; + return $this->options['precision'] ?? self::DEFAULT_PRECISION; } /** @@ -186,8 +187,8 @@ protected function setPrefixes(array $prefixes) */ protected function getPrefixes() { - $prefixes = $this->options['prefixes']; - if ($prefixes) { + $prefixes = $this->options['prefixes'] ?? null; + if ($prefixes !== null && $prefixes !== []) { return $prefixes; } diff --git a/src/DateTimeFormatter.php b/src/DateTimeFormatter.php index 2aad025a..9bf94419 100644 --- a/src/DateTimeFormatter.php +++ b/src/DateTimeFormatter.php @@ -35,7 +35,7 @@ class DateTimeFormatter extends AbstractFilter */ public function __construct($options = null) { - if ($options) { + if ($options !== null) { $this->setOptions($options); } } diff --git a/src/File/Decrypt.php b/src/File/Decrypt.php index 9cef96b1..9af148fb 100644 --- a/src/File/Decrypt.php +++ b/src/File/Decrypt.php @@ -92,14 +92,14 @@ public function filter($value) } $content = file_get_contents($value); - if (! $content) { + if ($content === false) { throw new Exception\RuntimeException("Problem while reading file '$value'"); } $decrypted = parent::filter($content); $result = file_put_contents($this->filename, $decrypted); - if (! $result) { + if ($result === false) { throw new Exception\RuntimeException("Problem while writing file '{$this->filename}'"); } diff --git a/src/File/Encrypt.php b/src/File/Encrypt.php index c01cb4ce..b3b3071c 100644 --- a/src/File/Encrypt.php +++ b/src/File/Encrypt.php @@ -92,14 +92,14 @@ public function filter($value) } $content = file_get_contents($value); - if (! $content) { + if ($content === false) { throw new Exception\RuntimeException("Problem while reading file '$value'"); } $encrypted = parent::filter($content); $result = file_put_contents($this->filename, $encrypted); - if (! $result) { + if ($result === false) { throw new Exception\RuntimeException("Problem while writing file '{$this->filename}'"); } diff --git a/src/File/LowerCase.php b/src/File/LowerCase.php index 615733e3..cdbb65e8 100644 --- a/src/File/LowerCase.php +++ b/src/File/LowerCase.php @@ -58,14 +58,14 @@ public function filter($value) } $content = file_get_contents($value); - if (! $content) { + if ($content === false) { throw new Exception\RuntimeException("Problem while reading file '$value'"); } $content = parent::filter($content); $result = file_put_contents($value, $content); - if (! $result) { + if ($result === false) { throw new Exception\RuntimeException("Problem while writing file '$value'"); } diff --git a/src/File/Rename.php b/src/File/Rename.php index 5aaea12f..052a7e4b 100644 --- a/src/File/Rename.php +++ b/src/File/Rename.php @@ -13,6 +13,7 @@ use function count; use function file_exists; use function is_array; +use function is_bool; use function is_dir; use function is_scalar; use function is_string; @@ -232,7 +233,7 @@ public function filter($value) * Supports single and nested arrays * * @param array $options - * @return array + * @return $this */ // @codingStandardsIgnoreStart protected function _convertOptions($options) @@ -267,23 +268,23 @@ protected function _convertOptions($options) } } - if (empty($files)) { + if ($files === []) { return $this; } - if (empty($files['source'])) { + if (! is_string($files['source'] ?? null)) { $files['source'] = '*'; } - if (empty($files['target'])) { + if (! is_string($files['target'] ?? null)) { $files['target'] = '*'; } - if (empty($files['overwrite'])) { + if (! is_bool($files['overwrite'] ?? null)) { $files['overwrite'] = false; } - if (empty($files['randomize'])) { + if (! is_bool($files['randomize'] ?? null)) { $files['randomize'] = false; } diff --git a/src/File/RenameUpload.php b/src/File/RenameUpload.php index 8b7f1e08..a2816e02 100644 --- a/src/File/RenameUpload.php +++ b/src/File/RenameUpload.php @@ -31,13 +31,13 @@ /** * @psalm-type Options = array{ - * target?: string|null, - * use_upload_name?: bool, - * use_upload_extension?: bool, - * overwrite?: bool, - * randomize?: bool, - * stream_factory?: StreamFactoryInterface|null, - * upload_file_factory?: UploadedFileFactoryInterface|null, + * target: string|null, + * use_upload_name: bool, + * use_upload_extension: bool, + * overwrite: bool, + * randomize: bool, + * stream_factory: StreamFactoryInterface|null, + * upload_file_factory: UploadedFileFactoryInterface|null, * ... * } * @template TOptions of Options diff --git a/src/File/UpperCase.php b/src/File/UpperCase.php index 76372026..7d130b60 100644 --- a/src/File/UpperCase.php +++ b/src/File/UpperCase.php @@ -55,14 +55,14 @@ public function filter($value) } $content = file_get_contents($value); - if (! $content) { + if ($content === false) { throw new Exception\RuntimeException("Problem while reading file '$value'"); } $content = parent::filter($content); $result = file_put_contents($value, $content); - if (! $result) { + if ($result === false) { throw new Exception\RuntimeException("Problem while writing file '$value'"); } diff --git a/src/FilterChain.php b/src/FilterChain.php index 18a84811..4c092ed2 100644 --- a/src/FilterChain.php +++ b/src/FilterChain.php @@ -16,6 +16,7 @@ use function get_debug_type; use function is_array; use function is_callable; +use function is_string; use function sprintf; use function strtolower; @@ -86,7 +87,7 @@ public function setOptions($options) foreach ($value as $spec) { $callback = $spec['callback'] ?? false; $priority = $spec['priority'] ?? static::DEFAULT_PRIORITY; - if ($callback) { + if (is_callable($callback)) { $this->attach($callback, $priority); } } @@ -96,7 +97,7 @@ public function setOptions($options) $name = $spec['name'] ?? false; $options = $spec['options'] ?? []; $priority = $spec['priority'] ?? static::DEFAULT_PRIORITY; - if ($name) { + if (is_string($name) && $name !== '') { $this->attachByName($name, $options, $priority); } } diff --git a/src/FilterPluginManagerFactory.php b/src/FilterPluginManagerFactory.php index 8051d677..b7a5dfda 100644 --- a/src/FilterPluginManagerFactory.php +++ b/src/FilterPluginManagerFactory.php @@ -7,10 +7,14 @@ use Laminas\ServiceManager\Config; use Laminas\ServiceManager\FactoryInterface; use Laminas\ServiceManager\ServiceLocatorInterface; +use Laminas\ServiceManager\ServiceManager; use Psr\Container\ContainerInterface; use function is_array; +/** + * @psalm-import-type ServiceManagerConfiguration from ServiceManager + */ class FilterPluginManagerFactory implements FactoryInterface { /** @@ -23,11 +27,12 @@ class FilterPluginManagerFactory implements FactoryInterface /** * {@inheritDoc} * + * @param ServiceManagerConfiguration|null $options * @return FilterPluginManager */ public function __invoke(ContainerInterface $container, $name, ?array $options = null) { - $pluginManager = new FilterPluginManager($container, $options ?: []); + $pluginManager = new FilterPluginManager($container, $options ?? []); // If this is in a laminas-mvc application, the ServiceListener will inject // merged configuration during bootstrap. diff --git a/src/PregReplace.php b/src/PregReplace.php index bb793778..8ff8a23e 100644 --- a/src/PregReplace.php +++ b/src/PregReplace.php @@ -19,8 +19,8 @@ /** * @psalm-type Options = array{ - * pattern?: string|list|null, - * replacement?: string|list, + * pattern: string|list|null, + * replacement: string|list, * } * @extends AbstractFilter * @final diff --git a/src/RealPath.php b/src/RealPath.php index 593c7bab..6891180d 100644 --- a/src/RealPath.php +++ b/src/RealPath.php @@ -24,7 +24,7 @@ /** * @psalm-type Options = array{ - * exists?: bool, + * exists: bool, * ... * } * @template TOptions of Options @@ -101,7 +101,7 @@ public function filter($value) ErrorHandler::start(); $realpath = realpath($path); ErrorHandler::stop(); - if ($realpath) { + if ($realpath !== false) { return $realpath; } diff --git a/src/StringTrim.php b/src/StringTrim.php index 917a155f..409dd756 100644 --- a/src/StringTrim.php +++ b/src/StringTrim.php @@ -84,11 +84,13 @@ public function filter($value) } $value = (string) $value; - if (null === $this->options['charlist']) { + $charlist = $this->options['charlist']; + + if ($charlist === null) { return $this->unicodeTrim($value); } - return $this->unicodeTrim($value, $this->options['charlist']); + return $this->unicodeTrim($value, $charlist); } /** diff --git a/src/ToNull.php b/src/ToNull.php index a2dbaeae..4c29fcd9 100644 --- a/src/ToNull.php +++ b/src/ToNull.php @@ -18,7 +18,7 @@ /** * @psalm-type Options = array{ - * type?: int-mask-of, + * type: int-mask-of, * } * @extends AbstractFilter * @final diff --git a/src/UriNormalize.php b/src/UriNormalize.php index 547afe68..26ecd652 100644 --- a/src/UriNormalize.php +++ b/src/UriNormalize.php @@ -48,7 +48,7 @@ class UriNormalize extends AbstractFilter */ public function __construct($options = null) { - if ($options) { + if ($options !== null) { $this->setOptions($options); } } @@ -101,16 +101,16 @@ public function filter($value) } $value = (string) $value; - $defaultScheme = $this->defaultScheme ?: $this->enforcedScheme; + $defaultScheme = $this->defaultScheme ?? $this->enforcedScheme; // Reset default scheme if it is not a known scheme - if (! UriFactory::getRegisteredSchemeClass($defaultScheme)) { + if (UriFactory::getRegisteredSchemeClass($defaultScheme) === null) { $defaultScheme = null; } try { $uri = UriFactory::factory($value, $defaultScheme); - if ($this->enforcedScheme && ! $uri->getScheme()) { + if ($this->enforcedScheme !== null && $uri->getScheme() === null) { $this->enforceScheme($uri); } } catch (UriException) { diff --git a/test/Compress/ZipTest.php b/test/Compress/ZipTest.php index 47a1a86b..967387fa 100644 --- a/test/Compress/ZipTest.php +++ b/test/Compress/ZipTest.php @@ -15,6 +15,7 @@ use function file_put_contents; use function getenv; use function is_dir; +use function is_string; use function mkdir; use function rmdir; use function str_replace; @@ -106,7 +107,7 @@ public function tearDown(): void */ public function testBasicUsage(): void { - if (! getenv('TESTS_LAMINAS_FILTER_COMPRESS_ZIP_ENABLED')) { + if (! $this->zipEnabled()) { self::markTestSkipped('ZIP compression tests are currently disabled'); } @@ -177,7 +178,7 @@ public function testZipGetSetTarget(): void */ public function testZipCompressFile(): void { - if (! getenv('TESTS_LAMINAS_FILTER_COMPRESS_ZIP_ENABLED')) { + if (! $this->zipEnabled()) { self::markTestSkipped('ZIP compression tests are currently disabled'); } @@ -203,7 +204,7 @@ public function testZipCompressFile(): void */ public function testCompressNonExistingTargetFile(): void { - if (! getenv('TESTS_LAMINAS_FILTER_COMPRESS_ZIP_ENABLED')) { + if (! $this->zipEnabled()) { self::markTestSkipped('ZIP compression tests are currently disabled'); } @@ -228,7 +229,7 @@ public function testCompressNonExistingTargetFile(): void */ public function testZipCompressDirectory(): void { - if (! getenv('TESTS_LAMINAS_FILTER_COMPRESS_ZIP_ENABLED')) { + if (! $this->zipEnabled()) { self::markTestSkipped('ZIP compression tests are currently disabled'); } @@ -267,7 +268,7 @@ public function testZipToString(): void public function testDecompressWillThrowExceptionWhenDecompressingWithNoTarget(): void { - if (! getenv('TESTS_LAMINAS_FILTER_COMPRESS_ZIP_ENABLED')) { + if (! $this->zipEnabled()) { self::markTestSkipped('ZIP compression tests are currently disabled'); } @@ -296,7 +297,7 @@ public function testDecompressWillThrowExceptionWhenDecompressingWithNoTarget(): #[Group('6026')] public function testDecompressWhenNoArchieveInClass(): void { - if (! getenv('TESTS_LAMINAS_FILTER_COMPRESS_ZIP_ENABLED')) { + if (! $this->zipEnabled()) { self::markTestSkipped('ZIP compression tests are currently disabled'); } @@ -320,4 +321,14 @@ public function testDecompressWhenNoArchieveInClass(): void $content = file_get_contents($this->tmp . '/_compress'); self::assertSame('compress me', $content); } + + private function zipEnabled(): bool + { + /** + * PHPUnit casts true|false env vars to "1"|"" + */ + $value = getenv('TESTS_LAMINAS_FILTER_COMPRESS_ZIP_ENABLED'); + + return is_string($value) && (int) $value === 1; + } } diff --git a/test/File/RenameUploadTest.php b/test/File/RenameUploadTest.php index 730ffcdd..339eb65f 100644 --- a/test/File/RenameUploadTest.php +++ b/test/File/RenameUploadTest.php @@ -14,6 +14,7 @@ use Psr\Http\Message\UploadedFileInterface; use stdClass; +use function assert; use function basename; use function copy; use function glob; @@ -309,6 +310,7 @@ public function testGetFileWithOriginalExtension(): void ]); $oldFilePathInfo = pathinfo($this->sourceFile); + assert(isset($oldFilePathInfo['extension'])); self::assertMatchesRegularExpression( '#' . str_replace('\\', '\\\\', $fileNoExt) . '.' . $oldFilePathInfo['extension'] . '#', @@ -326,6 +328,7 @@ public function testGetRandomizedFileWithOriginalExtension(): void ]); $oldFilePathInfo = pathinfo($this->sourceFile); + assert(isset($oldFilePathInfo['extension'])); self::assertMatchesRegularExpression( '#' . str_replace('\\', '\\\\', $fileNoExt) . '_.{23}\.' . $oldFilePathInfo['extension'] . '#', diff --git a/test/FilterPluginManagerCompatibilityTest.php b/test/FilterPluginManagerCompatibilityTest.php index ec4ceef2..f32d9b65 100644 --- a/test/FilterPluginManagerCompatibilityTest.php +++ b/test/FilterPluginManagerCompatibilityTest.php @@ -73,12 +73,12 @@ public static function aliasProvider(): Generator self::assertIsString($alias); self::assertIsString($target); // Skipping as laminas-i18n is not required by this package - if (strpos($target, '\\I18n\\')) { + if (strpos($target, '\\I18n\\') !== false) { continue; } // Skipping as it has required options - if (strpos($target, 'DataUnitFormatter')) { + if (strpos($target, 'DataUnitFormatter') !== false) { continue; }