diff --git a/composer.json b/composer.json
index f07652a6..61c5d6df 100644
--- a/composer.json
+++ b/composer.json
@@ -36,7 +36,7 @@
"require": {
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"laminas/laminas-eventmanager": "^3.4",
- "laminas/laminas-servicemanager": "^3.21",
+ "laminas/laminas-servicemanager": "^4.0",
"laminas/laminas-stdlib": "^3.6",
"psr/cache": "^2.0 || ^3.0",
"psr/simple-cache": "^2.0 || ^3.0",
@@ -47,12 +47,14 @@
"laminas/laminas-cli": "^1.7",
"laminas/laminas-coding-standard": "~2.5.0",
"laminas/laminas-config-aggregator": "^1.13",
- "laminas/laminas-serializer": "^2.14",
+ "laminas/laminas-serializer": "3.0.x-dev",
+ "laminas/laminas-servicemanager": "^4.0.0-rc2",
"phpunit/phpunit": "^9.5.27",
"psalm/plugin-phpunit": "^0.18.4",
"vimeo/psalm": "^5.4"
},
"conflict": {
+ "laminas/laminas-serializer": "<3.0",
"symfony/console": "<5.1",
"stella-maris/clock": "<0.1.7"
},
diff --git a/composer.lock b/composer.lock
index 9835de86..6f1b9300 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,24 +4,73 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "651d79d2dbba70a86ca7703cbab99304",
+ "content-hash": "e1e304d861b774fe8f9f33b95a0ab5f2",
"packages": [
+ {
+ "name": "brick/varexporter",
+ "version": "0.3.8",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/brick/varexporter.git",
+ "reference": "b5853edea6204ff8fa10633c3a4cccc4058410ed"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/brick/varexporter/zipball/b5853edea6204ff8fa10633c3a4cccc4058410ed",
+ "reference": "b5853edea6204ff8fa10633c3a4cccc4058410ed",
+ "shasum": ""
+ },
+ "require": {
+ "nikic/php-parser": "^4.0",
+ "php": "^7.2 || ^8.0"
+ },
+ "require-dev": {
+ "php-coveralls/php-coveralls": "^2.2",
+ "phpunit/phpunit": "^8.5 || ^9.0",
+ "vimeo/psalm": "4.23.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Brick\\VarExporter\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "A powerful alternative to var_export(), which can export closures and objects without __set_state()",
+ "keywords": [
+ "var_export"
+ ],
+ "support": {
+ "issues": "https://github.com/brick/varexporter/issues",
+ "source": "https://github.com/brick/varexporter/tree/0.3.8"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/BenMorel",
+ "type": "github"
+ }
+ ],
+ "time": "2023-01-21T23:05:38+00:00"
+ },
{
"name": "laminas/laminas-eventmanager",
- "version": "3.10.0",
+ "version": "3.13.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-eventmanager.git",
- "reference": "5a5114ab2d3fa4424faa46a2fb0a4e49a61f6eba"
+ "reference": "ce5ba8bde378fca5cb0cd514f01823637215b2f3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/5a5114ab2d3fa4424faa46a2fb0a4e49a61f6eba",
- "reference": "5a5114ab2d3fa4424faa46a2fb0a4e49a61f6eba",
+ "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/ce5ba8bde378fca5cb0cd514f01823637215b2f3",
+ "reference": "ce5ba8bde378fca5cb0cd514f01823637215b2f3",
"shasum": ""
},
"require": {
- "php": "~8.0.0 || ~8.1.0 || ~8.2.0"
+ "php": "~8.1.0 || ~8.2.0 || ~8.3.0"
},
"conflict": {
"container-interop/container-interop": "<1.2",
@@ -29,12 +78,12 @@
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.5.0",
- "laminas/laminas-stdlib": "^3.15",
- "phpbench/phpbench": "^1.2.7",
- "phpunit/phpunit": "^9.5.26",
- "psalm/plugin-phpunit": "^0.18.0",
+ "laminas/laminas-stdlib": "^3.18",
+ "phpbench/phpbench": "^1.2.15",
+ "phpunit/phpunit": "^10.5.5",
+ "psalm/plugin-phpunit": "^0.18.4",
"psr/container": "^1.1.2 || ^2.0.2",
- "vimeo/psalm": "^5.0.0"
+ "vimeo/psalm": "^5.18"
},
"suggest": {
"laminas/laminas-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature",
@@ -72,64 +121,62 @@
"type": "community_bridge"
}
],
- "time": "2023-01-11T19:52:45+00:00"
+ "time": "2024-01-03T17:43:50+00:00"
},
{
"name": "laminas/laminas-servicemanager",
- "version": "3.21.0",
+ "version": "4.0.0-rc2",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-servicemanager.git",
- "reference": "625f2aa3bc6dd02688b2da5155b3a69870812bda"
+ "reference": "52c22eb4e8e21a4176cf4c0a1793990b8655a4e1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/625f2aa3bc6dd02688b2da5155b3a69870812bda",
- "reference": "625f2aa3bc6dd02688b2da5155b3a69870812bda",
+ "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/52c22eb4e8e21a4176cf4c0a1793990b8655a4e1",
+ "reference": "52c22eb4e8e21a4176cf4c0a1793990b8655a4e1",
"shasum": ""
},
"require": {
+ "brick/varexporter": "^0.3.8",
"laminas/laminas-stdlib": "^3.17",
"php": "~8.1.0 || ~8.2.0",
- "psr/container": "^1.0"
+ "psr/container": "^1.1 || ^2.0"
},
"conflict": {
- "ext-psr": "*",
"laminas/laminas-code": "<4.10.0",
- "zendframework/zend-code": "<3.3.1",
- "zendframework/zend-servicemanager": "*"
+ "zendframework/zend-code": "<3.3.1"
},
"provide": {
- "psr/container-implementation": "^1.0"
- },
- "replace": {
- "container-interop/container-interop": "^1.2.0"
+ "psr/container-implementation": "^1.0 || ^2.0"
},
"require-dev": {
+ "boesing/psalm-plugin-stringf": "^1.4",
"composer/package-versions-deprecated": "^1.11.99.5",
- "friendsofphp/proxy-manager-lts": "^1.0.14",
- "laminas/laminas-code": "^4.10.0",
+ "friendsofphp/proxy-manager-lts": "^1",
+ "laminas/laminas-cli": "^1.8",
"laminas/laminas-coding-standard": "~2.5.0",
- "laminas/laminas-container-config-test": "^0.8",
- "laminas/laminas-dependency-plugin": "^2.2",
- "mikey179/vfsstream": "^1.6.11",
- "phpbench/phpbench": "^1.2.9",
- "phpunit/phpunit": "^10.0.17",
+ "laminas/laminas-container-config-test": "dev-qa/service-manager-v4",
+ "lctrs/psalm-psr-container-plugin": "^1.9",
+ "mikey179/vfsstream": "^1.6.11@alpha",
+ "phpbench/phpbench": "^1.2.7",
+ "phpunit/phpunit": "^10.1",
"psalm/plugin-phpunit": "^0.18.4",
- "vimeo/psalm": "^5.8.0"
+ "symfony/console": "^6.0",
+ "vimeo/psalm": "^5.10"
},
"suggest": {
- "friendsofphp/proxy-manager-lts": "ProxyManager ^2.1.1 to handle lazy initialization of services"
+ "friendsofphp/proxy-manager-lts": "To handle lazy initialization of services",
+ "laminas/laminas-cli": "To consume CLI commands provided by this component"
},
- "bin": [
- "bin/generate-deps-for-config-factory",
- "bin/generate-factory-for-class"
- ],
"type": "library",
+ "extra": {
+ "laminas": {
+ "config-provider": "Laminas\\ServiceManager\\ConfigProvider",
+ "module": "Laminas\\ServiceManager"
+ }
+ },
"autoload": {
- "files": [
- "src/autoload.php"
- ],
"psr-4": {
"Laminas\\ServiceManager\\": "src/"
}
@@ -151,11 +198,9 @@
],
"support": {
"chat": "https://laminas.dev/chat",
- "docs": "https://docs.laminas.dev/laminas-servicemanager/",
"forum": "https://discourse.laminas.dev",
"issues": "https://github.com/laminas/laminas-servicemanager/issues",
- "rss": "https://github.com/laminas/laminas-servicemanager/releases.atom",
- "source": "https://github.com/laminas/laminas-servicemanager"
+ "source": "https://github.com/laminas/laminas-servicemanager/tree/4.0.0-rc2"
},
"funding": [
{
@@ -163,34 +208,34 @@
"type": "community_bridge"
}
],
- "time": "2023-05-14T12:24:54+00:00"
+ "time": "2023-05-31T00:52:33+00:00"
},
{
"name": "laminas/laminas-stdlib",
- "version": "3.17.0",
+ "version": "3.19.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-stdlib.git",
- "reference": "dd35c868075bad80b6718959740913e178eb4274"
+ "reference": "6a192dd0882b514e45506f533b833b623b78fff3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/dd35c868075bad80b6718959740913e178eb4274",
- "reference": "dd35c868075bad80b6718959740913e178eb4274",
+ "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/6a192dd0882b514e45506f533b833b623b78fff3",
+ "reference": "6a192dd0882b514e45506f533b833b623b78fff3",
"shasum": ""
},
"require": {
- "php": "~8.1.0 || ~8.2.0"
+ "php": "~8.1.0 || ~8.2.0 || ~8.3.0"
},
"conflict": {
"zendframework/zend-stdlib": "*"
},
"require-dev": {
"laminas/laminas-coding-standard": "^2.5",
- "phpbench/phpbench": "^1.2.9",
- "phpunit/phpunit": "^10.0.16",
+ "phpbench/phpbench": "^1.2.15",
+ "phpunit/phpunit": "^10.5.8",
"psalm/plugin-phpunit": "^0.18.4",
- "vimeo/psalm": "^5.8"
+ "vimeo/psalm": "^5.20.0"
},
"type": "library",
"autoload": {
@@ -222,7 +267,63 @@
"type": "community_bridge"
}
],
- "time": "2023-03-20T13:51:37+00:00"
+ "time": "2024-01-19T12:39:49+00:00"
+ },
+ {
+ "name": "nikic/php-parser",
+ "version": "v4.18.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nikic/PHP-Parser.git",
+ "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999",
+ "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999",
+ "shasum": ""
+ },
+ "require": {
+ "ext-tokenizer": "*",
+ "php": ">=7.0"
+ },
+ "require-dev": {
+ "ircmaxell/php-yacc": "^0.0.7",
+ "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
+ },
+ "bin": [
+ "bin/php-parse"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.9-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PhpParser\\": "lib/PhpParser"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Nikita Popov"
+ }
+ ],
+ "description": "A PHP parser written in PHP",
+ "keywords": [
+ "parser",
+ "php"
+ ],
+ "support": {
+ "issues": "https://github.com/nikic/PHP-Parser/issues",
+ "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0"
+ },
+ "time": "2023-12-10T21:03:43+00:00"
},
{
"name": "psr/cache",
@@ -323,22 +424,27 @@
},
{
"name": "psr/container",
- "version": "1.1.2",
+ "version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
- "reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
+ "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
- "reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963",
+ "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963",
"shasum": ""
},
"require": {
"php": ">=7.4.0"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
"autoload": {
"psr-4": {
"Psr\\Container\\": "src/"
@@ -365,9 +471,9 @@
],
"support": {
"issues": "https://github.com/php-fig/container/issues",
- "source": "https://github.com/php-fig/container/tree/1.1.2"
+ "source": "https://github.com/php-fig/container/tree/2.0.2"
},
- "time": "2021-11-05T16:50:12+00:00"
+ "time": "2021-11-05T16:47:00+00:00"
},
{
"name": "psr/simple-cache",
@@ -646,55 +752,6 @@
],
"time": "2021-03-30T17:13:30+00:00"
},
- {
- "name": "brick/varexporter",
- "version": "0.3.8",
- "source": {
- "type": "git",
- "url": "https://github.com/brick/varexporter.git",
- "reference": "b5853edea6204ff8fa10633c3a4cccc4058410ed"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/brick/varexporter/zipball/b5853edea6204ff8fa10633c3a4cccc4058410ed",
- "reference": "b5853edea6204ff8fa10633c3a4cccc4058410ed",
- "shasum": ""
- },
- "require": {
- "nikic/php-parser": "^4.0",
- "php": "^7.2 || ^8.0"
- },
- "require-dev": {
- "php-coveralls/php-coveralls": "^2.2",
- "phpunit/phpunit": "^8.5 || ^9.0",
- "vimeo/psalm": "4.23.0"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Brick\\VarExporter\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "description": "A powerful alternative to var_export(), which can export closures and objects without __set_state()",
- "keywords": [
- "var_export"
- ],
- "support": {
- "issues": "https://github.com/brick/varexporter/issues",
- "source": "https://github.com/brick/varexporter/tree/0.3.8"
- },
- "funding": [
- {
- "url": "https://github.com/BenMorel",
- "type": "github"
- }
- ],
- "time": "2023-01-21T23:05:38+00:00"
- },
{
"name": "composer/package-versions-deprecated",
"version": "1.11.99.5",
@@ -1332,35 +1389,35 @@
},
{
"name": "laminas/laminas-cli",
- "version": "1.8.0",
+ "version": "1.10.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-cli.git",
- "reference": "97930db3fd2550da0374a3ccbdc7f9b9d6177319"
+ "reference": "cc59875b2a983b05a70abf4f9b3af739b1257f34"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laminas/laminas-cli/zipball/97930db3fd2550da0374a3ccbdc7f9b9d6177319",
- "reference": "97930db3fd2550da0374a3ccbdc7f9b9d6177319",
+ "url": "https://api.github.com/repos/laminas/laminas-cli/zipball/cc59875b2a983b05a70abf4f9b3af739b1257f34",
+ "reference": "cc59875b2a983b05a70abf4f9b3af739b1257f34",
"shasum": ""
},
"require": {
"composer-runtime-api": "^2.0.0",
- "php": "~8.0.0 || ~8.1.0 || ~8.2.0",
+ "php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"psr/container": "^1.0 || ^2.0",
- "symfony/console": "^5.3.7 || ^6.0",
- "symfony/event-dispatcher": "^5.0 || ^6.0",
+ "symfony/console": "^6.0 || ^7.0",
+ "symfony/event-dispatcher": "^6.0 || ^7.0",
"symfony/polyfill-php80": "^1.17",
"webmozart/assert": "^1.10"
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.5.0",
- "laminas/laminas-mvc": "^3.6",
- "laminas/laminas-servicemanager": "^3.20",
+ "laminas/laminas-mvc": "^3.7.0",
+ "laminas/laminas-servicemanager": "^3.22.1",
"mikey179/vfsstream": "2.0.x-dev",
- "phpunit/phpunit": "^9.5.28",
+ "phpunit/phpunit": "^10.5.5",
"psalm/plugin-phpunit": "^0.18.4",
- "vimeo/psalm": "^5.6"
+ "vimeo/psalm": "^5.18"
},
"bin": [
"bin/laminas"
@@ -1396,7 +1453,7 @@
"type": "community_bridge"
}
],
- "time": "2023-02-02T10:57:32+00:00"
+ "time": "2024-01-02T15:08:03+00:00"
},
{
"name": "laminas/laminas-coding-standard",
@@ -1525,27 +1582,27 @@
},
{
"name": "laminas/laminas-json",
- "version": "3.5.0",
+ "version": "3.6.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-json.git",
- "reference": "7a8a1d7bf2d05dd6c1fbd7c0868d3848cf2b57ec"
+ "reference": "53ff787b20b77197f38680c737e8dfffa846b85b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laminas/laminas-json/zipball/7a8a1d7bf2d05dd6c1fbd7c0868d3848cf2b57ec",
- "reference": "7a8a1d7bf2d05dd6c1fbd7c0868d3848cf2b57ec",
+ "url": "https://api.github.com/repos/laminas/laminas-json/zipball/53ff787b20b77197f38680c737e8dfffa846b85b",
+ "reference": "53ff787b20b77197f38680c737e8dfffa846b85b",
"shasum": ""
},
"require": {
- "php": "~8.0.0 || ~8.1.0 || ~8.2.0"
+ "php": "~8.1.0 || ~8.2.0 || ~8.3.0"
},
"conflict": {
"zendframework/zend-json": "*"
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.4.0",
- "laminas/laminas-stdlib": "^2.7.7 || ^3.1",
+ "laminas/laminas-stdlib": "^2.7.7 || ^3.8",
"phpunit/phpunit": "^9.5.25"
},
"suggest": {
@@ -1582,40 +1639,40 @@
"type": "community_bridge"
}
],
- "time": "2022-10-17T04:06:45+00:00"
+ "time": "2023-10-18T09:54:55+00:00"
},
{
"name": "laminas/laminas-serializer",
- "version": "2.15.0",
+ "version": "3.0.x-dev",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-serializer.git",
- "reference": "a54801b20c94fdbbcbfb8e7611ca2d5fe0181c8f"
+ "reference": "36abc73b6d9e52f3b64a39025e68a0d897733e31"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laminas/laminas-serializer/zipball/a54801b20c94fdbbcbfb8e7611ca2d5fe0181c8f",
- "reference": "a54801b20c94fdbbcbfb8e7611ca2d5fe0181c8f",
+ "url": "https://api.github.com/repos/laminas/laminas-serializer/zipball/36abc73b6d9e52f3b64a39025e68a0d897733e31",
+ "reference": "36abc73b6d9e52f3b64a39025e68a0d897733e31",
"shasum": ""
},
"require": {
"laminas/laminas-json": "^3.1",
+ "laminas/laminas-servicemanager": "^4.0",
"laminas/laminas-stdlib": "^3.2",
- "php": "~8.0.0 || ~8.1.0 || ~8.2.0"
+ "php": "~8.1.0 || ~8.2.0 || ~8.3.0"
},
"conflict": {
"zendframework/zend-serializer": "*"
},
"require-dev": {
- "laminas/laminas-coding-standard": "~2.4.0",
- "laminas/laminas-math": "~3.6.0",
- "laminas/laminas-servicemanager": "~3.19.0",
- "phpunit/phpunit": "~9.6.0"
- },
- "suggest": {
- "laminas/laminas-math": "(^3.3) To support Python Pickle serialization",
- "laminas/laminas-servicemanager": "(^3.6) To support plugin manager support"
+ "laminas/laminas-coding-standard": "~2.5.0",
+ "laminas/laminas-servicemanager": "^4.0.0-rc2",
+ "lctrs/psalm-psr-container-plugin": "^1.9",
+ "phpunit/phpunit": "^10.2.6",
+ "psalm/plugin-phpunit": "^0.18.4",
+ "vimeo/psalm": "^5.21"
},
+ "default-branch": true,
"type": "library",
"extra": {
"laminas": {
@@ -1652,7 +1709,7 @@
"type": "community_bridge"
}
],
- "time": "2023-07-08T08:46:03+00:00"
+ "time": "2024-02-06T13:06:12+00:00"
},
{
"name": "myclabs/deep-copy",
@@ -1764,62 +1821,6 @@
},
"time": "2024-01-31T06:18:54+00:00"
},
- {
- "name": "nikic/php-parser",
- "version": "v4.18.0",
- "source": {
- "type": "git",
- "url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999",
- "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999",
- "shasum": ""
- },
- "require": {
- "ext-tokenizer": "*",
- "php": ">=7.0"
- },
- "require-dev": {
- "ircmaxell/php-yacc": "^0.0.7",
- "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
- },
- "bin": [
- "bin/php-parse"
- ],
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "4.9-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "PhpParser\\": "lib/PhpParser"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Nikita Popov"
- }
- ],
- "description": "A PHP parser written in PHP",
- "keywords": [
- "parser",
- "php"
- ],
- "support": {
- "issues": "https://github.com/nikic/PHP-Parser/issues",
- "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0"
- },
- "time": "2023-12-10T21:03:43+00:00"
- },
{
"name": "phar-io/manifest",
"version": "2.0.3",
@@ -2142,23 +2143,23 @@
},
{
"name": "phpunit/php-code-coverage",
- "version": "9.2.27",
+ "version": "9.2.31",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1"
+ "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b0a88255cb70d52653d80c890bd7f38740ea50d1",
- "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965",
+ "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*",
- "nikic/php-parser": "^4.15",
+ "nikic/php-parser": "^4.18 || ^5.0",
"php": ">=7.3",
"phpunit/php-file-iterator": "^3.0.3",
"phpunit/php-text-template": "^2.0.2",
@@ -2208,7 +2209,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/9.2.27"
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31"
},
"funding": [
{
@@ -2216,7 +2217,7 @@
"type": "github"
}
],
- "time": "2023-07-26T13:44:30+00:00"
+ "time": "2024-03-02T06:37:42+00:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -2461,16 +2462,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "9.6.11",
+ "version": "9.6.17",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "810500e92855eba8a7a5319ae913be2da6f957b0"
+ "reference": "1a156980d78a6666721b7e8e8502fe210b587fcd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/810500e92855eba8a7a5319ae913be2da6f957b0",
- "reference": "810500e92855eba8a7a5319ae913be2da6f957b0",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1a156980d78a6666721b7e8e8502fe210b587fcd",
+ "reference": "1a156980d78a6666721b7e8e8502fe210b587fcd",
"shasum": ""
},
"require": {
@@ -2485,7 +2486,7 @@
"phar-io/manifest": "^2.0.3",
"phar-io/version": "^3.0.2",
"php": ">=7.3",
- "phpunit/php-code-coverage": "^9.2.13",
+ "phpunit/php-code-coverage": "^9.2.28",
"phpunit/php-file-iterator": "^3.0.5",
"phpunit/php-invoker": "^3.1.1",
"phpunit/php-text-template": "^2.0.3",
@@ -2544,7 +2545,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.11"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.17"
},
"funding": [
{
@@ -2560,7 +2561,7 @@
"type": "tidelift"
}
],
- "time": "2023-08-19T07:10:56+00:00"
+ "time": "2024-02-23T13:14:51+00:00"
},
{
"name": "psalm/plugin-phpunit",
@@ -2724,16 +2725,16 @@
},
{
"name": "sebastian/cli-parser",
- "version": "1.0.1",
+ "version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/cli-parser.git",
- "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2"
+ "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2",
- "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2",
+ "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b",
+ "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b",
"shasum": ""
},
"require": {
@@ -2768,7 +2769,7 @@
"homepage": "https://github.com/sebastianbergmann/cli-parser",
"support": {
"issues": "https://github.com/sebastianbergmann/cli-parser/issues",
- "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1"
+ "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2"
},
"funding": [
{
@@ -2776,7 +2777,7 @@
"type": "github"
}
],
- "time": "2020-09-28T06:08:49+00:00"
+ "time": "2024-03-02T06:27:43+00:00"
},
{
"name": "sebastian/code-unit",
@@ -2965,20 +2966,20 @@
},
{
"name": "sebastian/complexity",
- "version": "2.0.2",
+ "version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/complexity.git",
- "reference": "739b35e53379900cc9ac327b2147867b8b6efd88"
+ "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88",
- "reference": "739b35e53379900cc9ac327b2147867b8b6efd88",
+ "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a",
+ "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a",
"shasum": ""
},
"require": {
- "nikic/php-parser": "^4.7",
+ "nikic/php-parser": "^4.18 || ^5.0",
"php": ">=7.3"
},
"require-dev": {
@@ -3010,7 +3011,7 @@
"homepage": "https://github.com/sebastianbergmann/complexity",
"support": {
"issues": "https://github.com/sebastianbergmann/complexity/issues",
- "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2"
+ "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3"
},
"funding": [
{
@@ -3018,7 +3019,7 @@
"type": "github"
}
],
- "time": "2020-10-26T15:52:27+00:00"
+ "time": "2023-12-22T06:19:30+00:00"
},
{
"name": "sebastian/diff",
@@ -3151,16 +3152,16 @@
},
{
"name": "sebastian/exporter",
- "version": "4.0.5",
+ "version": "4.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d"
+ "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
- "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72",
+ "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72",
"shasum": ""
},
"require": {
@@ -3216,7 +3217,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
- "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5"
+ "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6"
},
"funding": [
{
@@ -3224,20 +3225,20 @@
"type": "github"
}
],
- "time": "2022-09-14T06:03:37+00:00"
+ "time": "2024-03-02T06:33:00+00:00"
},
{
"name": "sebastian/global-state",
- "version": "5.0.6",
+ "version": "5.0.7",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "bde739e7565280bda77be70044ac1047bc007e34"
+ "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34",
- "reference": "bde739e7565280bda77be70044ac1047bc007e34",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9",
+ "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9",
"shasum": ""
},
"require": {
@@ -3280,7 +3281,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
- "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6"
+ "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7"
},
"funding": [
{
@@ -3288,24 +3289,24 @@
"type": "github"
}
],
- "time": "2023-08-02T09:26:13+00:00"
+ "time": "2024-03-02T06:35:11+00:00"
},
{
"name": "sebastian/lines-of-code",
- "version": "1.0.3",
+ "version": "1.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
- "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc"
+ "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc",
- "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc",
+ "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5",
+ "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5",
"shasum": ""
},
"require": {
- "nikic/php-parser": "^4.6",
+ "nikic/php-parser": "^4.18 || ^5.0",
"php": ">=7.3"
},
"require-dev": {
@@ -3337,7 +3338,7 @@
"homepage": "https://github.com/sebastianbergmann/lines-of-code",
"support": {
"issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
- "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3"
+ "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4"
},
"funding": [
{
@@ -3345,7 +3346,7 @@
"type": "github"
}
],
- "time": "2020-11-28T06:42:11+00:00"
+ "time": "2023-12-22T06:20:34+00:00"
},
{
"name": "sebastian/object-enumerator",
@@ -3812,16 +3813,16 @@
},
{
"name": "squizlabs/php_codesniffer",
- "version": "3.7.2",
+ "version": "3.9.0",
"source": {
"type": "git",
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
- "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879"
+ "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879",
- "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879",
+ "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/d63cee4890a8afaf86a22e51ad4d97c91dd4579b",
+ "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b",
"shasum": ""
},
"require": {
@@ -3831,11 +3832,11 @@
"php": ">=5.4.0"
},
"require-dev": {
- "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
+ "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4"
},
"bin": [
- "bin/phpcs",
- "bin/phpcbf"
+ "bin/phpcbf",
+ "bin/phpcs"
],
"type": "library",
"extra": {
@@ -3850,20 +3851,29 @@
"authors": [
{
"name": "Greg Sherwood",
- "role": "lead"
+ "role": "Former lead"
+ },
+ {
+ "name": "Juliette Reinders Folmer",
+ "role": "Current lead"
+ },
+ {
+ "name": "Contributors",
+ "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors"
}
],
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
- "homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
+ "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
"keywords": [
"phpcs",
"standards",
"static analysis"
],
"support": {
- "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
- "source": "https://github.com/squizlabs/PHP_CodeSniffer",
- "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
+ "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues",
+ "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy",
+ "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
+ "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki"
},
"funding": [
{
@@ -3879,7 +3889,7 @@
"type": "open_collective"
}
],
- "time": "2023-02-22T23:07:41+00:00"
+ "time": "2024-02-16T15:06:51+00:00"
},
{
"name": "symfony/console",
@@ -4044,16 +4054,16 @@
},
{
"name": "symfony/event-dispatcher",
- "version": "v6.3.2",
+ "version": "v6.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e"
+ "reference": "ae9d3a6f3003a6caf56acd7466d8d52378d44fef"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/adb01fe097a4ee930db9258a3cc906b5beb5cf2e",
- "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ae9d3a6f3003a6caf56acd7466d8d52378d44fef",
+ "reference": "ae9d3a6f3003a6caf56acd7466d8d52378d44fef",
"shasum": ""
},
"require": {
@@ -4070,13 +4080,13 @@
},
"require-dev": {
"psr/log": "^1|^2|^3",
- "symfony/config": "^5.4|^6.0",
- "symfony/dependency-injection": "^5.4|^6.0",
- "symfony/error-handler": "^5.4|^6.0",
- "symfony/expression-language": "^5.4|^6.0",
- "symfony/http-foundation": "^5.4|^6.0",
+ "symfony/config": "^5.4|^6.0|^7.0",
+ "symfony/dependency-injection": "^5.4|^6.0|^7.0",
+ "symfony/error-handler": "^5.4|^6.0|^7.0",
+ "symfony/expression-language": "^5.4|^6.0|^7.0",
+ "symfony/http-foundation": "^5.4|^6.0|^7.0",
"symfony/service-contracts": "^2.5|^3",
- "symfony/stopwatch": "^5.4|^6.0"
+ "symfony/stopwatch": "^5.4|^6.0|^7.0"
},
"type": "library",
"autoload": {
@@ -4104,7 +4114,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.2"
+ "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.3"
},
"funding": [
{
@@ -4120,7 +4130,7 @@
"type": "tidelift"
}
],
- "time": "2023-07-06T06:56:43+00:00"
+ "time": "2024-01-23T14:51:35+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
@@ -4829,16 +4839,16 @@
},
{
"name": "theseer/tokenizer",
- "version": "1.2.1",
+ "version": "1.2.2",
"source": {
"type": "git",
"url": "https://github.com/theseer/tokenizer.git",
- "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e"
+ "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e",
- "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e",
+ "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96",
+ "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96",
"shasum": ""
},
"require": {
@@ -4867,7 +4877,7 @@
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"support": {
"issues": "https://github.com/theseer/tokenizer/issues",
- "source": "https://github.com/theseer/tokenizer/tree/1.2.1"
+ "source": "https://github.com/theseer/tokenizer/tree/1.2.2"
},
"funding": [
{
@@ -4875,7 +4885,7 @@
"type": "github"
}
],
- "time": "2021-07-28T10:34:58+00:00"
+ "time": "2023-11-20T00:12:19+00:00"
},
{
"name": "vimeo/psalm",
@@ -4989,16 +4999,16 @@
},
{
"name": "webimpress/coding-standard",
- "version": "1.3.1",
+ "version": "1.3.2",
"source": {
"type": "git",
"url": "https://github.com/webimpress/coding-standard.git",
- "reference": "b26557e2386711ecb74f22718f4b4bde5ddbc899"
+ "reference": "710f71ac95d36d931e76b47132b599c39abfab11"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/b26557e2386711ecb74f22718f4b4bde5ddbc899",
- "reference": "b26557e2386711ecb74f22718f4b4bde5ddbc899",
+ "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/710f71ac95d36d931e76b47132b599c39abfab11",
+ "reference": "710f71ac95d36d931e76b47132b599c39abfab11",
"shasum": ""
},
"require": {
@@ -5006,7 +5016,7 @@
"squizlabs/php_codesniffer": "^3.7.2"
},
"require-dev": {
- "phpunit/phpunit": "^9.6.4"
+ "phpunit/phpunit": "^9.6.15"
},
"type": "phpcodesniffer-standard",
"extra": {
@@ -5032,7 +5042,7 @@
],
"support": {
"issues": "https://github.com/webimpress/coding-standard/issues",
- "source": "https://github.com/webimpress/coding-standard/tree/1.3.1"
+ "source": "https://github.com/webimpress/coding-standard/tree/1.3.2"
},
"funding": [
{
@@ -5040,7 +5050,7 @@
"type": "github"
}
],
- "time": "2023-03-09T15:05:18+00:00"
+ "time": "2023-12-18T07:25:41+00:00"
},
{
"name": "webimpress/safe-writer",
@@ -5104,7 +5114,10 @@
],
"aliases": [],
"minimum-stability": "stable",
- "stability-flags": [],
+ "stability-flags": {
+ "laminas/laminas-serializer": 20,
+ "laminas/laminas-servicemanager": 5
+ },
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
index 4c10c329..22806fa1 100644
--- a/psalm-baseline.xml
+++ b/psalm-baseline.xml
@@ -222,9 +222,6 @@
-
-
-
@@ -246,15 +243,6 @@
-
- $optionValue])]]>
-
-
-
-
-
-
-
@@ -355,6 +343,9 @@
+
+
+
@@ -383,15 +374,10 @@
-
- serializer]]>
-
-
-
-
+
@@ -415,16 +401,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -670,7 +646,6 @@
-
@@ -776,11 +751,6 @@
-
-
-
-
-
diff --git a/src/Pattern/PatternOptions.php b/src/Pattern/PatternOptions.php
index 41e61f94..9341f50e 100644
--- a/src/Pattern/PatternOptions.php
+++ b/src/Pattern/PatternOptions.php
@@ -25,7 +25,10 @@
use const DIRECTORY_SEPARATOR;
use const PHP_OS;
-class PatternOptions extends AbstractOptions
+/**
+ * @template-extends AbstractOptions
+ */
+final class PatternOptions extends AbstractOptions
{
/**
* Used by:
@@ -107,6 +110,7 @@ class PatternOptions extends AbstractOptions
protected ?string $publicDir = null;
/**
+ * @param iterable|null $options
* @throws Exception\InvalidArgumentException
*/
public function __construct(iterable|null $options = null)
diff --git a/src/Service/StoragePluginFactoryInterface.php b/src/Service/StoragePluginFactoryInterface.php
index 7bcb1101..103a4859 100644
--- a/src/Service/StoragePluginFactoryInterface.php
+++ b/src/Service/StoragePluginFactoryInterface.php
@@ -18,9 +18,10 @@ interface StoragePluginFactoryInterface
public function createFromArrayConfiguration(array $configuration): PluginInterface;
/**
- * @psalm-param non-empty-string $plugin
+ * @template T of PluginInterface
+ * @param non-empty-string|class-string $plugin
* @param array $options
- * @psalm-param array $options
+ * @return ($plugin is class-string ? T : PluginInterface)
*/
public function create(string $plugin, array $options = []): PluginInterface;
diff --git a/src/Storage/Adapter/AbstractAdapter.php b/src/Storage/Adapter/AbstractAdapter.php
index d3b41da2..f073c0dc 100644
--- a/src/Storage/Adapter/AbstractAdapter.php
+++ b/src/Storage/Adapter/AbstractAdapter.php
@@ -69,7 +69,7 @@ abstract class AbstractAdapter implements StorageInterface, PluginAwareInterface
protected ?AdapterOptions $options = null;
/**
- * @param iterable|TOptions|null $options
+ * @param iterable|TOptions|null $options
* @throws Exception\ExceptionInterface
*/
public function __construct(iterable|AdapterOptions|null $options = null)
@@ -106,7 +106,7 @@ public function __destruct()
*
* @see getOptions()
*
- * @param iterable|TOptions $options
+ * @param iterable|TOptions $options
*/
public function setOptions(iterable|AdapterOptions $options): self
{
@@ -197,6 +197,7 @@ public function getEventManager(): EventManagerInterface
/**
* Trigger a pre event and return the event response collection
*
+ * @param ArrayObject $args
* @return ResponseCollection All handler return values
*/
protected function triggerPre(string $eventName, ArrayObject $args): ResponseCollection
@@ -206,6 +207,8 @@ protected function triggerPre(string $eventName, ArrayObject $args): ResponseCol
/**
* Triggers the PostEvent and return the result value.
+ *
+ * @param ArrayObject $args
*/
protected function triggerPost(string $eventName, ArrayObject $args, mixed $result): mixed
{
@@ -217,6 +220,11 @@ protected function triggerPost(string $eventName, ArrayObject $args, mixed $resu
: $postEvent->getResult();
}
+ /**
+ * @param non-empty-string $eventName
+ * @param ArrayObject $args
+ * @throws Throwable
+ */
protected function triggerThrowable(
string $eventName,
ArrayObject $args,
@@ -1158,6 +1166,7 @@ protected function internalRemoveItems(array $normalizedKeys): array
*/
public function getCapabilities(): Capabilities
{
+ /** @var ArrayObject $args */
$args = new ArrayObject();
try {
diff --git a/src/Storage/Adapter/AdapterOptions.php b/src/Storage/Adapter/AdapterOptions.php
index 3869da9b..bae9a1df 100644
--- a/src/Storage/Adapter/AdapterOptions.php
+++ b/src/Storage/Adapter/AdapterOptions.php
@@ -10,6 +10,7 @@
use Laminas\Stdlib\AbstractOptions;
use Laminas\Stdlib\ErrorHandler;
use Traversable;
+use Webmozart\Assert\Assert;
use function array_change_key_case;
use function array_reverse;
@@ -28,6 +29,8 @@
/**
* Unless otherwise marked, all options in this class affect all adapters.
+ *
+ * @template-extends AbstractOptions
*/
class AdapterOptions extends AbstractOptions
{
@@ -245,7 +248,7 @@ protected function normalizeTtl(int|string|float $ttl): int|float
/**
* Cast to array
*
- * @return array
+ * @return array
*/
public function toArray(): array
{
@@ -261,6 +264,7 @@ public function toArray(): array
$normalizedKey = preg_replace_callback('/([A-Z])/', $transform, $key);
$array[$normalizedKey] = $value;
}
+ Assert::isMap($array);
return $array;
}
@@ -270,7 +274,7 @@ public function toArray(): array
* NOTE: This method was overwritten just to support prioritized properties
* {@link https://github.com/zendframework/zf2/issues/6381}
*
- * @param iterable|AbstractOptions $options
+ * @param iterable|AbstractOptions $options
* @throws Exception\InvalidArgumentException
*/
public function setFromArray($options): self
diff --git a/src/Storage/AdapterPluginManager.php b/src/Storage/AdapterPluginManager.php
index 1ed0a0ce..8b7b737f 100644
--- a/src/Storage/AdapterPluginManager.php
+++ b/src/Storage/AdapterPluginManager.php
@@ -2,7 +2,7 @@
namespace Laminas\Cache\Storage;
-use Laminas\ServiceManager\AbstractPluginManager;
+use Laminas\ServiceManager\AbstractSingleInstancePluginManager;
/**
* Plugin manager implementation for cache storage adapters
@@ -11,17 +11,11 @@
* StorageInterface. Additionally, it registers a number of default
* adapters available.
*
- * @extends AbstractPluginManager
+ * @extends AbstractSingleInstancePluginManager
*/
-final class AdapterPluginManager extends AbstractPluginManager
+final class AdapterPluginManager extends AbstractSingleInstancePluginManager
{
- /**
- * Do not share by default
- *
- * @var bool
- */
- protected $sharedByDefault = false;
+ protected bool $sharedByDefault = false;
- /** @var class-string */
- protected $instanceOf = StorageInterface::class;
+ protected string $instanceOf = StorageInterface::class;
}
diff --git a/src/Storage/Event.php b/src/Storage/Event.php
index e3eddd65..cb8022a0 100644
--- a/src/Storage/Event.php
+++ b/src/Storage/Event.php
@@ -12,6 +12,7 @@ class Event extends BaseEvent
* Accept a storage adapter and its parameters.
*
* @param non-empty-string $name Event name
+ * @param ArrayObject $params
*/
public function __construct(string $name, StorageInterface $storage, ArrayObject $params)
{
diff --git a/src/Storage/ExceptionEvent.php b/src/Storage/ExceptionEvent.php
index f1f89b22..9794d191 100644
--- a/src/Storage/ExceptionEvent.php
+++ b/src/Storage/ExceptionEvent.php
@@ -21,6 +21,7 @@ class ExceptionEvent extends PostEvent
* Accept a target and its parameters.
*
* @param non-empty-string $name Event name
+ * @param ArrayObject $params
*/
public function __construct(
string $name,
diff --git a/src/Storage/Plugin/PluginOptions.php b/src/Storage/Plugin/PluginOptions.php
index efbfb90d..ba10f64b 100644
--- a/src/Storage/Plugin/PluginOptions.php
+++ b/src/Storage/Plugin/PluginOptions.php
@@ -4,12 +4,16 @@
use Laminas\Cache\Exception;
use Laminas\Serializer\Adapter\AdapterInterface as SerializerAdapter;
-use Laminas\Serializer\Serializer as SerializerFactory;
+use Laminas\Serializer\Adapter\PhpSerialize;
use Laminas\Stdlib\AbstractOptions;
use Webmozart\Assert\Assert;
use function is_callable;
+use function is_string;
+/**
+ * @template-extends AbstractOptions
+ */
class PluginOptions extends AbstractOptions
{
/**
@@ -41,13 +45,16 @@ class PluginOptions extends AbstractOptions
/**
* Used by:
* - Serializer
- * @phpcs:disable WebimpressCodingStandard.Classes.NoNullValues.Invalid
+ *
+ * @var non-empty-string|SerializerAdapter
*/
- protected SerializerAdapter|string|null $serializer = null;
+ protected SerializerAdapter|string $serializer = PhpSerialize::class;
/**
* Used by:
* - Serializer
+ *
+ * @var array
*/
protected array $serializerOptions = [];
@@ -158,6 +165,10 @@ public function getOptimizingFactor(): int
*/
public function setSerializer(string|SerializerAdapter $serializer): self
{
+ if (is_string($serializer) && $serializer === '') {
+ return $this;
+ }
+
$this->serializer = $serializer;
return $this;
}
@@ -165,22 +176,10 @@ public function setSerializer(string|SerializerAdapter $serializer): self
/**
* Get serializer
*
- * Used by:
- * - Serializer
+ * Used by {@see \Laminas\Cache\Storage\Plugin\Serializer}
*/
- public function getSerializer(): SerializerAdapter
+ public function getSerializer(): string|SerializerAdapter
{
- if (! $this->serializer instanceof SerializerAdapter) {
- // use default serializer
- if ($this->serializer === null || $this->serializer === '') {
- $this->setSerializer(SerializerFactory::getDefaultAdapter());
- // instantiate by class name + serializer_options
- } else {
- $options = $this->getSerializerOptions();
- $this->setSerializer(SerializerFactory::factory($this->serializer, $options));
- }
- }
- Assert::notNull($this->serializer);
return $this->serializer;
}
@@ -189,9 +188,12 @@ public function getSerializer(): SerializerAdapter
*
* Used by:
* - Serializer
+ *
+ * @param array $serializerOptions
*/
public function setSerializerOptions(array $serializerOptions): self
{
+ Assert::isMap($serializerOptions);
$this->serializerOptions = $serializerOptions;
return $this;
}
@@ -202,7 +204,7 @@ public function setSerializerOptions(array $serializerOptions): self
* Used by:
* - Serializer
*
- * @return array
+ * @return array
*/
public function getSerializerOptions(): array
{
diff --git a/src/Storage/Plugin/Serializer.php b/src/Storage/Plugin/Serializer.php
index c50bafea..2cecd1f4 100644
--- a/src/Storage/Plugin/Serializer.php
+++ b/src/Storage/Plugin/Serializer.php
@@ -6,14 +6,27 @@
use Laminas\Cache\Storage\Event;
use Laminas\Cache\Storage\PostEvent;
use Laminas\EventManager\EventManagerInterface;
+use Laminas\Serializer\Adapter\AdapterInterface;
+use Laminas\ServiceManager\PluginManagerInterface;
use stdClass;
+use function assert;
use function spl_object_hash;
-class Serializer extends AbstractPlugin
+final class Serializer extends AbstractPlugin
{
protected array $capabilities = [];
+ private ?AdapterInterface $serializer = null;
+
+ /**
+ * @param PluginManagerInterface $serializers
+ */
+ public function __construct(
+ private readonly PluginManagerInterface $serializers,
+ ) {
+ }
+
/**
* {@inheritDoc}
*/
@@ -51,7 +64,7 @@ public function onReadItemPost(PostEvent $event): void
{
$result = $event->getResult();
if ($result !== null) {
- $serializer = $this->getOptions()->getSerializer();
+ $serializer = $this->getSerializer();
$result = $serializer->unserialize($result);
$event->setResult($result);
}
@@ -62,7 +75,7 @@ public function onReadItemPost(PostEvent $event): void
*/
public function onReadItemsPost(PostEvent $event): void
{
- $serializer = $this->getOptions()->getSerializer();
+ $serializer = $this->getSerializer();
$result = $event->getResult();
foreach ($result as $index => $value) {
$result[$index] = $serializer->unserialize($value);
@@ -75,7 +88,7 @@ public function onReadItemsPost(PostEvent $event): void
*/
public function onWriteItemPre(Event $event): void
{
- $serializer = $this->getOptions()->getSerializer();
+ $serializer = $this->getSerializer();
$params = $event->getParams();
$params['value'] = $serializer->serialize($params['value']);
/** Passed by {@see AbstractAdapter::checkAndSetItem()}. Used to compare with the already cached value. */
@@ -89,7 +102,7 @@ public function onWriteItemPre(Event $event): void
*/
public function onWriteItemsPre(Event $event): void
{
- $serializer = $this->getOptions()->getSerializer();
+ $serializer = $this->getSerializer();
$params = $event->getParams();
foreach ($params['keyValuePairs'] as $index => $value) {
$value = $serializer->serialize($value);
@@ -127,4 +140,26 @@ public function onGetCapabilitiesPost(PostEvent $event): void
$event->setResult($this->capabilities[$index]);
}
+
+ public function getSerializer(): AdapterInterface
+ {
+ if ($this->serializer !== null) {
+ return $this->serializer;
+ }
+
+ $options = $this->getOptions();
+ $serializer = $options->getSerializer();
+ if ($serializer instanceof AdapterInterface) {
+ $this->serializer = $serializer;
+
+ return $serializer;
+ }
+
+ $serializerOptions = $options->getSerializerOptions();
+ $serializerAdapter = $this->serializers->build($serializer, $serializerOptions);
+ assert($serializerAdapter instanceof AdapterInterface);
+ $this->serializer = $serializerAdapter;
+
+ return $serializerAdapter;
+ }
}
diff --git a/src/Storage/Plugin/SerializerFactory.php b/src/Storage/Plugin/SerializerFactory.php
new file mode 100644
index 00000000..31098378
--- /dev/null
+++ b/src/Storage/Plugin/SerializerFactory.php
@@ -0,0 +1,37 @@
+getOrCreateAdapterPluginManager($container);
+
+ return new Serializer($serializerAdapterPluginManager);
+ }
+
+ private function getOrCreateAdapterPluginManager(ContainerInterface $container): AdapterPluginManager
+ {
+ if ($container->has(AdapterPluginManager::class)) {
+ $pluginManager = $container->get(AdapterPluginManager::class);
+ assert($pluginManager instanceof AdapterPluginManager);
+ return $pluginManager;
+ }
+
+ if (! class_exists(AdapterPluginManager::class)) {
+ throw new RuntimeException('Missing `laminas/laminas-serializer` dependency.');
+ }
+
+ return new AdapterPluginManager($container);
+ }
+}
diff --git a/src/Storage/PluginManager.php b/src/Storage/PluginManager.php
index 916773e8..786ffd4f 100644
--- a/src/Storage/PluginManager.php
+++ b/src/Storage/PluginManager.php
@@ -4,8 +4,13 @@
use Laminas\Cache\Storage\Plugin\PluginInterface;
use Laminas\Cache\Storage\Plugin\PluginOptions;
-use Laminas\ServiceManager\AbstractPluginManager;
+use Laminas\ServiceManager\AbstractSingleInstancePluginManager;
use Laminas\ServiceManager\Factory\InvokableFactory;
+use Laminas\ServiceManager\ServiceManager;
+use Psr\Container\ContainerInterface;
+use Webmozart\Assert\Assert;
+
+use function array_replace_recursive;
/**
* Plugin manager implementation for cache plugins
@@ -14,57 +19,57 @@
* Plugin\PluginInterface. Additionally, it registers a number of default
* plugins available.
*
- * @extends AbstractPluginManager
+ * @extends AbstractSingleInstancePluginManager
+ * @psalm-import-type ServiceManagerConfiguration from ServiceManager
*/
-final class PluginManager extends AbstractPluginManager
+final class PluginManager extends AbstractSingleInstancePluginManager
{
- /** @var array */
- protected $aliases = [
- 'clear_expired_by_factor' => Plugin\ClearExpiredByFactor::class,
- 'clearexpiredbyfactor' => Plugin\ClearExpiredByFactor::class,
- 'clearExpiredByFactor' => Plugin\ClearExpiredByFactor::class,
- 'ClearExpiredByFactor' => Plugin\ClearExpiredByFactor::class,
- 'exception_handler' => Plugin\ExceptionHandler::class,
- 'exceptionhandler' => Plugin\ExceptionHandler::class,
- 'exceptionHandler' => Plugin\ExceptionHandler::class,
- 'ExceptionHandler' => Plugin\ExceptionHandler::class,
- 'ignore_user_abort' => Plugin\IgnoreUserAbort::class,
- 'ignoreuserabort' => Plugin\IgnoreUserAbort::class,
- 'ignoreUserAbort' => Plugin\IgnoreUserAbort::class,
- 'IgnoreUserAbort' => Plugin\IgnoreUserAbort::class,
- 'optimize_by_factor' => Plugin\OptimizeByFactor::class,
- 'optimizebyfactor' => Plugin\OptimizeByFactor::class,
- 'optimizeByFactor' => Plugin\OptimizeByFactor::class,
- 'OptimizeByFactor' => Plugin\OptimizeByFactor::class,
- 'serializer' => Plugin\Serializer::class,
- 'Serializer' => Plugin\Serializer::class,
- ];
-
- /** @var array */
- protected $factories = [
- Plugin\ClearExpiredByFactor::class => InvokableFactory::class,
- Plugin\ExceptionHandler::class => InvokableFactory::class,
- Plugin\IgnoreUserAbort::class => InvokableFactory::class,
- Plugin\OptimizeByFactor::class => InvokableFactory::class,
- Plugin\Serializer::class => InvokableFactory::class,
+ private const CONFIGURATION = [
+ 'aliases' => [
+ 'clear_expired_by_factor' => Plugin\ClearExpiredByFactor::class,
+ 'clearexpiredbyfactor' => Plugin\ClearExpiredByFactor::class,
+ 'clearExpiredByFactor' => Plugin\ClearExpiredByFactor::class,
+ 'ClearExpiredByFactor' => Plugin\ClearExpiredByFactor::class,
+ 'exception_handler' => Plugin\ExceptionHandler::class,
+ 'exceptionhandler' => Plugin\ExceptionHandler::class,
+ 'exceptionHandler' => Plugin\ExceptionHandler::class,
+ 'ExceptionHandler' => Plugin\ExceptionHandler::class,
+ 'ignore_user_abort' => Plugin\IgnoreUserAbort::class,
+ 'ignoreuserabort' => Plugin\IgnoreUserAbort::class,
+ 'ignoreUserAbort' => Plugin\IgnoreUserAbort::class,
+ 'IgnoreUserAbort' => Plugin\IgnoreUserAbort::class,
+ 'optimize_by_factor' => Plugin\OptimizeByFactor::class,
+ 'optimizebyfactor' => Plugin\OptimizeByFactor::class,
+ 'optimizeByFactor' => Plugin\OptimizeByFactor::class,
+ 'OptimizeByFactor' => Plugin\OptimizeByFactor::class,
+ 'serializer' => Plugin\Serializer::class,
+ 'Serializer' => Plugin\Serializer::class,
+ ],
+ 'factories' => [
+ Plugin\ClearExpiredByFactor::class => InvokableFactory::class,
+ Plugin\ExceptionHandler::class => InvokableFactory::class,
+ Plugin\IgnoreUserAbort::class => InvokableFactory::class,
+ Plugin\OptimizeByFactor::class => InvokableFactory::class,
+ Plugin\Serializer::class => Plugin\SerializerFactory::class,
+ ],
];
- /**
- * Do not share by default
- *
- * @var bool
- */
- protected $sharedByDefault = false;
+ protected bool $sharedByDefault = false;
- /** @var class-string */
- protected $instanceOf = PluginInterface::class;
+ public function __construct(ContainerInterface $creationContext, array $config = [])
+ {
+ $this->instanceOf = PluginInterface::class;
+ /** @var ServiceManagerConfiguration $config */
+ $config = array_replace_recursive(self::CONFIGURATION, $config);
+ parent::__construct($creationContext, $config);
+ }
- /** @inheritDoc */
- public function build($name, ?array $options = null)
+ public function build(string $name, ?array $options = null): PluginInterface
{
$options ??= [];
$plugin = parent::build($name);
- if ($options !== [] && $plugin instanceof PluginInterface) {
+ if ($options !== []) {
+ Assert::isMap($options);
$plugin->setOptions(new PluginOptions($options));
}
diff --git a/src/Storage/PostEvent.php b/src/Storage/PostEvent.php
index 66224c53..4e148997 100644
--- a/src/Storage/PostEvent.php
+++ b/src/Storage/PostEvent.php
@@ -15,6 +15,7 @@ class PostEvent extends Event
* Accept a target and its parameters.
*
* @param non-empty-string $name Event name
+ * @param ArrayObject $params
*/
public function __construct(string $name, StorageInterface $storage, ArrayObject $params, mixed $result)
{
diff --git a/test/Service/StoragePluginFactoryIntegrationTest.php b/test/Service/StoragePluginFactoryIntegrationTest.php
index b30bd6c7..60807d95 100644
--- a/test/Service/StoragePluginFactoryIntegrationTest.php
+++ b/test/Service/StoragePluginFactoryIntegrationTest.php
@@ -25,6 +25,7 @@ public function testWillCreatePluginWithOptions(): void
{
$plugin = $this->factory->create(Serializer::class, ['serializer' => 'json']);
$options = $plugin->getOptions();
- self::assertInstanceOf(Json::class, $options->getSerializer());
+ self::assertSame('json', $options->getSerializer());
+ self::assertInstanceOf(Json::class, $plugin->getSerializer());
}
}
diff --git a/test/Storage/Adapter/AbstractAdapterTest.php b/test/Storage/Adapter/AbstractAdapterTest.php
index cf17b05a..beb911ca 100644
--- a/test/Storage/Adapter/AbstractAdapterTest.php
+++ b/test/Storage/Adapter/AbstractAdapterTest.php
@@ -17,6 +17,8 @@
use Laminas\Cache\Storage\Plugin\Serializer;
use Laminas\Cache\Storage\PostEvent;
use Laminas\EventManager\ResponseCollection;
+use Laminas\Serializer\AdapterPluginManager;
+use Laminas\ServiceManager\ServiceManager;
use LaminasTest\Cache\Storage\TestAsset\MockPlugin;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
@@ -851,7 +853,7 @@ public function testCanCompareOldValueWithTokenWhenUsedWithSerializerPlugin(): v
{
$storage = $this->getMockForAbstractAdapter();
$storage
- ->addPlugin(new Serializer());
+ ->addPlugin(new Serializer(new AdapterPluginManager(new ServiceManager())));
$storage
->expects(self::once())
->method('internalSetItem')
diff --git a/test/Storage/AdapterPluginManagerTest.php b/test/Storage/AdapterPluginManagerTest.php
index 99a3ca33..bf1702c5 100644
--- a/test/Storage/AdapterPluginManagerTest.php
+++ b/test/Storage/AdapterPluginManagerTest.php
@@ -7,6 +7,7 @@
use Laminas\Cache\Exception\ExtensionNotLoadedException;
use Laminas\Cache\Storage\AdapterPluginManager;
use Laminas\Cache\Storage\StorageInterface;
+use Laminas\ServiceManager\AbstractSingleInstancePluginManager;
use Laminas\ServiceManager\Exception\ServiceNotCreatedException;
use Laminas\ServiceManager\ServiceManager;
use Laminas\ServiceManager\Test\CommonPluginManagerTrait;
@@ -34,19 +35,9 @@ public function testPluginAliasesResolve(string $alias, string $expected)
$this->addToAssertionCount(1);
}
- protected static function getPluginManager(): AdapterPluginManager
+ protected static function getPluginManager(array $config = []): AbstractSingleInstancePluginManager
{
- return new AdapterPluginManager(new ServiceManager());
- }
-
- public function testShareByDefaultAndSharedByDefault()
- {
- self::markTestSkipped('Support for servicemanager v2 is dropped.');
- }
-
- protected function getV2InvalidPluginException()
- {
- self::fail('Somehow, servicemanager v2 compatibility is being tested.');
+ return new AdapterPluginManager(new ServiceManager(), $config);
}
protected function getInstanceOf(): string
diff --git a/test/Storage/Plugin/SerializerTest.php b/test/Storage/Plugin/SerializerTest.php
index 42812a43..862d2c8c 100644
--- a/test/Storage/Plugin/SerializerTest.php
+++ b/test/Storage/Plugin/SerializerTest.php
@@ -12,6 +12,8 @@
use Laminas\Cache\Storage\PostEvent;
use Laminas\Cache\Storage\StorageInterface;
use Laminas\EventManager\Test\EventListenerIntrospectionTrait;
+use Laminas\Serializer\AdapterPluginManager;
+use Laminas\ServiceManager\ServiceManager;
use LaminasTest\Cache\Storage\TestAsset\MockAdapter;
use function array_keys;
@@ -31,7 +33,7 @@ protected function setUp(): void
{
$this->adapter = new MockAdapter();
$this->options = new Cache\Storage\Plugin\PluginOptions();
- $this->plugin = new Serializer();
+ $this->plugin = new Serializer(new AdapterPluginManager(new ServiceManager()));
$this->plugin->setOptions($this->options);
}
@@ -137,7 +139,7 @@ public function testUnserializeOnReadItems(): void
public function testonWriteItemPreSerializesTokenOncePassed(): void
{
- $plugin = new Serializer();
+ $plugin = new Serializer(new AdapterPluginManager(new ServiceManager()));
$parameters = new ArrayObject([
'key' => 'foo',
'value' => 10,
diff --git a/test/Storage/PluginManagerTest.php b/test/Storage/PluginManagerTest.php
index 3deb2a3d..9d06a64c 100644
--- a/test/Storage/PluginManagerTest.php
+++ b/test/Storage/PluginManagerTest.php
@@ -6,6 +6,7 @@
use Laminas\Cache\Storage\Plugin\PluginInterface;
use Laminas\Cache\Storage\PluginManager;
+use Laminas\ServiceManager\AbstractSingleInstancePluginManager;
use Laminas\ServiceManager\ServiceManager;
use Laminas\ServiceManager\Test\CommonPluginManagerTrait;
use PHPUnit\Framework\TestCase;
@@ -14,19 +15,9 @@ class PluginManagerTest extends TestCase
{
use CommonPluginManagerTrait;
- protected static function getPluginManager(): PluginManager
+ protected static function getPluginManager(array $config = []): AbstractSingleInstancePluginManager
{
- return new PluginManager(new ServiceManager());
- }
-
- public function testShareByDefaultAndSharedByDefault()
- {
- self::markTestSkipped('Support for servicemanager v2 is dropped.');
- }
-
- protected function getV2InvalidPluginException()
- {
- self::fail('Somehow, servicemanager v2 compatibility is being tested.');
+ return new PluginManager(new ServiceManager(), $config);
}
protected function getInstanceOf(): string
diff --git a/test/Storage/TestAsset/MockPlugin.php b/test/Storage/TestAsset/MockPlugin.php
index a99e3bad..5099d52c 100644
--- a/test/Storage/TestAsset/MockPlugin.php
+++ b/test/Storage/TestAsset/MockPlugin.php
@@ -23,6 +23,9 @@ class MockPlugin extends AbstractPlugin
'setItem.post' => 'onSetItemPost',
];
+ /**
+ * @param array $options
+ */
public function __construct(array $options = [])
{
$options = new Plugin\PluginOptions($options);