diff --git a/composer.json b/composer.json index 5b4f80b8..ad583868 100644 --- a/composer.json +++ b/composer.json @@ -34,6 +34,7 @@ "require": { "php": "^7.4 || ~8.0.0 || ~8.1.0", "ext-intl": "*", + "laminas/laminas-servicemanager": "^3.14.0", "laminas/laminas-stdlib": "^2.7 || ^3.0" }, "require-dev": { @@ -42,15 +43,14 @@ "laminas/laminas-cache-storage-deprecated-factory": "^1.0.0", "laminas/laminas-coding-standard": "~2.3.0", "laminas/laminas-config": "^3.4.0", - "laminas/laminas-eventmanager": "^3.4.0", - "laminas/laminas-filter": "^2.10.0", - "laminas/laminas-servicemanager": "^3.7.0", - "laminas/laminas-validator": "^2.14.0", - "laminas/laminas-view": "^2.20.0", + "laminas/laminas-eventmanager": "^3.5.0", + "laminas/laminas-filter": "^2.16.0", + "laminas/laminas-validator": "^2.17.0", + "laminas/laminas-view": "^2.21.0", "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.3", - "psalm/plugin-phpunit": "^0.16.1", - "vimeo/psalm": "^4.21" + "phpunit/phpunit": "^9.5.21", + "psalm/plugin-phpunit": "^0.17.0", + "vimeo/psalm": "^4.24.0" }, "conflict": { "laminas/laminas-view": "<2.20.0", diff --git a/composer.lock b/composer.lock index 743d8639..7e6c1b09 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5daa1e4758ea5046eb0763efe5009d64", + "content-hash": "7270a6538b3f0a1beffc108034132cf8", "packages": [ { "name": "laminas/laminas-stdlib", - "version": "3.7.1", + "version": "3.10.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "bcd869e2fe88d567800057c1434f2380354fe325" + "reference": "0d669074845fc80a99add0f64025192f143ef836" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/bcd869e2fe88d567800057c1434f2380354fe325", - "reference": "bcd869e2fe88d567800057c1434f2380354fe325", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/0d669074845fc80a99add0f64025192f143ef836", + "reference": "0d669074845fc80a99add0f64025192f143ef836", "shasum": "" }, "require": { @@ -63,7 +63,7 @@ "type": "community_bridge" } ], - "time": "2022-01-21T15:50:46+00:00" + "time": "2022-06-10T14:49:09+00:00" } ], "packages-dev": [ @@ -379,16 +379,16 @@ }, { "name": "composer/semver", - "version": "3.3.1", + "version": "3.3.2", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "5d8e574bb0e69188786b8ef77d43341222a41a71" + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/5d8e574bb0e69188786b8ef77d43341222a41a71", - "reference": "5d8e574bb0e69188786b8ef77d43341222a41a71", + "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", "shasum": "" }, "require": { @@ -440,7 +440,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.1" + "source": "https://github.com/composer/semver/tree/3.3.2" }, "funding": [ { @@ -456,7 +456,7 @@ "type": "tidelift" } ], - "time": "2022-03-16T11:22:07+00:00" + "time": "2022-04-01T19:23:25+00:00" }, { "name": "composer/xdebug-handler", @@ -524,42 +524,6 @@ ], "time": "2022-02-25T21:32:43+00:00" }, - { - "name": "container-interop/container-interop", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/container-interop/container-interop.git", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "shasum": "" - }, - "require": { - "psr/container": "^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Interop\\Container\\": "src/Interop/Container/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "homepage": "https://github.com/container-interop/container-interop", - "support": { - "issues": "https://github.com/container-interop/container-interop/issues", - "source": "https://github.com/container-interop/container-interop/tree/master" - }, - "abandoned": "psr/container", - "time": "2017-02-14T19:40:03+00:00" - }, { "name": "dealerdirect/phpcodesniffer-composer-installer", "version": "v0.7.2", @@ -1252,35 +1216,36 @@ }, { "name": "laminas/laminas-eventmanager", - "version": "3.4.0", + "version": "3.5.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-eventmanager.git", - "reference": "a93fd278c97b2d41ebbce5ba048a24e3e6f580ba" + "reference": "41f7209428f37cab9573365e361f4078209aaafa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/a93fd278c97b2d41ebbce5ba048a24e3e6f580ba", - "reference": "a93fd278c97b2d41ebbce5ba048a24e3e6f580ba", + "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/41f7209428f37cab9573365e361f4078209aaafa", + "reference": "41f7209428f37cab9573365e361f4078209aaafa", "shasum": "" }, "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "php": "^7.4 || ~8.0.0 || ~8.1.0" }, "conflict": { + "container-interop/container-interop": "<1.2", "zendframework/zend-eventmanager": "*" }, "require-dev": { - "container-interop/container-interop": "^1.1", "laminas/laminas-coding-standard": "~2.2.1", "laminas/laminas-stdlib": "^3.6", "phpbench/phpbench": "^1.1", "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.5" + "phpunit/phpunit": "^9.5.5", + "psr/container": "^1.1.2 || ^2.0.2" }, "suggest": { - "container-interop/container-interop": "^1.1, to use the lazy listeners feature", - "laminas/laminas-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature" + "laminas/laminas-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature", + "psr/container": "^1.1.2 || ^2.0.2, to use the lazy listeners feature" }, "type": "library", "autoload": { @@ -1314,23 +1279,24 @@ "type": "community_bridge" } ], - "time": "2021-09-07T22:35:32+00:00" + "time": "2022-04-06T21:05:17+00:00" }, { "name": "laminas/laminas-filter", - "version": "2.14.0", + "version": "2.16.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-filter.git", - "reference": "98a126b8cd069a446054680c9be5f37a61f6dc17" + "reference": "f5a3736cb49f06a3ba8941803bf84559bed4c3fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-filter/zipball/98a126b8cd069a446054680c9be5f37a61f6dc17", - "reference": "98a126b8cd069a446054680c9be5f37a61f6dc17", + "url": "https://api.github.com/repos/laminas/laminas-filter/zipball/f5a3736cb49f06a3ba8941803bf84559bed4c3fa", + "reference": "f5a3736cb49f06a3ba8941803bf84559bed4c3fa", "shasum": "" }, "require": { + "laminas/laminas-servicemanager": "^3.14.0", "laminas/laminas-stdlib": "^3.6.1", "php": "^7.4 || ~8.0.0 || ~8.1.0" }, @@ -1341,7 +1307,6 @@ "require-dev": { "laminas/laminas-coding-standard": "^2.3.0", "laminas/laminas-crypt": "^3.5.1", - "laminas/laminas-servicemanager": "^3.7.0", "laminas/laminas-uri": "^2.9.1", "pear/archive_tar": "^1.4.14", "phpspec/prophecy-phpunit": "^2.0.1", @@ -1393,7 +1358,7 @@ "type": "community_bridge" } ], - "time": "2022-02-22T23:09:15+00:00" + "time": "2022-07-12T14:35:14+00:00" }, { "name": "laminas/laminas-json", @@ -1458,44 +1423,46 @@ }, { "name": "laminas/laminas-servicemanager", - "version": "3.10.0", + "version": "3.14.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-servicemanager.git", - "reference": "e52b985909e0940bf22d34f322eb3f48bbef6bd1" + "reference": "918de970b2c3d42acebff3d431d76db52b6a32a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/e52b985909e0940bf22d34f322eb3f48bbef6bd1", - "reference": "e52b985909e0940bf22d34f322eb3f48bbef6bd1", + "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/918de970b2c3d42acebff3d431d76db52b6a32a2", + "reference": "918de970b2c3d42acebff3d431d76db52b6a32a2", "shasum": "" }, "require": { - "container-interop/container-interop": "^1.2", "laminas/laminas-stdlib": "^3.2.1", "php": "~7.4.0 || ~8.0.0 || ~8.1.0", "psr/container": "^1.0" }, "conflict": { + "ext-psr": "*", "laminas/laminas-code": "<3.3.1", "zendframework/zend-code": "<3.3.1", "zendframework/zend-servicemanager": "*" }, "provide": { - "container-interop/container-interop-implementation": "^1.2", "psr/container-implementation": "^1.0" }, + "replace": { + "container-interop/container-interop": "^1.2.0" + }, "require-dev": { "composer/package-versions-deprecated": "^1.0", - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-container-config-test": "^0.3", + "laminas/laminas-coding-standard": "~2.3.0", + "laminas/laminas-container-config-test": "^0.6", "laminas/laminas-dependency-plugin": "^2.1.2", "mikey179/vfsstream": "^1.6.10@alpha", "ocramius/proxy-manager": "^2.11", "phpbench/phpbench": "^1.1", "phpspec/prophecy-phpunit": "^2.0", "phpunit/phpunit": "^9.5.5", - "psalm/plugin-phpunit": "^0.16.1", + "psalm/plugin-phpunit": "^0.17.0", "vimeo/psalm": "^4.8" }, "suggest": { @@ -1507,6 +1474,9 @@ ], "type": "library", "autoload": { + "files": [ + "src/autoload.php" + ], "psr-4": { "Laminas\\ServiceManager\\": "src/" } @@ -1540,26 +1510,26 @@ "type": "community_bridge" } ], - "time": "2021-09-18T20:19:36+00:00" + "time": "2022-07-07T16:13:26+00:00" }, { "name": "laminas/laminas-validator", - "version": "2.17.0", + "version": "2.20.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-validator.git", - "reference": "bdd503adc83d814a5c94e598ea0eb9fc7ca56339" + "reference": "90304417929a51e42999b115907a39f4b658c131" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/bdd503adc83d814a5c94e598ea0eb9fc7ca56339", - "reference": "bdd503adc83d814a5c94e598ea0eb9fc7ca56339", + "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/90304417929a51e42999b115907a39f4b658c131", + "reference": "90304417929a51e42999b115907a39f4b658c131", "shasum": "" }, "require": { - "container-interop/container-interop": "^1.1", - "laminas/laminas-stdlib": "^3.6", - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "laminas/laminas-servicemanager": "^3.12.0", + "laminas/laminas-stdlib": "^3.10", + "php": "^7.4 || ~8.0.0 || ~8.1.0" }, "conflict": { "zendframework/zend-validator": "*" @@ -1568,27 +1538,24 @@ "laminas/laminas-cache": "^2.6.1", "laminas/laminas-coding-standard": "~2.2.1", "laminas/laminas-db": "^2.7", - "laminas/laminas-filter": "^2.6", + "laminas/laminas-filter": "^2.14.0", "laminas/laminas-http": "^2.14.2", - "laminas/laminas-i18n": "^2.6", - "laminas/laminas-math": "^2.6", - "laminas/laminas-servicemanager": "^2.7.11 || ^3.0.3", - "laminas/laminas-session": "^2.8", - "laminas/laminas-uri": "^2.7", + "laminas/laminas-i18n": "^2.15.0", + "laminas/laminas-session": "^2.12.1", + "laminas/laminas-uri": "^2.9.1", "phpspec/prophecy-phpunit": "^2.0", "phpunit/phpunit": "^9.5.5", "psalm/plugin-phpunit": "^0.15.0", "psr/http-client": "^1.0", "psr/http-factory": "^1.0", "psr/http-message": "^1.0", - "vimeo/psalm": "^4.3" + "vimeo/psalm": "^4.23" }, "suggest": { "laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator", "laminas/laminas-filter": "Laminas\\Filter component, required by the Digits validator", "laminas/laminas-i18n": "Laminas\\I18n component to allow translation of validation error messages", "laminas/laminas-i18n-resources": "Translations of validator messages", - "laminas/laminas-math": "Laminas\\Math component, required by the Csrf validator", "laminas/laminas-servicemanager": "Laminas\\ServiceManager component to allow using the ValidatorPluginManager and validator chains", "laminas/laminas-session": "Laminas\\Session component, ^2.8; required by the Csrf validator", "laminas/laminas-uri": "Laminas\\Uri component, required by the Uri and Sitemap\\Loc validators", @@ -1630,20 +1597,20 @@ "type": "community_bridge" } ], - "time": "2022-03-08T18:16:51+00:00" + "time": "2022-07-01T07:39:15+00:00" }, { "name": "laminas/laminas-view", - "version": "2.20.0", + "version": "2.21.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-view.git", - "reference": "2cd6973a3e042be3d244260fe93f435668f5c2b4" + "reference": "4145f10db72ebfe34d11bc3b6a298aa62ad9533f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-view/zipball/2cd6973a3e042be3d244260fe93f435668f5c2b4", - "reference": "2cd6973a3e042be3d244260fe93f435668f5c2b4", + "url": "https://api.github.com/repos/laminas/laminas-view/zipball/4145f10db72ebfe34d11bc3b6a298aa62ad9533f", + "reference": "4145f10db72ebfe34d11bc3b6a298aa62ad9533f", "shasum": "" }, "require": { @@ -1654,8 +1621,8 @@ "laminas/laminas-escaper": "^2.5", "laminas/laminas-eventmanager": "^3.4", "laminas/laminas-json": "^3.3", - "laminas/laminas-servicemanager": "^3.10", - "laminas/laminas-stdlib": "^3.6", + "laminas/laminas-servicemanager": "^3.14.0", + "laminas/laminas-stdlib": "^3.10.1", "php": "^7.4 || ~8.0.0 || ~8.1.0", "psr/container": "^1 || ^2" }, @@ -1737,7 +1704,7 @@ "type": "community_bridge" } ], - "time": "2022-02-22T13:52:44+00:00" + "time": "2022-07-10T15:36:43+00:00" }, { "name": "myclabs/deep-copy", @@ -1851,16 +1818,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.13.2", + "version": "v4.14.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077" + "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", + "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", "shasum": "" }, "require": { @@ -1901,9 +1868,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" }, - "time": "2021-11-30T19:35:32+00:00" + "time": "2022-05-31T20:59:12+00:00" }, { "name": "openlss/lib-array2xml", @@ -2350,16 +2317,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.4.2", + "version": "1.6.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "4cb3021a4e10ffe3d5f94a4c34cf4b3f6de2fa3d" + "reference": "135607f9ccc297d6923d49c2bcf309f509413215" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/4cb3021a4e10ffe3d5f94a4c34cf4b3f6de2fa3d", - "reference": "4cb3021a4e10ffe3d5f94a4c34cf4b3f6de2fa3d", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/135607f9ccc297d6923d49c2bcf309f509413215", + "reference": "135607f9ccc297d6923d49c2bcf309f509413215", "shasum": "" }, "require": { @@ -2369,6 +2336,7 @@ "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^1.5", + "phpstan/phpstan-phpunit": "^1.1", "phpstan/phpstan-strict-rules": "^1.0", "phpunit/phpunit": "^9.5", "symfony/process": "^5.2" @@ -2388,9 +2356,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.4.2" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.6.4" }, - "time": "2022-03-30T13:33:37+00:00" + "time": "2022-06-26T13:09:08+00:00" }, { "name": "phpunit/php-code-coverage", @@ -2712,16 +2680,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.19", + "version": "9.5.21", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "35ea4b7f3acabb26f4bb640f8c30866c401da807" + "reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/35ea4b7f3acabb26f4bb640f8c30866c401da807", - "reference": "35ea4b7f3acabb26f4bb640f8c30866c401da807", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0e32b76be457de00e83213528f6bb37e2a38fcb1", + "reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1", "shasum": "" }, "require": { @@ -2755,7 +2723,6 @@ "sebastian/version": "^3.0.2" }, "require-dev": { - "ext-pdo": "*", "phpspec/prophecy-phpunit": "^2.0.1" }, "suggest": { @@ -2799,7 +2766,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.19" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.21" }, "funding": [ { @@ -2811,20 +2778,20 @@ "type": "github" } ], - "time": "2022-03-15T09:57:31+00:00" + "time": "2022-06-19T12:14:25+00:00" }, { "name": "psalm/plugin-phpunit", - "version": "0.16.1", + "version": "0.17.0", "source": { "type": "git", "url": "https://github.com/psalm/psalm-plugin-phpunit.git", - "reference": "5dd3be04f37a857d52880ef6af2524a441dfef24" + "reference": "45951541beef07e93e3ad197daf01da88e85c31d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/5dd3be04f37a857d52880ef6af2524a441dfef24", - "reference": "5dd3be04f37a857d52880ef6af2524a441dfef24", + "url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/45951541beef07e93e3ad197daf01da88e85c31d", + "reference": "45951541beef07e93e3ad197daf01da88e85c31d", "shasum": "" }, "require": { @@ -2869,9 +2836,9 @@ "description": "Psalm plugin for PHPUnit", "support": { "issues": "https://github.com/psalm/psalm-plugin-phpunit/issues", - "source": "https://github.com/psalm/psalm-plugin-phpunit/tree/0.16.1" + "source": "https://github.com/psalm/psalm-plugin-phpunit/tree/0.17.0" }, - "time": "2021-06-18T23:56:46+00:00" + "time": "2022-06-14T17:05:57+00:00" }, { "name": "psr/cache", @@ -3437,16 +3404,16 @@ }, { "name": "sebastian/environment", - "version": "5.1.3", + "version": "5.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", "shasum": "" }, "require": { @@ -3488,7 +3455,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" }, "funding": [ { @@ -3496,7 +3463,7 @@ "type": "github" } ], - "time": "2020-09-28T05:52:38+00:00" + "time": "2022-04-03T09:37:03+00:00" }, { "name": "sebastian/exporter", @@ -4037,32 +4004,32 @@ }, { "name": "slevomat/coding-standard", - "version": "7.1", + "version": "7.2.1", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "b521bd358b5f7a7d69e9637fd139e036d8adeb6f" + "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/b521bd358b5f7a7d69e9637fd139e036d8adeb6f", - "reference": "b521bd358b5f7a7d69e9637fd139e036d8adeb6f", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/aff06ae7a84e4534bf6f821dc982a93a5d477c90", + "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", "php": "^7.2 || ^8.0", - "phpstan/phpdoc-parser": "^1.4.1", + "phpstan/phpdoc-parser": "^1.5.1", "squizlabs/php_codesniffer": "^3.6.2" }, "require-dev": { - "phing/phing": "2.17.2", + "phing/phing": "2.17.3", "php-parallel-lint/php-parallel-lint": "1.3.2", - "phpstan/phpstan": "1.4.10|1.5.2", + "phpstan/phpstan": "1.4.10|1.7.1", "phpstan/phpstan-deprecation-rules": "1.0.0", - "phpstan/phpstan-phpunit": "1.0.0|1.1.0", - "phpstan/phpstan-strict-rules": "1.1.0", - "phpunit/phpunit": "7.5.20|8.5.21|9.5.19" + "phpstan/phpstan-phpunit": "1.0.0|1.1.1", + "phpstan/phpstan-strict-rules": "1.2.3", + "phpunit/phpunit": "7.5.20|8.5.21|9.5.20" }, "type": "phpcodesniffer-standard", "extra": { @@ -4082,7 +4049,7 @@ "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", "support": { "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/7.1" + "source": "https://github.com/slevomat/coding-standard/tree/7.2.1" }, "funding": [ { @@ -4094,20 +4061,20 @@ "type": "tidelift" } ], - "time": "2022-03-29T12:44:16+00:00" + "time": "2022-05-25T10:58:12+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.6.2", + "version": "3.7.1", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a" + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a", - "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", "shasum": "" }, "require": { @@ -4150,20 +4117,20 @@ "source": "https://github.com/squizlabs/PHP_CodeSniffer", "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "time": "2021-12-12T21:44:58+00:00" + "time": "2022-06-18T07:21:10+00:00" }, { "name": "symfony/console", - "version": "v5.4.5", + "version": "v5.4.10", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "d8111acc99876953f52fe16d4c50eb60940d49ad" + "reference": "4d671ab4ddac94ee439ea73649c69d9d200b5000" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/d8111acc99876953f52fe16d4c50eb60940d49ad", - "reference": "d8111acc99876953f52fe16d4c50eb60940d49ad", + "url": "https://api.github.com/repos/symfony/console/zipball/4d671ab4ddac94ee439ea73649c69d9d200b5000", + "reference": "4d671ab4ddac94ee439ea73649c69d9d200b5000", "shasum": "" }, "require": { @@ -4233,7 +4200,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.5" + "source": "https://github.com/symfony/console/tree/v5.4.10" }, "funding": [ { @@ -4249,20 +4216,20 @@ "type": "tidelift" } ], - "time": "2022-02-24T12:45:35+00:00" + "time": "2022-06-26T13:00:04+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.0", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", "shasum": "" }, "require": { @@ -4300,7 +4267,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" }, "funding": [ { @@ -4316,20 +4283,20 @@ "type": "tidelift" } ], - "time": "2021-07-12T14:48:14+00:00" + "time": "2022-01-02T09:53:40+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", "shasum": "" }, "require": { @@ -4344,7 +4311,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4382,7 +4349,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" }, "funding": [ { @@ -4398,20 +4365,20 @@ "type": "tidelift" } ], - "time": "2021-10-20T20:35:02+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" + "reference": "433d05519ce6990bf3530fba6957499d327395c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", + "reference": "433d05519ce6990bf3530fba6957499d327395c2", "shasum": "" }, "require": { @@ -4423,7 +4390,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4463,7 +4430,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" }, "funding": [ { @@ -4479,20 +4446,20 @@ "type": "tidelift" } ], - "time": "2021-11-23T21:10:46+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + "reference": "219aa369ceff116e673852dce47c3a41794c14bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", + "reference": "219aa369ceff116e673852dce47c3a41794c14bd", "shasum": "" }, "require": { @@ -4504,7 +4471,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4547,7 +4514,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" }, "funding": [ { @@ -4563,20 +4530,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", "shasum": "" }, "require": { @@ -4591,7 +4558,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4630,7 +4597,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" }, "funding": [ { @@ -4646,20 +4613,20 @@ "type": "tidelift" } ], - "time": "2021-11-30T18:21:41+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" + "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", + "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", "shasum": "" }, "require": { @@ -4668,7 +4635,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4709,7 +4676,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" }, "funding": [ { @@ -4725,20 +4692,20 @@ "type": "tidelift" } ], - "time": "2021-06-05T21:20:04+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", "shasum": "" }, "require": { @@ -4747,7 +4714,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4792,7 +4759,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" }, "funding": [ { @@ -4808,26 +4775,26 @@ "type": "tidelift" } ], - "time": "2022-03-04T08:16:47+00:00" + "time": "2022-05-10T07:21:04+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.0", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc" + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", "shasum": "" }, "require": { "php": ">=7.2.5", "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1" + "symfony/deprecation-contracts": "^2.1|^3" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -4875,7 +4842,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" }, "funding": [ { @@ -4891,20 +4858,20 @@ "type": "tidelift" } ], - "time": "2021-11-04T16:48:04+00:00" + "time": "2022-05-30T19:17:29+00:00" }, { "name": "symfony/string", - "version": "v5.4.3", + "version": "v5.4.10", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10" + "reference": "4432bc7df82a554b3e413a8570ce2fea90e94097" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/92043b7d8383e48104e411bc9434b260dbeb5a10", - "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10", + "url": "https://api.github.com/repos/symfony/string/zipball/4432bc7df82a554b3e413a8570ce2fea90e94097", + "reference": "4432bc7df82a554b3e413a8570ce2fea90e94097", "shasum": "" }, "require": { @@ -4961,7 +4928,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.3" + "source": "https://github.com/symfony/string/tree/v5.4.10" }, "funding": [ { @@ -4977,7 +4944,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-06-26T15:57:47+00:00" }, { "name": "theseer/tokenizer", @@ -5031,16 +4998,16 @@ }, { "name": "vimeo/psalm", - "version": "4.22.0", + "version": "4.24.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "fc2c6ab4d5fa5d644d8617089f012f3bb84b8703" + "reference": "06dd975cb55d36af80f242561738f16c5f58264f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/fc2c6ab4d5fa5d644d8617089f012f3bb84b8703", - "reference": "fc2c6ab4d5fa5d644d8617089f012f3bb84b8703", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/06dd975cb55d36af80f242561738f16c5f58264f", + "reference": "06dd975cb55d36af80f242561738f16c5f58264f", "shasum": "" }, "require": { @@ -5065,6 +5032,7 @@ "php": "^7.1|^8", "sebastian/diff": "^3.0 || ^4.0", "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0", + "symfony/polyfill-php80": "^1.25", "webmozart/path-util": "^2.3" }, "provide": { @@ -5131,9 +5099,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.22.0" + "source": "https://github.com/vimeo/psalm/tree/4.24.0" }, - "time": "2022-02-24T20:34:05+00:00" + "time": "2022-06-26T11:47:54+00:00" }, { "name": "webimpress/coding-standard", @@ -5192,21 +5160,21 @@ }, { "name": "webmozart/assert", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" }, "conflict": { "phpstan/phpstan": "<0.12.20", @@ -5244,9 +5212,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2022-06-03T18:03:27+00:00" }, { "name": "webmozart/path-util", @@ -5313,5 +5281,5 @@ "platform-overrides": { "php": "7.4.99" }, - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 26661a56..5ef8105d 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,29 +1,5 @@ - - - - - \Zend\I18n\Filter\Alnum - \Zend\I18n\Filter\Alpha - \Zend\I18n\Filter\NumberFormat - \Zend\I18n\Filter\NumberParse - \Zend\I18n\Translator\LoaderPluginManager - \Zend\I18n\Translator\TranslatorInterface - \Zend\I18n\Validator\Alnum - \Zend\I18n\Validator\Alpha - \Zend\I18n\Validator\DateTime - \Zend\I18n\Validator\IsFloat - \Zend\I18n\Validator\IsInt - \Zend\I18n\Validator\PhoneNumber - \Zend\I18n\Validator\PostCode - \Zend\I18n\View\Helper\CurrencyFormat - \Zend\I18n\View\Helper\DateFormat - \Zend\I18n\View\Helper\NumberFormat - \Zend\I18n\View\Helper\Plural - \Zend\I18n\View\Helper\Translate - \Zend\I18n\View\Helper\TranslatePlural - - + string @@ -209,8 +185,6 @@ validatePlugin - - $aliases $factories @@ -218,16 +192,15 @@ $plugin - - Gettext - Ini - PhpArray - LoaderPluginManagerFactory + + $this->creationOptions + $this->creationOptions + $config['translator_plugins'] @@ -402,10 +375,6 @@ $r $r - - static function ($r) { - static function ($r) { - $events $pluginManager @@ -520,41 +489,15 @@ - - ! is_string($value) && ! is_int($value) && ! is_float($value) - null === static::$filter - $value - - $this->options['allowWhiteSpace'] - - - bool - - - $this->options['allowWhiteSpace'] - - - $value - (bool) $allowWhiteSpace (bool) $allowWhiteSpace - - is_string($value) - null === static::$filter - - - $this->options['allowWhiteSpace'] - - - $value - $filter @@ -583,23 +526,15 @@ - - ! is_scalar($value) - is_bool($value) - $options['locale'] - - $value - $lastStringGroup - - ! is_string($value) && ! is_int($value) && ! is_float($value) + is_bool($strict) @@ -607,9 +542,6 @@ $options['locale'] $options['strict'] - - $value - $locale @@ -648,9 +580,6 @@ static::$phone[$code] - - $value - (bool) $possible @@ -660,9 +589,6 @@ getService setService - - ! is_string($value) && ! is_int($value) - $value $value @@ -684,9 +610,6 @@ $format $format - - $value - @@ -924,10 +847,6 @@ $container $container - - static function ($container) use ($translator) { - static function ($container) use ($translator) { - $container $container @@ -1049,19 +968,6 @@ $doNotTrigger - - - [1 => 1] - - - - - [1 => 1] - - - [1 => 1] - - testApplicationOptionLocale @@ -1083,24 +989,12 @@ - - [1 => 1] - - - $message['notFloat'] - $value - $value - - [1 => 1] - - - $intVal - $intVal + $strict @@ -1113,11 +1007,6 @@ static function ($value) use ($params) { static function ($value) use ($params) { - - $message['postcodeNoMatch'] - $message['postcodeService'] - $postCode - diff --git a/src/ConfigProvider.php b/src/ConfigProvider.php index bade3531..1eadd7ca 100644 --- a/src/ConfigProvider.php +++ b/src/ConfigProvider.php @@ -2,14 +2,20 @@ namespace Laminas\I18n; +use Laminas\ServiceManager\ConfigInterface; use Laminas\ServiceManager\Factory\InvokableFactory; +/** + * @see ConfigInterface + * + * @psalm-import-type ServiceManagerConfigurationType from ConfigInterface + */ class ConfigProvider { /** * Return general-purpose laminas-i18n configuration. * - * @return array + * @return array */ public function __invoke() { @@ -24,7 +30,7 @@ public function __invoke() /** * Return application-level dependency configuration. * - * @return array + * @return ServiceManagerConfigurationType */ public function getDependencyConfig() { @@ -33,10 +39,8 @@ public function getDependencyConfig() 'TranslatorPluginManager' => Translator\LoaderPluginManager::class, // Legacy Zend Framework aliases - // @codingStandardsIgnoreStart - \Zend\I18n\Translator\TranslatorInterface::class => Translator\TranslatorInterface::class, - \Zend\I18n\Translator\LoaderPluginManager::class => Translator\LoaderPluginManager::class, - // @codingStandardsIgnoreEnd + 'Zend\I18n\Translator\TranslatorInterface' => Translator\TranslatorInterface::class, + 'Zend\I18n\Translator\LoaderPluginManager' => Translator\LoaderPluginManager::class, ], 'factories' => [ Translator\TranslatorInterface::class => Translator\TranslatorServiceFactory::class, @@ -48,7 +52,7 @@ public function getDependencyConfig() /** * Return laminas-filter configuration. * - * @return array + * @return ServiceManagerConfigurationType */ public function getFilterConfig() { @@ -66,12 +70,10 @@ public function getFilterConfig() 'NumberParse' => Filter\NumberParse::class, // Legacy Zend Framework aliases - // @codingStandardsIgnoreStart - \Zend\I18n\Filter\Alnum::class => Filter\Alnum::class, - \Zend\I18n\Filter\Alpha::class => Filter\Alpha::class, - \Zend\I18n\Filter\NumberFormat::class => Filter\NumberFormat::class, - \Zend\I18n\Filter\NumberParse::class => Filter\NumberParse::class, - // @codingStandardsIgnoreEnd + 'Zend\I18n\Filter\Alnum' => Filter\Alnum::class, + 'Zend\I18n\Filter\Alpha' => Filter\Alpha::class, + 'Zend\I18n\Filter\NumberFormat' => Filter\NumberFormat::class, + 'Zend\I18n\Filter\NumberParse' => Filter\NumberParse::class, ], 'factories' => [ Filter\Alnum::class => InvokableFactory::class, @@ -85,7 +87,7 @@ public function getFilterConfig() /** * Return laminas-validator configuration. * - * @return array + * @return ServiceManagerConfigurationType */ public function getValidatorConfig() { @@ -116,15 +118,13 @@ public function getValidatorConfig() 'PostCode' => Validator\PostCode::class, // Legacy Zend Framework aliases - // @codingStandardsIgnoreStart - \Zend\I18n\Validator\Alnum::class => Validator\Alnum::class, - \Zend\I18n\Validator\Alpha::class => Validator\Alpha::class, - \Zend\I18n\Validator\DateTime::class => Validator\DateTime::class, - \Zend\I18n\Validator\IsFloat::class => Validator\IsFloat::class, - \Zend\I18n\Validator\IsInt::class => Validator\IsInt::class, - \Zend\I18n\Validator\PhoneNumber::class => Validator\PhoneNumber::class, - \Zend\I18n\Validator\PostCode::class => Validator\PostCode::class, - // @codingStandardsIgnoreEnd + 'Zend\I18n\Validator\Alnum' => Validator\Alnum::class, + 'Zend\I18n\Validator\Alpha' => Validator\Alpha::class, + 'Zend\I18n\Validator\DateTime' => Validator\DateTime::class, + 'Zend\I18n\Validator\IsFloat' => Validator\IsFloat::class, + 'Zend\I18n\Validator\IsInt' => Validator\IsInt::class, + 'Zend\I18n\Validator\PhoneNumber' => Validator\PhoneNumber::class, + 'Zend\I18n\Validator\PostCode' => Validator\PostCode::class, ], 'factories' => [ Validator\Alnum::class => InvokableFactory::class, @@ -143,7 +143,7 @@ public function getValidatorConfig() * * Obsoletes View\HelperConfig. * - * @return array + * @return ServiceManagerConfigurationType */ public function getViewHelperConfig() { @@ -167,14 +167,12 @@ public function getViewHelperConfig() 'TranslatePlural' => View\Helper\TranslatePlural::class, // Legacy Zend Framework aliases - // @codingStandardsIgnoreStart - \Zend\I18n\View\Helper\CurrencyFormat::class => View\Helper\CurrencyFormat::class, - \Zend\I18n\View\Helper\DateFormat::class => View\Helper\DateFormat::class, - \Zend\I18n\View\Helper\NumberFormat::class => View\Helper\NumberFormat::class, - \Zend\I18n\View\Helper\Plural::class => View\Helper\Plural::class, - \Zend\I18n\View\Helper\Translate::class => View\Helper\Translate::class, - \Zend\I18n\View\Helper\TranslatePlural::class => View\Helper\TranslatePlural::class, - // @codingStandardsIgnoreEnd + 'Zend\I18n\View\Helper\CurrencyFormat' => View\Helper\CurrencyFormat::class, + 'Zend\I18n\View\Helper\DateFormat' => View\Helper\DateFormat::class, + 'Zend\I18n\View\Helper\NumberFormat' => View\Helper\NumberFormat::class, + 'Zend\I18n\View\Helper\Plural' => View\Helper\Plural::class, + 'Zend\I18n\View\Helper\Translate' => View\Helper\Translate::class, + 'Zend\I18n\View\Helper\TranslatePlural' => View\Helper\TranslatePlural::class, ], 'factories' => [ View\Helper\CurrencyFormat::class => InvokableFactory::class, diff --git a/src/Module.php b/src/Module.php index 0d4ff8a1..ad37904b 100644 --- a/src/Module.php +++ b/src/Module.php @@ -3,13 +3,19 @@ namespace Laminas\I18n; use Laminas\ModuleManager\ModuleManager; +use Laminas\ServiceManager\ConfigInterface; +/** + * @see ConfigInterface + * + * @psalm-import-type ServiceManagerConfigurationType from ConfigInterface + */ class Module { /** * Return laminas-i18n configuration for laminas-mvc application. * - * @return array + * @return array */ public function getConfig() { diff --git a/src/Translator/LoaderPluginManager.php b/src/Translator/LoaderPluginManager.php index 6d01a761..ed8668a8 100644 --- a/src/Translator/LoaderPluginManager.php +++ b/src/Translator/LoaderPluginManager.php @@ -3,12 +3,11 @@ namespace Laminas\I18n\Translator; use Laminas\I18n\Exception; +use Laminas\I18n\Translator\Loader\FileLoaderInterface; +use Laminas\I18n\Translator\Loader\RemoteLoaderInterface; use Laminas\ServiceManager\AbstractPluginManager; use Laminas\ServiceManager\Exception\InvalidServiceException; use Laminas\ServiceManager\Factory\InvokableFactory; -use Zend\I18n\Translator\Loader\Gettext; -use Zend\I18n\Translator\Loader\Ini; -use Zend\I18n\Translator\Loader\PhpArray; use function get_class; use function gettype; @@ -54,6 +53,9 @@ * * * You would then specify your custom factory in your service configuration. + * + * @template InstanceType of RemoteLoaderInterface|FileLoaderInterface + * @extends AbstractPluginManager */ class LoaderPluginManager extends AbstractPluginManager { @@ -68,9 +70,9 @@ class LoaderPluginManager extends AbstractPluginManager 'PhpArray' => Loader\PhpArray::class, // Legacy Zend Framework aliases - Gettext::class => Loader\Gettext::class, - Ini::class => Loader\Ini::class, - PhpArray::class => Loader\PhpArray::class, + 'Zend\I18n\Translator\Loader\Gettext' => Loader\Gettext::class, + 'Zend\I18n\Translator\Loader\Ini' => Loader\Ini::class, + 'Zend\I18n\Translator\Loader\PhpArray' => Loader\PhpArray::class, // v2 normalized FQCNs 'zendi18ntranslatorloadergettext' => Loader\Gettext::class, @@ -100,20 +102,20 @@ class LoaderPluginManager extends AbstractPluginManager * @param mixed $plugin * @return void * @throws Exception\RuntimeException If invalid. + * @psalm-assert InstanceType $plugin */ public function validate($plugin) { - if ($plugin instanceof Loader\FileLoaderInterface || $plugin instanceof Loader\RemoteLoaderInterface) { + if ($plugin instanceof FileLoaderInterface || $plugin instanceof RemoteLoaderInterface) { // we're okay return; } throw new InvalidServiceException(sprintf( - 'Plugin of type %s is invalid; must implement %s\Loader\FileLoaderInterface ' - . 'or %s\Loader\RemoteLoaderInterface', + 'Plugin of type %s is invalid; must implement %s or %s', is_object($plugin) ? get_class($plugin) : gettype($plugin), - __NAMESPACE__, - __NAMESPACE__ + FileLoaderInterface::class, + RemoteLoaderInterface::class )); } @@ -122,8 +124,12 @@ public function validate($plugin) * * Proxies to `validate()`. * + * @deprecated Since 2.16.0 - This component is no longer compatible with Service Manager v2. + * This method will be removed in version 3.0 + * * @param mixed $plugin * @throws Exception\RuntimeException + * @psalm-assert InstanceType $plugin */ public function validatePlugin($plugin) { @@ -131,11 +137,10 @@ public function validatePlugin($plugin) $this->validate($plugin); } catch (InvalidServiceException $e) { throw new Exception\RuntimeException(sprintf( - 'Plugin of type %s is invalid; must implement %s\Loader\FileLoaderInterface ' - . 'or %s\Loader\RemoteLoaderInterface', + 'Plugin of type %s is invalid; must implement %s or %s', is_object($plugin) ? get_class($plugin) : gettype($plugin), - __NAMESPACE__, - __NAMESPACE__ + FileLoaderInterface::class, + RemoteLoaderInterface::class )); } } diff --git a/src/Translator/LoaderPluginManagerFactory.php b/src/Translator/LoaderPluginManagerFactory.php index 5f4d404f..f653c322 100644 --- a/src/Translator/LoaderPluginManagerFactory.php +++ b/src/Translator/LoaderPluginManagerFactory.php @@ -2,10 +2,10 @@ namespace Laminas\I18n\Translator; -use Interop\Container\ContainerInterface; use Laminas\ServiceManager\Config; use Laminas\ServiceManager\FactoryInterface; use Laminas\ServiceManager\ServiceLocatorInterface; +use Psr\Container\ContainerInterface; use function is_array; @@ -14,6 +14,9 @@ class LoaderPluginManagerFactory implements FactoryInterface /** * laminas-servicemanager v2 options passed to factory. * + * @deprecated Since 2.16.0 - This component is no longer compatible with Service Manager v2. + * This property will be removed in version 3.0 + * * @var array */ protected $creationOptions = []; @@ -57,6 +60,9 @@ public function __invoke(ContainerInterface $container, $name, ?array $options = /** * laminas-servicemanager v2 factory to return LoaderPluginManager * + * @deprecated Since 2.16.0 - This component is no longer compatible with Service Manager v2. + * This method will be removed in version 3.0 + * * @return LoaderPluginManager */ public function createService(ServiceLocatorInterface $container) @@ -67,6 +73,9 @@ public function createService(ServiceLocatorInterface $container) /** * v2 support for instance creation options. * + * @deprecated Since 2.16.0 - This component is no longer compatible with Service Manager v2. + * This method will be removed in version 3.0 + * * @param array $options * @return void */ diff --git a/src/Translator/TranslatorServiceFactory.php b/src/Translator/TranslatorServiceFactory.php index fa6dc783..d7b61f8a 100644 --- a/src/Translator/TranslatorServiceFactory.php +++ b/src/Translator/TranslatorServiceFactory.php @@ -2,9 +2,9 @@ namespace Laminas\I18n\Translator; -use Interop\Container\ContainerInterface; use Laminas\ServiceManager\FactoryInterface; use Laminas\ServiceManager\ServiceLocatorInterface; +use Psr\Container\ContainerInterface; /** * Translator. @@ -33,6 +33,9 @@ public function __invoke(ContainerInterface $container, $requestedName, ?array $ /** * laminas-servicemanager v2 factory for creating Translator instance. * + * @deprecated Since 2.16.0 - This component is no longer compatible with Service Manager v2. + * This method will be removed in version 3.0 + * * Proxies to `__invoke()`. * * @return Translator diff --git a/src/Validator/Alnum.php b/src/Validator/Alnum.php index f5f4b464..958ea001 100644 --- a/src/Validator/Alnum.php +++ b/src/Validator/Alnum.php @@ -6,6 +6,7 @@ use Laminas\Validator\AbstractValidator; use function is_array; +use function is_bool; use function is_float; use function is_int; use function is_scalar; @@ -20,7 +21,7 @@ class Alnum extends AbstractValidator /** * Alphanumeric filter used for validation * - * @var AlnumFilter + * @var AlnumFilter|null */ protected static $filter; @@ -38,7 +39,7 @@ class Alnum extends AbstractValidator /** * Options for this validator * - * @var array + * @var array */ protected $options = [ 'allowWhiteSpace' => false, // Whether to allow white space characters; off by default @@ -47,7 +48,7 @@ class Alnum extends AbstractValidator /** * Sets default option values for this instance * - * @param array|bool $allowWhiteSpace + * @param array{allowWhiteSpace: bool}|bool $allowWhiteSpace */ public function __construct($allowWhiteSpace = false) { @@ -66,7 +67,7 @@ public function __construct($allowWhiteSpace = false) */ public function getAllowWhiteSpace() { - return $this->options['allowWhiteSpace']; + return is_bool($this->options['allowWhiteSpace']) && $this->options['allowWhiteSpace']; } /** @@ -84,7 +85,7 @@ public function setAllowWhiteSpace($allowWhiteSpace) /** * Returns true if and only if $value contains only alphabetic and digit characters * - * @param int|float|string $value + * @param mixed $value * @return bool */ public function isValid($value) @@ -104,7 +105,7 @@ public function isValid($value) static::$filter = new AlnumFilter(); } - static::$filter->setAllowWhiteSpace($this->options['allowWhiteSpace']); + static::$filter->setAllowWhiteSpace($this->getAllowWhiteSpace()); if ($value != static::$filter->filter($value)) { // phpcs:ignore $this->error(self::NOT_ALNUM); diff --git a/src/Validator/Alpha.php b/src/Validator/Alpha.php index 7a5c3803..316d0c72 100644 --- a/src/Validator/Alpha.php +++ b/src/Validator/Alpha.php @@ -15,7 +15,7 @@ class Alpha extends Alnum /** * Alphabetic filter used for validation * - * @var AlphaFilter + * @var AlphaFilter|null */ protected static $filter; @@ -33,7 +33,7 @@ class Alpha extends Alnum /** * Options for this validator * - * @var array + * @var array */ protected $options = [ 'allowWhiteSpace' => false, // Whether to allow white space characters; off by default @@ -42,7 +42,7 @@ class Alpha extends Alnum /** * Returns true if and only if $value contains only alphabetic characters * - * @param string $value + * @param mixed $value * @return bool */ public function isValid($value) @@ -63,8 +63,7 @@ public function isValid($value) static::$filter = new AlphaFilter(); } - //static::$filter->setAllowWhiteSpace($this->allowWhiteSpace); - static::$filter->setAllowWhiteSpace($this->options['allowWhiteSpace']); + static::$filter->setAllowWhiteSpace($this->getAllowWhiteSpace()); if ($value !== static::$filter->filter($value)) { $this->error(self::NOT_ALPHA); diff --git a/src/Validator/DateTime.php b/src/Validator/DateTime.php index 4814d84e..0de7f93a 100644 --- a/src/Validator/DateTime.php +++ b/src/Validator/DateTime.php @@ -7,7 +7,6 @@ use Laminas\Validator\AbstractValidator; use Laminas\Validator\Exception as ValidatorException; use Locale; -use Traversable; use function date_default_timezone_get; use function intl_is_failure; @@ -68,7 +67,7 @@ class DateTime extends AbstractValidator /** * Constructor for the Date validator * - * @param array|Traversable $options + * @param iterable $options */ public function __construct($options = []) { diff --git a/src/Validator/IsFloat.php b/src/Validator/IsFloat.php index 6c15e801..110d9ee4 100644 --- a/src/Validator/IsFloat.php +++ b/src/Validator/IsFloat.php @@ -53,7 +53,7 @@ class IsFloat extends AbstractValidator /** * Constructor for the integer validator * - * @param array|Traversable $options + * @param iterable $options */ public function __construct($options = []) { @@ -99,7 +99,7 @@ public function setLocale($locale) * Returns true if and only if $value is a floating-point value. Uses the formal definition of a float as described * in the PHP manual: {@link https://www.php.net/float} * - * @param float|int|string $value + * @param mixed $value * @return bool * @throws Exception\InvalidArgumentException */ diff --git a/src/Validator/IsInt.php b/src/Validator/IsInt.php index de343d87..e3a5fabb 100644 --- a/src/Validator/IsInt.php +++ b/src/Validator/IsInt.php @@ -53,7 +53,7 @@ class IsInt extends AbstractValidator /** * Constructor for the integer validator * - * @param array|Traversable $options + * @param iterable $options */ public function __construct($options = []) { @@ -127,7 +127,7 @@ public function setStrict($strict) /** * Returns true if and only if $value is a valid integer * - * @param string|int|float $value + * @param mixed $value * @return bool * @throws Exception\InvalidArgumentException */ diff --git a/src/Validator/PhoneNumber.php b/src/Validator/PhoneNumber.php index 4ef31732..d5146321 100644 --- a/src/Validator/PhoneNumber.php +++ b/src/Validator/PhoneNumber.php @@ -80,7 +80,7 @@ class PhoneNumber extends AbstractValidator * - allowed_types | array | array of allowed types * - allow_possible | boolean | allow possible matches aka non-strict * - * @param array|Traversable $options + * @param iterable $options */ public function __construct($options = []) { @@ -190,8 +190,8 @@ protected function loadPattern($code) /** * Returns true if and only if $value matches phone number format * - * @param string|null $value - * @param array|null $context + * @param mixed $value + * @param array|null $context * @return bool */ public function isValid($value = null, $context = null) @@ -225,19 +225,19 @@ public function isValid($value = null, $context = null) * 2) International double-O prefix * 3) Bare country prefix */ - if (0 === strpos($value, '+' . $countryPattern['code'])) { - $valueNoCountry = substr($value, $codeLength + 1); - } elseif (0 === strpos($value, '00' . $countryPattern['code'])) { - $valueNoCountry = substr($value, $codeLength + 2); - } elseif (0 === strpos($value, $countryPattern['code'])) { - $valueNoCountry = substr($value, $codeLength); + if (0 === strpos((string) $value, '+' . $countryPattern['code'])) { + $valueNoCountry = substr((string) $value, $codeLength + 1); + } elseif (0 === strpos((string) $value, '00' . $countryPattern['code'])) { + $valueNoCountry = substr((string) $value, $codeLength + 2); + } elseif (0 === strpos((string) $value, $countryPattern['code'])) { + $valueNoCountry = substr((string) $value, $codeLength); } // check against allowed types strict match: foreach ($countryPattern['patterns']['national'] as $type => $pattern) { if (in_array($type, $this->allowedTypes, true)) { // check pattern: - if (preg_match($pattern, $value)) { + if (preg_match($pattern, (string) $value)) { return true; } @@ -253,7 +253,7 @@ public function isValid($value = null, $context = null) foreach ($countryPattern['patterns']['possible'] as $type => $pattern) { if (in_array($type, $this->allowedTypes, true)) { // check pattern: - if (preg_match($pattern, $value)) { + if (preg_match($pattern, (string) $value)) { return true; } diff --git a/src/Validator/PostCode.php b/src/Validator/PostCode.php index 4fddfbc2..6c36a56a 100644 --- a/src/Validator/PostCode.php +++ b/src/Validator/PostCode.php @@ -230,7 +230,7 @@ class PostCode extends AbstractValidator * * Accepts a string locale and/or "format". * - * @param array|Traversable $options + * @param iterable $options */ public function __construct($options = []) { @@ -328,7 +328,7 @@ public function setService($service) /** * Returns true if and only if $value is a valid postalcode * - * @param string|int $value + * @param mixed $value * @return bool * @throws Exception\InvalidArgumentException */ diff --git a/test/ModuleTest.php b/test/ModuleTest.php index 356fec20..112e196f 100644 --- a/test/ModuleTest.php +++ b/test/ModuleTest.php @@ -4,9 +4,9 @@ namespace LaminasTest\I18n; -use Interop\Container\ContainerInterface; use Laminas\I18n\Module; use Prophecy\PhpUnit\ProphecyTrait; +use Psr\Container\ContainerInterface; class ModuleTest extends TestCase { diff --git a/test/Translator/LoaderPluginManagerFactoryTest.php b/test/Translator/LoaderPluginManagerFactoryTest.php index b31146ad..7b9a721e 100644 --- a/test/Translator/LoaderPluginManagerFactoryTest.php +++ b/test/Translator/LoaderPluginManagerFactoryTest.php @@ -4,7 +4,6 @@ namespace LaminasTest\I18n\Translator; -use Interop\Container\ContainerInterface; use Laminas\I18n\Translator\Loader\FileLoaderInterface; use Laminas\I18n\Translator\Loader\PhpArray; use Laminas\I18n\Translator\LoaderPluginManager; @@ -12,6 +11,7 @@ use Laminas\ServiceManager\ServiceLocatorInterface; use LaminasTest\I18n\TestCase; use Prophecy\PhpUnit\ProphecyTrait; +use Psr\Container\ContainerInterface; class LoaderPluginManagerFactoryTest extends TestCase { diff --git a/test/Translator/TranslatorServiceFactoryTest.php b/test/Translator/TranslatorServiceFactoryTest.php index 2db7bbfe..69c6ee07 100644 --- a/test/Translator/TranslatorServiceFactoryTest.php +++ b/test/Translator/TranslatorServiceFactoryTest.php @@ -4,12 +4,12 @@ namespace LaminasTest\I18n\Translator; -use Interop\Container\ContainerInterface; use Laminas\I18n\Translator\LoaderPluginManager; use Laminas\I18n\Translator\Translator; use Laminas\I18n\Translator\TranslatorServiceFactory; use LaminasTest\I18n\TestCase; use Prophecy\PhpUnit\ProphecyTrait; +use Psr\Container\ContainerInterface; class TranslatorServiceFactoryTest extends TestCase {