diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index bc71b62..0000000 --- a/.coveralls.yml +++ /dev/null @@ -1,2 +0,0 @@ -coverage_clover: clover.xml -json_path: coveralls-upload.json diff --git a/.gitattributes b/.gitattributes index 70b009d..776125b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,10 +1,14 @@ -/.coveralls.yml export-ignore /.gitattributes export-ignore /.github/ export-ignore /.gitignore export-ignore -/.travis.yml export-ignore /docs/ export-ignore /mkdocs.yml export-ignore /phpcs.xml export-ignore +/psalm.xml export-ignore +/psalm-baseline.xml export-ignore /phpunit.xml.dist export-ignore /test/ export-ignore +/.psr-container.php.stub +/renovate.json +/.laminas-ci.json +/TODO.md diff --git a/.gitignore b/.gitignore index f6f6e63..354c40d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,5 @@ /.phpcs-cache /.phpunit.result.cache -/clover.xml -/coveralls-upload.json /docs/html/ /laminas-mkdoc-theme.tgz /laminas-mkdoc-theme/ diff --git a/.laminas-ci.json b/.laminas-ci.json index bce3fa2..2c63c08 100644 --- a/.laminas-ci.json +++ b/.laminas-ci.json @@ -1,5 +1,2 @@ { - "ignore_php_platform_requirements": { - "8.1": true - } } diff --git a/.psr-container.php.stub b/.psr-container.php.stub new file mode 100644 index 0000000..2ca173a --- /dev/null +++ b/.psr-container.php.stub @@ -0,0 +1,24 @@ + $id + * @psalm-return ($id is class-string ? T : mixed) + */ + public function get(string $id); + } +} diff --git a/composer.json b/composer.json index d45a7e4..a172439 100644 --- a/composer.json +++ b/composer.json @@ -40,11 +40,11 @@ "psr/http-server-middleware": "^1.0" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.2.0", + "laminas/laminas-coding-standard": "~2.3.0", "laminas/laminas-diactoros": "^2.2", "phpunit/phpunit": "^9.5", - "psalm/plugin-phpunit": "^0.16.1", - "vimeo/psalm": "^4.10" + "psalm/plugin-phpunit": "^0.17.0", + "vimeo/psalm": "^4.24.0" }, "suggest": { "mezzio/mezzio-csrf": "^1.0 || ^1.0-dev for CSRF protection capabilities", diff --git a/composer.lock b/composer.lock index 2f81bd7..e73d4ea 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "feedb82fe549f2cf97c4fa335a49a3ea", + "content-hash": "27360f6b407db129577de9d7aa2f5af3", "packages": [ { "name": "dflydev/fig-cookies", @@ -70,22 +70,27 @@ }, { "name": "psr/container", - "version": "1.1.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "2ae37329ee82f91efadc282cc2d527fd6065a5ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/2ae37329ee82f91efadc282cc2d527fd6065a5ef", + "reference": "2ae37329ee82f91efadc282cc2d527fd6065a5ef", "shasum": "" }, "require": { "php": ">=7.2.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -112,9 +117,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/php-fig/container/tree/2.0.1" }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2021-03-24T13:40:57+00:00" }, { "name": "psr/http-message", @@ -287,16 +292,16 @@ "packages-dev": [ { "name": "amphp/amp", - "version": "v2.6.0", + "version": "v2.6.2", "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "caa95edeb1ca1bf7532e9118ede4a3c3126408cc" + "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/caa95edeb1ca1bf7532e9118ede4a3c3126408cc", - "reference": "caa95edeb1ca1bf7532e9118ede4a3c3126408cc", + "url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", + "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", "shasum": "" }, "require": { @@ -349,7 +354,7 @@ } ], "description": "A non-blocking concurrency framework for PHP applications.", - "homepage": "http://amphp.org/amp", + "homepage": "https://amphp.org/amp", "keywords": [ "async", "asynchronous", @@ -364,7 +369,7 @@ "support": { "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.6.0" + "source": "https://github.com/amphp/amp/tree/v2.6.2" }, "funding": [ { @@ -372,7 +377,7 @@ "type": "github" } ], - "time": "2021-07-16T20:06:06+00:00" + "time": "2022-02-20T17:52:18+00:00" }, { "name": "amphp/byte-stream", @@ -453,16 +458,16 @@ }, { "name": "composer/package-versions-deprecated", - "version": "1.11.99.4", + "version": "1.11.99.5", "source": { "type": "git", "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b174585d1fe49ceed21928a945138948cb394600" + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b174585d1fe49ceed21928a945138948cb394600", - "reference": "b174585d1fe49ceed21928a945138948cb394600", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", "shasum": "" }, "require": { @@ -506,7 +511,7 @@ "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", "support": { "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.4" + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" }, "funding": [ { @@ -522,27 +527,98 @@ "type": "tidelift" } ], - "time": "2021-09-13T08:41:34+00:00" + "time": "2022-01-17T14:14:24+00:00" + }, + { + "name": "composer/pcre", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "c8e9d27cfc5ed22643c19c160455b473ffd8aabe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/c8e9d27cfc5ed22643c19c160455b473ffd8aabe", + "reference": "c8e9d27cfc5ed22643c19c160455b473ffd8aabe", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/2.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-02-25T20:05:29+00:00" }, { "name": "composer/semver", - "version": "3.2.5", + "version": "3.3.2", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9" + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9", - "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9", + "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^0.12.54", + "phpstan/phpstan": "^1.4", "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", @@ -587,7 +663,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.2.5" + "source": "https://github.com/composer/semver/tree/3.3.2" }, "funding": [ { @@ -603,29 +679,31 @@ "type": "tidelift" } ], - "time": "2021-05-24T12:41:47+00:00" + "time": "2022-04-01T19:23:25+00:00" }, { "name": "composer/xdebug-handler", - "version": "2.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339" + "reference": "ced299686f41dce890debac69273b47ffe98a40c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339", - "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0", + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", "psr/log": "^1 || ^2 || ^3" }, "require-dev": { - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^6.0" }, "type": "library", "autoload": { @@ -651,7 +729,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/2.0.2" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" }, "funding": [ { @@ -667,31 +745,31 @@ "type": "tidelift" } ], - "time": "2021-07-31T17:03:58+00:00" + "time": "2022-02-25T21:32:43+00:00" }, { "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.1", + "version": "v0.7.2", "source": { "type": "git", "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "fe390591e0241955f22eb9ba327d137e501c771c" + "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c", - "reference": "fe390591e0241955f22eb9ba327d137e501c771c", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", "shasum": "" }, "require": { "composer-plugin-api": "^1.0 || ^2.0", "php": ">=5.3", - "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0" + "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" }, "require-dev": { "composer/composer": "*", - "phpcompatibility/php-compatibility": "^9.0", - "sensiolabs/security-checker": "^4.1.0" + "php-parallel-lint/php-parallel-lint": "^1.3.1", + "phpcompatibility/php-compatibility": "^9.0" }, "type": "composer-plugin", "extra": { @@ -712,6 +790,10 @@ "email": "franck.nijhof@dealerdirect.com", "homepage": "http://www.frenck.nl", "role": "Developer / IT Manager" + }, + { + "name": "Contributors", + "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" } ], "description": "PHP_CodeSniffer Standards Composer Installer Plugin", @@ -723,6 +805,7 @@ "codesniffer", "composer", "installer", + "phpcbf", "phpcs", "plugin", "qa", @@ -737,7 +820,7 @@ "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" }, - "time": "2020-12-07T18:04:37+00:00" + "time": "2022-02-04T12:51:07+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -892,16 +975,16 @@ }, { "name": "felixfbecker/language-server-protocol", - "version": "1.5.1", + "version": "v1.5.2", "source": { "type": "git", "url": "https://github.com/felixfbecker/php-language-server-protocol.git", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730" + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/6e82196ffd7c62f7794d778ca52b69feec9f2842", + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842", "shasum": "" }, "require": { @@ -942,30 +1025,30 @@ ], "support": { "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", - "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1" + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.2" }, - "time": "2021-02-22T14:02:09+00:00" + "time": "2022-03-02T22:36:06+00:00" }, { "name": "laminas/laminas-coding-standard", - "version": "2.2.0", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-coding-standard.git", - "reference": "af23a4ceca36b887415585040c6afaff081ccc33" + "reference": "bcf6e07fe4690240be7beb6d884d0b0fafa6a251" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/af23a4ceca36b887415585040c6afaff081ccc33", - "reference": "af23a4ceca36b887415585040c6afaff081ccc33", + "url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/bcf6e07fe4690240be7beb6d884d0b0fafa6a251", + "reference": "bcf6e07fe4690240be7beb6d884d0b0fafa6a251", "shasum": "" }, "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", - "php": "^7.3 || ~8.0.0", - "slevomat/coding-standard": "^6.4.1", - "squizlabs/php_codesniffer": "^3.5.8", - "webimpress/coding-standard": "^1.1.6" + "dealerdirect/phpcodesniffer-composer-installer": "^0.7", + "php": "^7.3 || ^8.0", + "slevomat/coding-standard": "^7.0", + "squizlabs/php_codesniffer": "^3.6", + "webimpress/coding-standard": "^1.2" }, "type": "phpcodesniffer-standard", "autoload": { @@ -997,7 +1080,7 @@ "type": "community_bridge" } ], - "time": "2021-05-15T09:20:49+00:00" + "time": "2021-05-29T15:53:59+00:00" }, { "name": "laminas/laminas-diactoros", @@ -1269,16 +1352,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.12.0", + "version": "v4.14.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "6608f01670c3cc5079e18c1dab1104e002579143" + "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6608f01670c3cc5079e18c1dab1104e002579143", - "reference": "6608f01670c3cc5079e18c1dab1104e002579143", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", + "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", "shasum": "" }, "require": { @@ -1319,9 +1402,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.12.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" }, - "time": "2021-07-21T10:44:31+00:00" + "time": "2022-05-31T20:59:12+00:00" }, { "name": "openlss/lib-array2xml", @@ -1542,16 +1625,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.2.2", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", "shasum": "" }, "require": { @@ -1562,7 +1645,8 @@ "webmozart/assert": "^1.9.1" }, "require-dev": { - "mockery/mockery": "~1.3.2" + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" }, "type": "library", "extra": { @@ -1592,22 +1676,22 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" }, - "time": "2020-09-03T19:13:55+00:00" + "time": "2021-10-19T17:43:47+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.4.0", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + "reference": "77a32518733312af16a44300404e945338981de3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", + "reference": "77a32518733312af16a44300404e945338981de3", "shasum": "" }, "require": { @@ -1615,7 +1699,8 @@ "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "*" + "ext-tokenizer": "*", + "psalm/phar": "^4.8" }, "type": "library", "extra": { @@ -1641,9 +1726,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" }, - "time": "2020-09-17T18:55:26+00:00" + "time": "2022-03-15T21:29:03+00:00" }, { "name": "phpspec/prophecy", @@ -1714,39 +1799,31 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "0.4.9", + "version": "1.6.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531" + "reference": "135607f9ccc297d6923d49c2bcf309f509413215" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/98a088b17966bdf6ee25c8a4b634df313d8aa531", - "reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/135607f9ccc297d6923d49c2bcf309f509413215", + "reference": "135607f9ccc297d6923d49c2bcf309f509413215", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^7.2 || ^8.0" }, "require-dev": { - "consistence/coding-standard": "^3.5", - "ergebnis/composer-normalize": "^2.0.2", - "jakub-onderka/php-parallel-lint": "^0.9.2", - "phing/phing": "^2.16.0", + "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.26", - "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/phpunit": "^6.3", - "slevomat/coding-standard": "^4.7.2", - "symfony/process": "^4.0" + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.4-dev" - } - }, "autoload": { "psr-4": { "PHPStan\\PhpDocParser\\": [ @@ -1761,9 +1838,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/master" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.6.4" }, - "time": "2020-08-03T20:32:43+00:00" + "time": "2022-06-26T13:09:08+00:00" }, { "name": "phpunit/php-code-coverage", @@ -2188,16 +2265,16 @@ }, { "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": { @@ -2242,9 +2319,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/http-factory", @@ -3317,37 +3394,37 @@ }, { "name": "slevomat/coding-standard", - "version": "6.4.1", + "version": "7.2.1", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "696dcca217d0c9da2c40d02731526c1e25b65346" + "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/696dcca217d0c9da2c40d02731526c1e25b65346", - "reference": "696dcca217d0c9da2c40d02731526c1e25b65346", + "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.1 || ^8.0", - "phpstan/phpdoc-parser": "0.4.5 - 0.4.9", - "squizlabs/php_codesniffer": "^3.5.6" + "php": "^7.2 || ^8.0", + "phpstan/phpdoc-parser": "^1.5.1", + "squizlabs/php_codesniffer": "^3.6.2" }, "require-dev": { - "phing/phing": "2.16.3", - "php-parallel-lint/php-parallel-lint": "1.2.0", - "phpstan/phpstan": "0.12.48", - "phpstan/phpstan-deprecation-rules": "0.12.5", - "phpstan/phpstan-phpunit": "0.12.16", - "phpstan/phpstan-strict-rules": "0.12.5", - "phpunit/phpunit": "7.5.20|8.5.5|9.4.0" + "phing/phing": "2.17.3", + "php-parallel-lint/php-parallel-lint": "1.3.2", + "phpstan/phpstan": "1.4.10|1.7.1", + "phpstan/phpstan-deprecation-rules": "1.0.0", + "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": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "7.x-dev" } }, "autoload": { @@ -3362,7 +3439,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/6.4.1" + "source": "https://github.com/slevomat/coding-standard/tree/7.2.1" }, "funding": [ { @@ -3374,20 +3451,20 @@ "type": "tidelift" } ], - "time": "2020-10-05T12:39:37+00:00" + "time": "2022-05-25T10:58:12+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.6.0", + "version": "3.7.1", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625" + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625", - "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", "shasum": "" }, "require": { @@ -3430,30 +3507,30 @@ "source": "https://github.com/squizlabs/PHP_CodeSniffer", "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "time": "2021-04-09T00:54:41+00:00" + "time": "2022-06-18T07:21:10+00:00" }, { "name": "symfony/console", - "version": "v5.3.7", + "version": "v5.4.10", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "8b1008344647462ae6ec57559da166c2bfa5e16a" + "reference": "4d671ab4ddac94ee439ea73649c69d9d200b5000" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/8b1008344647462ae6ec57559da166c2bfa5e16a", - "reference": "8b1008344647462ae6ec57559da166c2bfa5e16a", + "url": "https://api.github.com/repos/symfony/console/zipball/4d671ab4ddac94ee439ea73649c69d9d200b5000", + "reference": "4d671ab4ddac94ee439ea73649c69d9d200b5000", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php73": "^1.9", "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2", - "symfony/string": "^5.1" + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.1|^6.0" }, "conflict": { "psr/log": ">=3", @@ -3468,12 +3545,12 @@ }, "require-dev": { "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/event-dispatcher": "^4.4|^5.0", - "symfony/lock": "^4.4|^5.0", - "symfony/process": "^4.4|^5.0", - "symfony/var-dumper": "^4.4|^5.0" + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/event-dispatcher": "^4.4|^5.0|^6.0", + "symfony/lock": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/var-dumper": "^4.4|^5.0|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -3513,7 +3590,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.3.7" + "source": "https://github.com/symfony/console/tree/v5.4.10" }, "funding": [ { @@ -3529,20 +3606,20 @@ "type": "tidelift" } ], - "time": "2021-08-25T20:02:16+00:00" + "time": "2022-06-26T13:00:04+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.4.0", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", "shasum": "" }, "require": { @@ -3551,7 +3628,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -3580,7 +3657,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.4.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" }, "funding": [ { @@ -3596,32 +3673,35 @@ "type": "tidelift" } ], - "time": "2021-03-23T23:28:01+00:00" + "time": "2022-01-02T09:53:40+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.23.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-ctype": "*" + }, "suggest": { "ext-ctype": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3659,7 +3739,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" }, "funding": [ { @@ -3675,20 +3755,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.23.1", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "16880ba9c5ebe3642d1995ab866db29270b36535" + "reference": "433d05519ce6990bf3530fba6957499d327395c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535", - "reference": "16880ba9c5ebe3642d1995ab866db29270b36535", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", + "reference": "433d05519ce6990bf3530fba6957499d327395c2", "shasum": "" }, "require": { @@ -3700,7 +3780,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3740,7 +3820,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" }, "funding": [ { @@ -3756,20 +3836,20 @@ "type": "tidelift" } ], - "time": "2021-05-27T12:26:48+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.23.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": { @@ -3781,7 +3861,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3824,7 +3904,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" }, "funding": [ { @@ -3840,32 +3920,35 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.23.1", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, "suggest": { "ext-mbstring": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3904,7 +3987,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" }, "funding": [ { @@ -3920,20 +4003,20 @@ "type": "tidelift" } ], - "time": "2021-05-27T12:26:48+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.23.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" + "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", + "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", "shasum": "" }, "require": { @@ -3942,7 +4025,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3983,7 +4066,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" }, "funding": [ { @@ -3999,20 +4082,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.23.1", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", "shasum": "" }, "require": { @@ -4021,7 +4104,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4066,7 +4149,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" }, "funding": [ { @@ -4082,37 +4165,33 @@ "type": "tidelift" } ], - "time": "2021-07-28T13:41:28+00:00" + "time": "2022-05-10T07:21:04+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.4.0", + "version": "v1.1.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" + "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", - "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/191afdcb5804db960d26d8566b7e9a2843cab3a0", + "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1" + "php": "^7.1.3" }, "suggest": { + "psr/container": "", "symfony/service-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "dev-master": "1.1-dev" } }, "autoload": { @@ -4145,36 +4224,22 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.4.0" + "source": "https://github.com/symfony/service-contracts/tree/v1.1.2" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-04-01T10:43:52+00:00" + "time": "2019-05-28T07:50:59+00:00" }, { "name": "symfony/string", - "version": "v5.3.7", + "version": "v5.4.10", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5" + "reference": "4432bc7df82a554b3e413a8570ce2fea90e94097" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/8d224396e28d30f81969f083a58763b8b9ceb0a5", - "reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5", + "url": "https://api.github.com/repos/symfony/string/zipball/4432bc7df82a554b3e413a8570ce2fea90e94097", + "reference": "4432bc7df82a554b3e413a8570ce2fea90e94097", "shasum": "" }, "require": { @@ -4185,11 +4250,14 @@ "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php80": "~1.15" }, + "conflict": { + "symfony/translation-contracts": ">=3.0" + }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0", - "symfony/http-client": "^4.4|^5.0", + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/http-client": "^4.4|^5.0|^6.0", "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0" + "symfony/var-exporter": "^4.4|^5.0|^6.0" }, "type": "library", "autoload": { @@ -4228,7 +4296,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.3.7" + "source": "https://github.com/symfony/string/tree/v5.4.10" }, "funding": [ { @@ -4244,7 +4312,7 @@ "type": "tidelift" } ], - "time": "2021-08-26T08:00:08+00:00" + "time": "2022-06-26T15:57:47+00:00" }, { "name": "theseer/tokenizer", @@ -4298,16 +4366,16 @@ }, { "name": "vimeo/psalm", - "version": "4.10.0", + "version": "4.24.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "916b098b008f6de4543892b1e0651c1c3b92cbfa" + "reference": "06dd975cb55d36af80f242561738f16c5f58264f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/916b098b008f6de4543892b1e0651c1c3b92cbfa", - "reference": "916b098b008f6de4543892b1e0651c1c3b92cbfa", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/06dd975cb55d36af80f242561738f16c5f58264f", + "reference": "06dd975cb55d36af80f242561738f16c5f58264f", "shasum": "" }, "require": { @@ -4315,7 +4383,7 @@ "amphp/byte-stream": "^1.5", "composer/package-versions-deprecated": "^1.8.0", "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.1 || ^2.0", + "composer/xdebug-handler": "^1.1 || ^2.0 || ^3.0", "dnoegel/php-xdg-base-dir": "^0.1.1", "ext-ctype": "*", "ext-dom": "*", @@ -4327,11 +4395,12 @@ "felixfbecker/advanced-json-rpc": "^3.0.3", "felixfbecker/language-server-protocol": "^1.5", "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "nikic/php-parser": "^4.12", + "nikic/php-parser": "^4.13", "openlss/lib-array2xml": "^1.0", "php": "^7.1|^8", "sebastian/diff": "^3.0 || ^4.0", - "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0", + "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0", + "symfony/polyfill-php80": "^1.25", "webmozart/path-util": "^2.3" }, "provide": { @@ -4349,11 +4418,12 @@ "psalm/plugin-phpunit": "^0.16", "slevomat/coding-standard": "^7.0", "squizlabs/php_codesniffer": "^3.5", - "symfony/process": "^4.3 || ^5.0", + "symfony/process": "^4.3 || ^5.0 || ^6.0", "weirdan/prophecy-shim": "^1.0 || ^2.0" }, "suggest": { - "ext-igbinary": "^2.0.5" + "ext-curl": "In order to send data to shepherd", + "ext-igbinary": "^2.0.5 is required, used to serialize caching data" }, "bin": [ "psalm", @@ -4397,30 +4467,30 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.10.0" + "source": "https://github.com/vimeo/psalm/tree/4.24.0" }, - "time": "2021-09-04T21:00:09+00:00" + "time": "2022-06-26T11:47:54+00:00" }, { "name": "webimpress/coding-standard", - "version": "1.2.2", + "version": "1.2.4", "source": { "type": "git", "url": "https://github.com/webimpress/coding-standard.git", - "reference": "8f4a220de33f471a8101836f7ec72b852c3f9f03" + "reference": "cd0c4b0b97440c337c1f7da17b524674ca2f9ca9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/8f4a220de33f471a8101836f7ec72b852c3f9f03", - "reference": "8f4a220de33f471a8101836f7ec72b852c3f9f03", + "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/cd0c4b0b97440c337c1f7da17b524674ca2f9ca9", + "reference": "cd0c4b0b97440c337c1f7da17b524674ca2f9ca9", "shasum": "" }, "require": { "php": "^7.3 || ^8.0", - "squizlabs/php_codesniffer": "^3.6" + "squizlabs/php_codesniffer": "^3.6.2" }, "require-dev": { - "phpunit/phpunit": "^9.5.4" + "phpunit/phpunit": "^9.5.13" }, "type": "phpcodesniffer-standard", "extra": { @@ -4446,7 +4516,7 @@ ], "support": { "issues": "https://github.com/webimpress/coding-standard/issues", - "source": "https://github.com/webimpress/coding-standard/tree/1.2.2" + "source": "https://github.com/webimpress/coding-standard/tree/1.2.4" }, "funding": [ { @@ -4454,25 +4524,25 @@ "type": "github" } ], - "time": "2021-04-12T12:51:27+00:00" + "time": "2022-02-15T19:52:12+00:00" }, { "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", @@ -4510,9 +4580,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", diff --git a/psalm-baseline.xml b/psalm-baseline.xml index ce4c285..26047b2 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,140 +1,9 @@ - - - - string - - - $this->proxiedSession->getId() - - - getId - - + - - $this->sessionLifetime - - - null|bool|int|float|string|array|stdClass - + json_decode(json_encode($value, JSON_PRESERVE_ZERO_FRACTION), true) - - - $container->get(SessionPersistenceInterface::class) - - - - - ($this->provider)() - - - $this->provider - - - $this->provider - - - - - $response->getHeaderLine('Expires') - $response->getHeaderLine('Expires') - - - $response - $response - $response - $response - $response - $response - - - array - array - array - iterable - - - addCacheHeadersToResponse - addCacheHeadersToResponse - addCacheHeadersToResponse - addCacheHeadersToResponse - addCacheHeadersToResponse - addCacheHeadersToResponse - getHeaderLine - getHeaderLine - getHeaderLine - getHeaderLine - getHeaderLine - getHeaderLine - getHeaderLine - getHeaderLine - getHeaderLine - getHeaderLine - getHeaderLine - getHeaderLine - getHeaderLine - getLastModified - getLastModified - hasHeader - hasHeader - hasHeader - hasHeader - hasHeader - hasHeader - hasHeader - hasHeader - responseAlreadyHasCacheHeaders - responseAlreadyHasCacheHeaders - - - $lastModified - - - - - trait_isDeleteCookieOnEmptySession - - - $actualHeaderLine - $setCookie - - - $actualHeaderLine - $response - $response - $setCookie - $setCookie - $setCookie - $setCookie - $setCookie - $setCookie - - - array - array - array - - - addSessionCookieHeaderToResponse - addSessionCookieHeaderToResponse - createSessionCookieForResponse - createSessionCookieForResponse - createSessionCookieForResponse - createSessionCookieForResponse - createSessionCookieForResponse - createSessionCookieForResponse - getHeaderLine - getHeaderLine - getSessionCookieLifetime - getSessionCookieValueFromRequest - getSessionCookieValueFromRequest - - - $setCookie - - diff --git a/psalm.xml.dist b/psalm.xml similarity index 92% rename from psalm.xml.dist rename to psalm.xml index 60590d5..6a58069 100644 --- a/psalm.xml.dist +++ b/psalm.xml @@ -1,6 +1,6 @@ @@ -28,4 +28,7 @@ + + + diff --git a/src/ConfigProvider.php b/src/ConfigProvider.php index a75f2dd..ae4d555 100644 --- a/src/ConfigProvider.php +++ b/src/ConfigProvider.php @@ -4,8 +4,6 @@ namespace Mezzio\Session; -use Zend\Expressive\Session\SessionMiddleware as LegacySessionMiddleware; - class ConfigProvider { public function __invoke(): array @@ -19,8 +17,9 @@ public function getDependencies(): array { return [ // Legacy Zend Framework aliases + // phpcs:disable WebimpressCodingStandard.Formatting.StringClassReference.Found 'aliases' => [ - LegacySessionMiddleware::class => SessionMiddleware::class, + 'Zend\Expressive\Session\SessionMiddleware' => SessionMiddleware::class, ], 'factories' => [ SessionMiddleware::class => SessionMiddlewareFactory::class, diff --git a/src/LazySession.php b/src/LazySession.php index 8be4793..ccbd71b 100644 --- a/src/LazySession.php +++ b/src/LazySession.php @@ -48,7 +48,7 @@ public function regenerate(): SessionInterface public function isRegenerated(): bool { - if (! $this->proxiedSession) { + if (! $this->proxiedSession instanceof SessionInterface) { return false; } @@ -94,7 +94,7 @@ public function clear(): void public function hasChanged(): bool { - if (! $this->proxiedSession) { + if (! $this->proxiedSession instanceof SessionInterface) { return false; } @@ -151,7 +151,8 @@ public function initializeId(): string } $this->proxiedSession = $this->persistence->initializeId($this->getProxiedSession()); - return $this->proxiedSession->getId(); + + return $this->getId(); } private function getProxiedSession(): SessionInterface diff --git a/src/Persistence/CacheHeadersGeneratorTrait.php b/src/Persistence/CacheHeadersGeneratorTrait.php index e98f41b..5c389d7 100644 --- a/src/Persistence/CacheHeadersGeneratorTrait.php +++ b/src/Persistence/CacheHeadersGeneratorTrait.php @@ -34,7 +34,7 @@ trait CacheHeadersGeneratorTrait */ private $cacheLimiter; - /** @var array */ + /** @var array */ private static $supportedCacheLimiters = [ 'nocache' => true, 'public' => true, @@ -42,7 +42,7 @@ trait CacheHeadersGeneratorTrait 'private_no_expire' => true, ]; - /** @var bool|string */ + /** @var bool|string|null */ private $lastModified; /** diff --git a/src/Persistence/Http.php b/src/Persistence/Http.php index bd5dfc1..766d9c2 100644 --- a/src/Persistence/Http.php +++ b/src/Persistence/Http.php @@ -13,8 +13,7 @@ class Http * HTTP date format to be used in `gmdate` calls for creating valid header * values. * - * òsee https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Date - * + * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Date * @see https://tools.ietf.org/html/rfc7231#section-7.1.1.2 */ public const DATE_FORMAT = 'D, d M Y H:i:s T'; diff --git a/src/Persistence/SessionCookieAwareTrait.php b/src/Persistence/SessionCookieAwareTrait.php index 7c96503..298b9dc 100644 --- a/src/Persistence/SessionCookieAwareTrait.php +++ b/src/Persistence/SessionCookieAwareTrait.php @@ -21,7 +21,7 @@ */ trait SessionCookieAwareTrait { - /** @var string */ + /** @var string|null */ private $cookieName; /** @var int */ diff --git a/src/Session.php b/src/Session.php index 7efdc49..e76cd95 100644 --- a/src/Session.php +++ b/src/Session.php @@ -4,9 +4,8 @@ namespace Mezzio\Session; -use stdClass; - use function array_key_exists; +use function is_numeric; use function json_decode; use function json_encode; @@ -20,7 +19,7 @@ class Session implements /** * Current data within the session. * - * @var array + * @var array */ private $data; @@ -54,13 +53,17 @@ class Session implements */ private $sessionLifetime = 0; + /** @param array $data */ public function __construct(array $data, string $id = '') { $this->data = $this->originalData = $data; $this->id = $id; - if (isset($data[SessionCookiePersistenceInterface::SESSION_LIFETIME_KEY])) { - $this->sessionLifetime = $data[SessionCookiePersistenceInterface::SESSION_LIFETIME_KEY]; + /** @psalm-suppress MixedAssignment */ + $lifetime = $data[SessionCookiePersistenceInterface::SESSION_LIFETIME_KEY] ?? null; + + if (is_numeric($lifetime)) { + $this->sessionLifetime = (int) $lifetime; } } @@ -71,7 +74,7 @@ public function __construct(array $data, string $id = '') * within a session are serializable across any session adapter. * * @param mixed $value - * @return null|bool|int|float|string|array|stdClass + * @return null|bool|int|float|string|array */ public static function extractSerializableValue($value) { @@ -80,6 +83,8 @@ public static function extractSerializableValue($value) /** * Retrieve all data for purposes of persistence. + * + * @return array */ public function toArray(): array { diff --git a/src/SessionCookiePersistenceInterface.php b/src/SessionCookiePersistenceInterface.php index 9c138b4..526a639 100644 --- a/src/SessionCookiePersistenceInterface.php +++ b/src/SessionCookiePersistenceInterface.php @@ -1,5 +1,7 @@ provider = new ConfigProvider(); @@ -17,6 +20,7 @@ public function setUp(): void public function testInvocationReturnsArray(): array { $config = ($this->provider)(); + /** @psalm-suppress RedundantCondition */ $this->assertIsArray($config); return $config; } diff --git a/test/LazySessionTest.php b/test/LazySessionTest.php index a9e4093..a1ca8c2 100644 --- a/test/LazySessionTest.php +++ b/test/LazySessionTest.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace MezzioTest\Session\LazySessionTest; +namespace MezzioTest\Session; use Mezzio\Session\Exception\NotInitializableException; use Mezzio\Session\LazySession; diff --git a/test/Persistence/CacheHeadersGeneratorConsumer.php b/test/Persistence/CacheHeadersGeneratorConsumer.php new file mode 100644 index 0000000..cc8fd74 --- /dev/null +++ b/test/Persistence/CacheHeadersGeneratorConsumer.php @@ -0,0 +1,40 @@ +cacheExpire = $cacheExpire; + $this->cacheLimiter = $cacheLimiter; + $this->lastModified = $lastModified; + } + + public function addCacheHeadersToResponse(ResponseInterface $response): ResponseInterface + { + return $this->trait_addCacheHeadersToResponse($response); + } + + /** @return string|false */ + public function getLastModified() + { + return $this->trait_getLastModified(); + } + + public function responseAlreadyHasCacheHeaders(ResponseInterface $response): bool + { + return $this->trait_responseAlreadyHasCacheHeaders($response); + } +} diff --git a/test/Persistence/CacheHeadersGeneratorTraitTest.php b/test/Persistence/CacheHeadersGeneratorTraitTest.php index 6cecf18..1b66515 100644 --- a/test/Persistence/CacheHeadersGeneratorTraitTest.php +++ b/test/Persistence/CacheHeadersGeneratorTraitTest.php @@ -5,11 +5,11 @@ namespace MezzioTest\Session\Persistence; use DateTimeImmutable; +use Generator; use Laminas\Diactoros\Response; use Mezzio\Session\Persistence\CacheHeadersGeneratorTrait; use Mezzio\Session\Persistence\Http; use PHPUnit\Framework\TestCase; -use Psr\Http\Message\ResponseInterface; use ReflectionClass; use function assert; @@ -38,37 +38,8 @@ protected function createConsumerInstance( int $cacheExpire = 180, string $cacheLimiter = '', ?string $lastModified = null - ): object { - return new class ($cacheExpire, $cacheLimiter, $lastModified) { - use CacheHeadersGeneratorTrait { - addCacheHeadersToResponse as trait_addCacheHeadersToResponse; - responseAlreadyHasCacheHeaders as trait_responseAlreadyHasCacheHeaders; - getLastModified as trait_getLastModified; - } - - public function __construct(int $cacheExpire, string $cacheLimiter, ?string $lastModified = null) - { - $this->cacheExpire = $cacheExpire; - $this->cacheLimiter = $cacheLimiter; - $this->lastModified = $lastModified; - } - - public function addCacheHeadersToResponse(ResponseInterface $response): ResponseInterface - { - return $this->trait_addCacheHeadersToResponse($response); - } - - /** @return string|false */ - public function getLastModified() - { - return $this->trait_getLastModified(); - } - - public function responseAlreadyHasCacheHeaders(ResponseInterface $response): bool - { - return $this->trait_responseAlreadyHasCacheHeaders($response); - } - }; + ): CacheHeadersGeneratorConsumer { + return new CacheHeadersGeneratorConsumer($cacheExpire, $cacheLimiter, $lastModified); } public function testLastModified(): void @@ -101,6 +72,7 @@ public function testResponseAlreadyHasCacheHeaders( self::assertFalse($consumer->responseAlreadyHasCacheHeaders($response)); } + /** @return array */ public function provideCacheHeaderValues(): array { return [ @@ -112,6 +84,7 @@ public function provideCacheHeaderValues(): array ]; } + /** @return array */ public function provideUnsupportedCacheLimiters(): array { return [ @@ -134,7 +107,8 @@ public function testDontAddCacheHeadersForEmptyOrUnsupportedCacheLimiter(string self::assertFalse($response->hasHeader('Pragma')); } - public function providePreexistingCacheHeaders(): iterable + /** @return Generator}> */ + public function providePreexistingCacheHeaders(): Generator { yield 'last-modified' => [ 'Last-Modified', @@ -257,7 +231,6 @@ public function testResponseCacheHeadersToResponseWithValidCacheLimiters( $response = $consumer->addCacheHeadersToResponse(new Response()); $actualExpires = $response->getHeaderLine('Expires'); - self::assertIsString($actualExpires); self::assertEqualDateWithDelta($expectedExpires, $actualExpires, 2); self::assertSame($expectedLastModified, $response->getHeaderLine('Last-Modified')); self::assertSame($expectedCacheControl, $response->getHeaderLine('Cache-Control')); @@ -280,6 +253,16 @@ private static function assertEqualDateWithDelta(string $expect, string $actual, self::assertEqualsWithDelta($expectedDate->getTimestamp(), $actualDate->getTimestamp(), $delta); } + /** + * @return array + */ public function provideCacheLimiterValues(): array { $cacheExpire = 60; @@ -315,7 +298,7 @@ public function provideCacheLimiterValues(): array 'cache_expire' => $cacheExpire, 'cache_limiter' => 'public', 'expected_expires' => gmdate(Http::DATE_FORMAT, time() + (60 * $cacheExpire)), - 'expected_last_modified' => $lastModified, + 'expected_last_modified' => (string) $lastModified, 'expected_cache_control' => 'public, max-age=' . $maxAge, 'expected_pragma' => '', ], @@ -323,7 +306,7 @@ public function provideCacheLimiterValues(): array 'cache_expire' => $cacheExpire, 'cache_limiter' => 'private', 'expected_expires' => Http::CACHE_PAST_DATE, - 'expected_last_modified' => $lastModified, + 'expected_last_modified' => (string) $lastModified, 'expected_cache_control' => 'private, max-age=' . $maxAge, 'expected_pragma' => '', ], diff --git a/test/Persistence/SessionCookieAwareConsumer.php b/test/Persistence/SessionCookieAwareConsumer.php new file mode 100644 index 0000000..629890f --- /dev/null +++ b/test/Persistence/SessionCookieAwareConsumer.php @@ -0,0 +1,71 @@ +cookieName = $cookieName; + $this->cookieLifetime = $cookieLifetime; + $this->cookiePath = $cookiePath; + $this->cookieDomain = $cookieDomain; + $this->cookieSecure = $cookieSecure; + $this->cookieHttpOnly = $cookieHttpOnly; + $this->cookieSameSite = $cookieSameSite; + $this->deleteCookieOnEmptySession = $deleteCookieOnEmptySession; + } + + public function getSessionCookieValueFromRequest(ServerRequestInterface $request): string + { + return $this->trait_getSessionCookieValueFromRequest($request); + } + + public function addSessionCookieHeaderToResponse( + ResponseInterface $response, + string $cookieValue, + SessionInterface $session + ): ResponseInterface { + return $this->trait_addSessionCookieHeaderToResponse($response, $cookieValue, $session); + } + + public function createSessionCookieForResponse(string $cookieValue, int $cookieLifetime = 0): SetCookie + { + return $this->trait_createSessionCookieForResponse($cookieValue, $cookieLifetime); + } + + public function getSessionCookieLifetime(SessionInterface $session): int + { + return $this->trait_getSessionCookieLifetime($session); + } + + public function isDeleteCookieOnEmptySession(): bool + { + /** @psalm-suppress InternalMethod */ + return $this->trait_isDeleteCookieOnEmptySession(); + } +} diff --git a/test/Persistence/SessionCookieAwareTraitTest.php b/test/Persistence/SessionCookieAwareTraitTest.php index 1799146..53e8562 100644 --- a/test/Persistence/SessionCookieAwareTraitTest.php +++ b/test/Persistence/SessionCookieAwareTraitTest.php @@ -7,15 +7,11 @@ use Dflydev\FigCookies\Cookie; use Dflydev\FigCookies\FigRequestCookies; use Dflydev\FigCookies\Modifier\SameSite; -use Dflydev\FigCookies\SetCookie; use Laminas\Diactoros\Response; use Laminas\Diactoros\ServerRequest; use Laminas\Diactoros\ServerRequestFactory; -use Mezzio\Session\Persistence\SessionCookieAwareTrait; use Mezzio\Session\Session; -use Mezzio\Session\SessionInterface; use PHPUnit\Framework\TestCase; -use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use function class_exists; @@ -57,8 +53,8 @@ protected function createConsumerInstance( ?bool $cookieHttpOnly = null, ?string $cookieSameSite = null, ?bool $deleteCookieOnEmptySession = null - ): object { - return new class ( + ): SessionCookieAwareConsumer { + return new SessionCookieAwareConsumer( $cookieName ?? self::COOKIE_NAME, $cookieLifetime ?? self::COOKIE_LIFETIME, $cookiePath ?? self::COOKIE_PATH, @@ -67,69 +63,13 @@ protected function createConsumerInstance( $cookieHttpOnly ?? self::COOKIE_HTTPONLY, $cookieSameSite ?? self::COOKIE_SAMESITE, $deleteCookieOnEmptySession ?? self::DELETE_COOKIE_ON_EMPTY_SESSION - ) { - use SessionCookieAwareTrait { - getSessionCookieValueFromRequest as trait_getSessionCookieValueFromRequest; - addSessionCookieHeaderToResponse as trait_addSessionCookieHeaderToResponse; - createSessionCookieForResponse as trait_createSessionCookieForResponse; - getSessionCookieLifetime as trait_getSessionCookieLifetime; - isDeleteCookieOnEmptySession as trait_isDeleteCookieOnEmptySession; - } - - public function __construct( - string $cookieName, - int $cookieLifetime = 0, - string $cookiePath = '/', - ?string $cookieDomain = null, - bool $cookieSecure = false, - bool $cookieHttpOnly = false, - string $cookieSameSite = '', - bool $deleteCookieOnEmptySession = false - ) { - $this->cookieName = $cookieName; - $this->cookieLifetime = $cookieLifetime; - $this->cookiePath = $cookiePath; - $this->cookieDomain = $cookieDomain; - $this->cookieSecure = $cookieSecure; - $this->cookieHttpOnly = $cookieHttpOnly; - $this->cookieSameSite = $cookieSameSite; - $this->deleteCookieOnEmptySession = $deleteCookieOnEmptySession; - } - - public function getSessionCookieValueFromRequest(ServerRequestInterface $request): string - { - return $this->trait_getSessionCookieValueFromRequest($request); - } - - public function addSessionCookieHeaderToResponse( - ResponseInterface $response, - string $cookieValue, - SessionInterface $session - ): ResponseInterface { - return $this->trait_addSessionCookieHeaderToResponse($response, $cookieValue, $session); - } - - public function createSessionCookieForResponse(string $cookieValue, int $cookieLifetime = 0): SetCookie - { - return $this->trait_createSessionCookieForResponse($cookieValue, $cookieLifetime); - } - - public function getSessionCookieLifetime(SessionInterface $session): int - { - return $this->trait_getSessionCookieLifetime($session); - } - - public function isDeleteCookieOnEmptySession(): bool - { - return $this->trait_isDeleteCookieOnEmptySession(); - } - }; + ); } /** * @dataProvider provideRequestSessionCookieValues */ - public function testGetSessionCookieValueFromRequestUsingInjectesCookieParams( + public function testGetSessionCookieValueFromRequestUsingInjectsCookieParams( string $cookieName, ?string $cookieValue = null, ?string $expected = null @@ -147,17 +87,19 @@ public function testGetSessionCookieValueFromRequestUsingInjectesCookieParams( */ public function testGetSessionCookieValueFromRequestUsingInjectedCookieHeader( string $cookieName, - ?string $cookieValue = null, - ?string $expected = null + ?string $cookieValue, + string $expected ): void { $consumer = $this->createConsumerInstance($cookieName); $cookie = Cookie::create($cookieName, $cookieValue); $request = FigRequestCookies::set(new ServerRequest(), $cookie); + self::assertInstanceOf(ServerRequestInterface::class, $request); self::assertSame($expected, $consumer->getSessionCookieValueFromRequest($request)); } + /** @return array */ public function provideRequestSessionCookieValues(): array { $cookieName = 'SESSIONID'; @@ -210,6 +152,7 @@ public function testCreateSessionCookieForResponse( self::assertSame($expectedHeaderLine, $actualHeaderLine); } + /** @return array */ public function provideResponseCookieHeaderLines(): array { $cookieName = 'PHPSESSID'; @@ -302,9 +245,9 @@ public function testCreateSessionCookieForResponseWithSameSiteIfSupported(): voi * @dataProvider provideSessionCookieLifetimeValues */ public function testGetSessionCookieLifetimeReturnsExpectedResults( - ?int $cookieLifetime = null, - ?int $sessionLifetime = null, - ?int $expected = null + ?int $cookieLifetime, + ?int $sessionLifetime, + int $expected ): void { $consumer = $this->createConsumerInstance('SESSIONCOOKIENAME', $cookieLifetime ?? 0); $session = new Session([]); @@ -315,6 +258,7 @@ public function testGetSessionCookieLifetimeReturnsExpectedResults( self::assertSame($expected, $consumer->getSessionCookieLifetime($session)); } + /** @return array */ public function provideSessionCookieLifetimeValues(): array { return [ @@ -344,8 +288,7 @@ public function testSessionCookieIsDeletedFromBrowserWhenFlagIsSetAndSessionBeco $session->clear(); $response = $consumer->addSessionCookieHeaderToResponse(new Response(), $cookieValue, $session); - $cookieString = $response->getHeaderLine('Set-Cookie'); - $this->assertIsString($cookieString); + $cookieString = $response->getHeaderLine('Set-Cookie'); $expiresString = 'Expires=Thu, 01 Jan 1970 00:00:01 GMT'; $this->assertStringContainsString($expiresString, $cookieString, 'cookie should bet set to expire in the past'); } diff --git a/test/SessionTest.php b/test/SessionTest.php index 805fadc..2bcda4c 100644 --- a/test/SessionTest.php +++ b/test/SessionTest.php @@ -9,7 +9,6 @@ use Mezzio\Session\SessionIdentifierAwareInterface; use Mezzio\Session\SessionInterface; use PHPUnit\Framework\TestCase; -use stdClass; use function json_decode; use function json_encode; @@ -110,7 +109,7 @@ public function testClearingSessionRemovesAllData(): void } /** - * @psalm-return array}> + * @psalm-return array}> */ public function serializedDataProvider(): array {