diff --git a/.gitignore b/.gitignore index ee18513..8079aa0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,8 @@ /clover.xml -/coveralls-upload.json /docs/html/ /laminas-mkdoc-theme.tgz /laminas-mkdoc-theme/ /phpunit.xml /vendor/ -/.phpunit.result.cache +/.phpunit.cache /.phpcs-cache diff --git a/composer.json b/composer.json index e3eb66e..7a2206d 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ ], "license": "BSD-3-Clause", "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0", + "php": "~8.1.0 || ~8.2.0", "fig/http-message-util": "^1.1", "mezzio/mezzio-router": "^3.1", "psr/container": "^1.0 || ^2.0", @@ -18,13 +18,14 @@ "psr/http-message": "^1.0 || ^2.0", "psr/http-server-handler": "^1.0", "psr/http-server-middleware": "^1.0", - "webmozart/assert": "^1.9" + "webmozart/assert": "^1.11.0" }, "require-dev": { "laminas/laminas-coding-standard": "~2.5.0", - "phpunit/phpunit": "^9.5.28", + "laminas/laminas-diactoros": "^3.0", + "phpunit/phpunit": "^10.2.2", "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.6" + "vimeo/psalm": "^5.13.1" }, "config": { "preferred-install": "dist", @@ -34,7 +35,7 @@ "dealerdirect/phpcodesniffer-composer-installer": true }, "platform": { - "php": "8.0.99" + "php": "8.1.99" } }, "extra": { diff --git a/composer.lock b/composer.lock index 56779e2..2171dd2 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": "6f51754adabfcbc32dee670a215730cd", + "content-hash": "bc6142133a6486647522ce035665b1b3", "packages": [ { "name": "fig/http-message-util", @@ -64,24 +64,24 @@ }, { "name": "mezzio/mezzio-router", - "version": "3.13.0", + "version": "3.16.1", "source": { "type": "git", "url": "https://github.com/mezzio/mezzio-router.git", - "reference": "cb9e2476844074587e1ed849f53ef466a7e8d893" + "reference": "b83d61a728fdc2c62c6d20d16b73414901b36070" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mezzio/mezzio-router/zipball/cb9e2476844074587e1ed849f53ef466a7e8d893", - "reference": "cb9e2476844074587e1ed849f53ef466a7e8d893", + "url": "https://api.github.com/repos/mezzio/mezzio-router/zipball/b83d61a728fdc2c62c6d20d16b73414901b36070", + "reference": "b83d61a728fdc2c62c6d20d16b73414901b36070", "shasum": "" }, "require": { "fig/http-message-util": "^1.1.2", - "php": "~8.0.0 || ~8.1.0 || ~8.2.0", + "php": "~8.1.0 || ~8.2.0", "psr/container": "^1.0 || ^2.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0.1", + "psr/http-message": "^1.0.1 || ^2.0.0", "psr/http-server-middleware": "^1.0", "webmozart/assert": "^1.10" }, @@ -91,11 +91,12 @@ }, "require-dev": { "laminas/laminas-coding-standard": "~2.5.0", - "laminas/laminas-diactoros": "^2.24", + "laminas/laminas-diactoros": "^2.25.2", + "laminas/laminas-servicemanager": "^3.20.0", "laminas/laminas-stratigility": "^3.9.0", - "phpunit/phpunit": "^9.5.27", + "phpunit/phpunit": "^10.1.2", "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.4" + "vimeo/psalm": "^5.9" }, "suggest": { "mezzio/mezzio-aurarouter": "^3.0 to use the Aura.Router routing adapter", @@ -141,7 +142,7 @@ "type": "community_bridge" } ], - "time": "2023-01-15T08:25:11+00:00" + "time": "2023-04-24T14:33:22+00:00" }, { "name": "psr/container", @@ -198,21 +199,21 @@ }, { "name": "psr/http-factory", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + "reference": "e616d01114759c4c489f93b099585439f795fe35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", + "reference": "e616d01114759c4c489f93b099585439f795fe35", "shasum": "" }, "require": { "php": ">=7.0.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -232,7 +233,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interfaces for PSR-7 HTTP message factories", @@ -247,22 +248,22 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/master" + "source": "https://github.com/php-fig/http-factory/tree/1.0.2" }, - "time": "2019-04-30T12:38:16+00:00" + "time": "2023-04-10T20:10:41+00:00" }, { "name": "psr/http-message", - "version": "1.1", + "version": "2.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { @@ -271,7 +272,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -286,7 +287,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -300,27 +301,27 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/1.1" + "source": "https://github.com/php-fig/http-message/tree/2.0" }, - "time": "2023-04-04T09:50:52+00:00" + "time": "2023-04-04T09:54:51+00:00" }, { "name": "psr/http-server-handler", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/http-server-handler.git", - "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7" + "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/aff2f80e33b7f026ec96bb42f63242dc50ffcae7", - "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7", + "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/84c4fb66179be4caaf8e97bd239203245302e7d4", + "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4", "shasum": "" }, "require": { "php": ">=7.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -340,7 +341,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP server-side request handler", @@ -356,28 +357,27 @@ "server" ], "support": { - "issues": "https://github.com/php-fig/http-server-handler/issues", - "source": "https://github.com/php-fig/http-server-handler/tree/master" + "source": "https://github.com/php-fig/http-server-handler/tree/1.0.2" }, - "time": "2018-10-30T16:46:14+00:00" + "time": "2023-04-10T20:06:20+00:00" }, { "name": "psr/http-server-middleware", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/http-server-middleware.git", - "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5" + "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/2296f45510945530b9dceb8bcedb5cb84d40c5f5", - "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5", + "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/c1481f747daaa6a0782775cd6a8c26a1bf4a3829", + "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829", "shasum": "" }, "require": { "php": ">=7.0", - "psr/http-message": "^1.0", + "psr/http-message": "^1.0 || ^2.0", "psr/http-server-handler": "^1.0" }, "type": "library", @@ -398,7 +398,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP server-side middleware", @@ -414,9 +414,9 @@ ], "support": { "issues": "https://github.com/php-fig/http-server-middleware/issues", - "source": "https://github.com/php-fig/http-server-middleware/tree/master" + "source": "https://github.com/php-fig/http-server-middleware/tree/1.0.2" }, - "time": "2018-10-30T17:12:04+00:00" + "time": "2023-04-11T06:14:47+00:00" }, { "name": "webmozart/assert", @@ -1047,76 +1047,6 @@ }, "time": "2019-12-04T15:06:13+00:00" }, - { - "name": "doctrine/instantiator", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9 || ^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.30 || ^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.5.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-12-30T00:15:36+00:00" - }, { "name": "felixfbecker/advanced-json-rpc", "version": "v3.2.1", @@ -1220,16 +1150,16 @@ }, { "name": "fidry/cpu-core-counter", - "version": "0.4.1", + "version": "0.5.1", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "79261cc280aded96d098e1b0e0ba0c4881b432c2" + "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/79261cc280aded96d098e1b0e0ba0c4881b432c2", - "reference": "79261cc280aded96d098e1b0e0ba0c4881b432c2", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/b58e5a3933e541dc286cc91fc4f3898bbc6f1623", + "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623", "shasum": "" }, "require": { @@ -1269,7 +1199,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/0.4.1" + "source": "https://github.com/theofidry/cpu-core-counter/tree/0.5.1" }, "funding": [ { @@ -1277,7 +1207,7 @@ "type": "github" } ], - "time": "2022-12-16T22:01:02+00:00" + "time": "2022-12-24T12:35:10+00:00" }, { "name": "laminas/laminas-coding-standard", @@ -1335,18 +1265,103 @@ ], "time": "2023-01-05T15:53:40+00:00" }, + { + "name": "laminas/laminas-diactoros", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-diactoros.git", + "reference": "2515f4134258b1b418c23cb86606b8a09dd01aea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/2515f4134258b1b418c23cb86606b8a09dd01aea", + "reference": "2515f4134258b1b418c23cb86606b8a09dd01aea", + "shasum": "" + }, + "require": { + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", + "psr/http-factory": "^1.0.2", + "psr/http-message": "^1.1 || ^2.0" + }, + "provide": { + "psr/http-factory-implementation": "^1.1 || ^2.0", + "psr/http-message-implementation": "^1.1 || ^2.0" + }, + "require-dev": { + "ext-curl": "*", + "ext-dom": "*", + "ext-gd": "*", + "ext-libxml": "*", + "http-interop/http-factory-tests": "^0.9.0", + "laminas/laminas-coding-standard": "~2.5.0", + "php-http/psr7-integration-tests": "^1.3", + "phpunit/phpunit": "^9.5.28", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.9" + }, + "type": "library", + "extra": { + "laminas": { + "config-provider": "Laminas\\Diactoros\\ConfigProvider", + "module": "Laminas\\Diactoros" + } + }, + "autoload": { + "files": [ + "src/functions/create_uploaded_file.php", + "src/functions/marshal_headers_from_sapi.php", + "src/functions/marshal_method_from_sapi.php", + "src/functions/marshal_protocol_version_from_sapi.php", + "src/functions/normalize_server.php", + "src/functions/normalize_uploaded_files.php", + "src/functions/parse_cookie_header.php" + ], + "psr-4": { + "Laminas\\Diactoros\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "PSR HTTP Message implementations", + "homepage": "https://laminas.dev", + "keywords": [ + "http", + "laminas", + "psr", + "psr-17", + "psr-7" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-diactoros/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-diactoros/issues", + "rss": "https://github.com/laminas/laminas-diactoros/releases.atom", + "source": "https://github.com/laminas/laminas-diactoros" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2023-05-04T21:18:23+00:00" + }, { "name": "myclabs/deep-copy", - "version": "1.11.0", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "shasum": "" }, "require": { @@ -1384,7 +1399,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" }, "funding": [ { @@ -1392,20 +1407,20 @@ "type": "tidelift" } ], - "time": "2022-03-03T13:19:32+00:00" + "time": "2023-03-08T13:26:56+00:00" }, { "name": "netresearch/jsonmapper", - "version": "v4.1.0", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "cfa81ea1d35294d64adb9c68aa4cb9e92400e53f" + "reference": "f60565f8c0566a31acf06884cdaa591867ecc956" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/cfa81ea1d35294d64adb9c68aa4cb9e92400e53f", - "reference": "cfa81ea1d35294d64adb9c68aa4cb9e92400e53f", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/f60565f8c0566a31acf06884cdaa591867ecc956", + "reference": "f60565f8c0566a31acf06884cdaa591867ecc956", "shasum": "" }, "require": { @@ -1441,22 +1456,22 @@ "support": { "email": "cweiske@cweiske.de", "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.1.0" + "source": "https://github.com/cweiske/jsonmapper/tree/v4.2.0" }, - "time": "2022-12-08T20:46:14+00:00" + "time": "2023-04-09T17:37:40+00:00" }, { "name": "nikic/php-parser", - "version": "v4.15.3", + "version": "v4.16.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039" + "reference": "19526a33fb561ef417e822e85f08a00db4059c17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/570e980a201d8ed0236b0a62ddf2c9cbb2034039", - "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", + "reference": "19526a33fb561ef417e822e85f08a00db4059c17", "shasum": "" }, "require": { @@ -1497,9 +1512,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.3" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" }, - "time": "2023-01-16T22:05:37+00:00" + "time": "2023-06-25T14:52:30+00:00" }, { "name": "phar-io/manifest", @@ -1823,44 +1838,44 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.24", + "version": "10.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed" + "reference": "db1497ec8dd382e82c962f7abbe0320e4882ee4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed", - "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/db1497ec8dd382e82c962f7abbe0320e4882ee4e", + "reference": "db1497ec8dd382e82c962f7abbe0320e4882ee4e", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.14", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", + "nikic/php-parser": "^4.15", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-text-template": "^3.0", + "sebastian/code-unit-reverse-lookup": "^3.0", + "sebastian/complexity": "^3.0", + "sebastian/environment": "^6.0", + "sebastian/lines-of-code": "^2.0", + "sebastian/version": "^4.0", "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.1" }, "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "10.1-dev" } }, "autoload": { @@ -1888,7 +1903,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24" + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.2" }, "funding": [ { @@ -1896,32 +1912,32 @@ "type": "github" } ], - "time": "2023-01-26T08:26:55+00:00" + "time": "2023-05-22T09:04:27+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "4.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "5647d65443818959172645e7ed999217360654b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/5647d65443818959172645e7ed999217360654b6", + "reference": "5647d65443818959172645e7ed999217360654b6", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1948,7 +1964,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.0.2" }, "funding": [ { @@ -1956,28 +1973,28 @@ "type": "github" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2023-05-07T09:13:23+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.1.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-pcntl": "*" @@ -1985,7 +2002,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2011,7 +2028,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" }, "funding": [ { @@ -2019,32 +2036,32 @@ "type": "github" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2023-02-03T06:56:09+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/9f3d3709577a527025f55bcf0f7ab8052c8bb37d", + "reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2070,7 +2087,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.0" }, "funding": [ { @@ -2078,32 +2095,32 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2023-02-03T06:56:46+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -2129,7 +2146,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" }, "funding": [ { @@ -2137,24 +2154,23 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2023-02-03T06:57:52+00:00" }, { "name": "phpunit/phpunit", - "version": "9.5.28", + "version": "10.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "954ca3113a03bf780d22f07bf055d883ee04b65e" + "reference": "1ab521b24b88b88310c40c26c0cc4a94ba40ff95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/954ca3113a03bf780d22f07bf055d883ee04b65e", - "reference": "954ca3113a03bf780d22f07bf055d883ee04b65e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1ab521b24b88b88310c40c26c0cc4a94ba40ff95", + "reference": "1ab521b24b88b88310c40c26c0cc4a94ba40ff95", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -2164,27 +2180,26 @@ "myclabs/deep-copy": "^1.10.1", "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.13", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", - "sebastian/version": "^3.0.2" + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.1.1", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-invoker": "^4.0", + "phpunit/php-text-template": "^3.0", + "phpunit/php-timer": "^6.0", + "sebastian/cli-parser": "^2.0", + "sebastian/code-unit": "^2.0", + "sebastian/comparator": "^5.0", + "sebastian/diff": "^5.0", + "sebastian/environment": "^6.0", + "sebastian/exporter": "^5.0", + "sebastian/global-state": "^6.0", + "sebastian/object-enumerator": "^5.0", + "sebastian/recursion-context": "^5.0", + "sebastian/type": "^4.0", + "sebastian/version": "^4.0" }, "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -2192,7 +2207,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.5-dev" + "dev-main": "10.2-dev" } }, "autoload": { @@ -2223,7 +2238,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.28" + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.2.2" }, "funding": [ { @@ -2239,7 +2255,7 @@ "type": "tidelift" } ], - "time": "2023-01-14T12:32:24+00:00" + "time": "2023-06-11T06:15:20+00:00" }, { "name": "psalm/plugin-phpunit", @@ -2353,28 +2369,28 @@ }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae" }, "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/efdc130dbbbb8ef0b545a994fd811725c5282cae", + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -2397,7 +2413,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/2.0.0" }, "funding": [ { @@ -2405,32 +2421,32 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2023-02-03T06:58:15+00:00" }, { "name": "sebastian/code-unit", - "version": "1.0.8", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -2453,7 +2469,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" }, "funding": [ { @@ -2461,32 +2477,32 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2023-02-03T06:58:43+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2508,7 +2524,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" }, "funding": [ { @@ -2516,34 +2532,36 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2023-02-03T06:59:15+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.8", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "72f01e6586e0caf6af81297897bd112eb7e9627c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/72f01e6586e0caf6af81297897bd112eb7e9627c", + "reference": "72f01e6586e0caf6af81297897bd112eb7e9627c", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2582,7 +2600,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.0" }, "funding": [ { @@ -2590,33 +2608,33 @@ "type": "github" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2023-02-03T07:07:16+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/e67d240970c9dc7ea7b2123a6d520e334dd61dc6", + "reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" + "nikic/php-parser": "^4.10", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2639,7 +2657,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/3.0.0" }, "funding": [ { @@ -2647,33 +2665,33 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-02-03T06:59:47+00:00" }, { "name": "sebastian/diff", - "version": "4.0.4", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b", + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3", + "phpunit/phpunit": "^10.0", "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2705,7 +2723,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.0.3" }, "funding": [ { @@ -2713,27 +2732,27 @@ "type": "github" } ], - "time": "2020-10-26T13:10:38+00:00" + "time": "2023-05-01T07:48:21+00:00" }, { "name": "sebastian/environment", - "version": "5.1.4", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/43c751b41d74f96cbbd4e07b7aec9675651e2951", + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-posix": "*" @@ -2741,7 +2760,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -2760,7 +2779,7 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "homepage": "https://github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", @@ -2768,7 +2787,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.0.1" }, "funding": [ { @@ -2776,34 +2796,34 @@ "type": "github" } ], - "time": "2022-04-03T09:37:03+00:00" + "time": "2023-04-11T05:39:26+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0", + "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2845,7 +2865,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/5.0.0" }, "funding": [ { @@ -2853,38 +2873,35 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2023-02-03T07:06:49+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.5", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + "reference": "aab257c712de87b90194febd52e4d184551c2d44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/aab257c712de87b90194febd52e4d184551c2d44", + "reference": "aab257c712de87b90194febd52e4d184551c2d44", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -2909,7 +2926,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.0" }, "funding": [ { @@ -2917,33 +2934,33 @@ "type": "github" } ], - "time": "2022-02-14T08:28:10+00:00" + "time": "2023-02-03T07:07:38+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130" }, "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/17c4d940ecafb3d15d2cf916f4108f664e28b130", + "reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" + "nikic/php-parser": "^4.10", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -2966,7 +2983,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/2.0.0" }, "funding": [ { @@ -2974,34 +2991,34 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-02-03T07:08:02+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -3023,7 +3040,7 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" }, "funding": [ { @@ -3031,32 +3048,32 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2023-02-03T07:08:32+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -3078,7 +3095,7 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" }, "funding": [ { @@ -3086,32 +3103,32 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2023-02-03T07:06:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -3138,65 +3155,10 @@ } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:17:30+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" }, "funding": [ { @@ -3204,32 +3166,32 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2023-02-03T07:05:40+00:00" }, { "name": "sebastian/type", - "version": "3.2.0", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -3252,7 +3214,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" }, "funding": [ { @@ -3260,29 +3222,29 @@ "type": "github" } ], - "time": "2022-09-12T14:47:03+00:00" + "time": "2023-02-03T07:10:45+00:00" }, { "name": "sebastian/version", - "version": "3.0.2", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -3305,7 +3267,7 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" }, "funding": [ { @@ -3313,7 +3275,7 @@ "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2023-02-07T11:34:05+00:00" }, { "name": "slevomat/coding-standard", @@ -3378,26 +3340,25 @@ }, { "name": "spatie/array-to-xml", - "version": "2.17.1", + "version": "3.1.6", "source": { "type": "git", "url": "https://github.com/spatie/array-to-xml.git", - "reference": "5cbec9c6ab17e320c58a259f0cebe88bde4a7c46" + "reference": "e210b98957987c755372465be105d32113f339a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/5cbec9c6ab17e320c58a259f0cebe88bde4a7c46", - "reference": "5cbec9c6ab17e320c58a259f0cebe88bde4a7c46", + "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/e210b98957987c755372465be105d32113f339a4", + "reference": "e210b98957987c755372465be105d32113f339a4", "shasum": "" }, "require": { "ext-dom": "*", - "php": "^7.4|^8.0" + "php": "^8.0" }, "require-dev": { "mockery/mockery": "^1.2", "pestphp/pest": "^1.21", - "phpunit/phpunit": "^9.0", "spatie/pest-plugin-snapshots": "^1.1" }, "type": "library", @@ -3426,7 +3387,7 @@ "xml" ], "support": { - "source": "https://github.com/spatie/array-to-xml/tree/2.17.1" + "source": "https://github.com/spatie/array-to-xml/tree/3.1.6" }, "funding": [ { @@ -3438,20 +3399,20 @@ "type": "github" } ], - "time": "2022-12-26T08:22:07+00:00" + "time": "2023-05-11T14:04:07+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.7.1", + "version": "3.7.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", "shasum": "" }, "require": { @@ -3487,33 +3448,35 @@ "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", "keywords": [ "phpcs", - "standards" + "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" }, - "time": "2022-06-18T07:21:10+00:00" + "time": "2023-02-22T23:07:41+00:00" }, { "name": "symfony/console", - "version": "v6.0.19", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed" + "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c3ebc83d031b71c39da318ca8b7a07ecc67507ed", - "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed", + "url": "https://api.github.com/repos/symfony/console/zipball/8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7", + "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", - "symfony/service-contracts": "^1.1|^2|^3", + "symfony/service-contracts": "^2.5|^3", "symfony/string": "^5.4|^6.0" }, "conflict": { @@ -3535,12 +3498,6 @@ "symfony/process": "^5.4|^6.0", "symfony/var-dumper": "^5.4|^6.0" }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, "type": "library", "autoload": { "psr-4": { @@ -3568,12 +3525,79 @@ "homepage": "https://symfony.com", "keywords": [ "cli", - "command line", + "command-line", "console", "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.0.19" + "source": "https://github.com/symfony/console/tree/v6.3.0" + }, + "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": "2023-05-29T12:49:39+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" }, "funding": [ { @@ -3589,24 +3613,24 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:36:10+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/filesystem", - "version": "v6.0.19", + "version": "v6.3.1", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214" + "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/3d49eec03fda1f0fc19b7349fbbe55ebc1004214", - "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, @@ -3636,7 +3660,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.0.19" + "source": "https://github.com/symfony/filesystem/tree/v6.3.1" }, "funding": [ { @@ -3652,7 +3676,7 @@ "type": "tidelift" } ], - "time": "2023-01-20T17:44:14+00:00" + "time": "2023-06-01T08:30:39+00:00" }, { "name": "symfony/polyfill-ctype", @@ -3986,32 +4010,29 @@ }, { "name": "symfony/service-contracts", - "version": "v3.0.2", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66" + "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d78d39c1599bd1188b8e26bb341da52c3c6d8a66", - "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "psr/container": "^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" }, - "suggest": { - "symfony/service-implementation": "" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -4021,7 +4042,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4048,7 +4072,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/service-contracts/tree/v3.3.0" }, "funding": [ { @@ -4064,36 +4088,37 @@ "type": "tidelift" } ], - "time": "2022-05-30T19:17:58+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/string", - "version": "v6.0.19", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a" + "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/d9e72497367c23e08bf94176d2be45b00a9d232a", - "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a", + "url": "https://api.github.com/repos/symfony/string/zipball/f2e190ee75ff0f5eced645ec0be5c66fac81f51f", + "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": "<2.0" + "symfony/translation-contracts": "<2.5" }, "require-dev": { "symfony/error-handler": "^5.4|^6.0", "symfony/http-client": "^5.4|^6.0", - "symfony/translation-contracts": "^2.0|^3.0", + "symfony/intl": "^6.2", + "symfony/translation-contracts": "^2.5|^3.0", "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", @@ -4133,7 +4158,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.0.19" + "source": "https://github.com/symfony/string/tree/v6.3.0" }, "funding": [ { @@ -4149,7 +4174,7 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:36:10+00:00" + "time": "2023-03-21T21:06:29+00:00" }, { "name": "theseer/tokenizer", @@ -4203,22 +4228,22 @@ }, { "name": "vimeo/psalm", - "version": "5.6.0", + "version": "5.13.1", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "e784128902dfe01d489c4123d69918a9f3c1eac5" + "reference": "086b94371304750d1c673315321a55d15fc59015" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/e784128902dfe01d489c4123d69918a9f3c1eac5", - "reference": "e784128902dfe01d489c4123d69918a9f3c1eac5", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/086b94371304750d1c673315321a55d15fc59015", + "reference": "086b94371304750d1c673315321a55d15fc59015", "shasum": "" }, "require": { "amphp/amp": "^2.4.2", "amphp/byte-stream": "^1.5", - "composer/package-versions-deprecated": "^1.10.0", + "composer-runtime-api": "^2", "composer/semver": "^1.4 || ^2.0 || ^3.0", "composer/xdebug-handler": "^2.0 || ^3.0", "dnoegel/php-xdg-base-dir": "^0.1.1", @@ -4231,12 +4256,12 @@ "ext-tokenizer": "*", "felixfbecker/advanced-json-rpc": "^3.1", "felixfbecker/language-server-protocol": "^1.5.2", - "fidry/cpu-core-counter": "^0.4.0", + "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1", "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "nikic/php-parser": "^4.13", + "nikic/php-parser": "^4.14", "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0", "sebastian/diff": "^4.0 || ^5.0", - "spatie/array-to-xml": "^2.17.0", + "spatie/array-to-xml": "^2.17.0 || ^3.0", "symfony/console": "^4.1.6 || ^5.0 || ^6.0", "symfony/filesystem": "^5.4 || ^6.0" }, @@ -4244,14 +4269,15 @@ "psalm/psalm": "self.version" }, "require-dev": { + "amphp/phpunit-util": "^2.0", "bamarni/composer-bin-plugin": "^1.4", - "brianium/paratest": "^6.0", + "brianium/paratest": "^6.9", "ext-curl": "*", "mockery/mockery": "^1.5", "nunomaduro/mock-final-classes": "^1.1", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/phpdoc-parser": "^1.6", - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^9.6", "psalm/plugin-mockery": "^1.1", "psalm/plugin-phpunit": "^0.18", "slevomat/coding-standard": "^8.4", @@ -4297,34 +4323,35 @@ "keywords": [ "code", "inspection", - "php" + "php", + "static analysis" ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/5.6.0" + "source": "https://github.com/vimeo/psalm/tree/5.13.1" }, - "time": "2023-01-23T20:32:47+00:00" + "time": "2023-06-27T16:39:49+00:00" }, { "name": "webimpress/coding-standard", - "version": "1.2.4", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/webimpress/coding-standard.git", - "reference": "cd0c4b0b97440c337c1f7da17b524674ca2f9ca9" + "reference": "b26557e2386711ecb74f22718f4b4bde5ddbc899" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/cd0c4b0b97440c337c1f7da17b524674ca2f9ca9", - "reference": "cd0c4b0b97440c337c1f7da17b524674ca2f9ca9", + "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/b26557e2386711ecb74f22718f4b4bde5ddbc899", + "reference": "b26557e2386711ecb74f22718f4b4bde5ddbc899", "shasum": "" }, "require": { "php": "^7.3 || ^8.0", - "squizlabs/php_codesniffer": "^3.6.2" + "squizlabs/php_codesniffer": "^3.7.2" }, "require-dev": { - "phpunit/phpunit": "^9.5.13" + "phpunit/phpunit": "^9.6.4" }, "type": "phpcodesniffer-standard", "extra": { @@ -4350,7 +4377,7 @@ ], "support": { "issues": "https://github.com/webimpress/coding-standard/issues", - "source": "https://github.com/webimpress/coding-standard/tree/1.2.4" + "source": "https://github.com/webimpress/coding-standard/tree/1.3.1" }, "funding": [ { @@ -4358,7 +4385,7 @@ "type": "github" } ], - "time": "2022-02-15T19:52:12+00:00" + "time": "2023-03-09T15:05:18+00:00" } ], "aliases": [], @@ -4367,11 +4394,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + "php": "~8.1.0 || ~8.2.0" }, "platform-dev": [], "platform-overrides": { - "php": "8.0.99" + "php": "8.1.99" }, "plugin-api-version": "2.3.0" } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 02cb73f..eb4d8f6 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,18 +1,27 @@ - - - - src - - - + ./test + + + src + + diff --git a/test/AbstractFactoryTest.php b/test/AbstractFactoryTest.php deleted file mode 100644 index a3a61b1..0000000 --- a/test/AbstractFactoryTest.php +++ /dev/null @@ -1,97 +0,0 @@ -> - */ - abstract protected function dependencies(): array; - - /** - * @psalm-return callable(ContainerInterface $container):object - */ - abstract protected function factory(): callable; - - protected function setUp(): void - { - parent::setUp(); - $this->factory = $this->factory(); - $this->container = $this->createMock(ContainerInterface::class); - $this->setupContainer($this->container); - } - - /** - * @psalm-param ContainerInterface&MockObject $container - */ - private function setupContainer(MockObject $container): void - { - $dependencies = $this->dependencies(); - if (! $dependencies) { - return; - } - - $consecutiveParameters = $consecutiveReturnValues = []; - foreach ($dependencies as $dependency => $definition) { - $consecutiveParameters[] = [$dependency]; - $consecutiveReturnValues[] = $this->createReturnValueFromDefinition($definition); - } - - $container - ->expects($this->any()) - ->method('get') - ->withConsecutive(...$consecutiveParameters) - ->willReturnOnConsecutiveCalls(...$consecutiveReturnValues); - } - - public function testInstantiation(): void - { - $factory = $this->factory; - $instance = $factory($this->container); - $this->postCreationAssertions($instance); - } - - /** - * @psalm-param class-string|array|object $definition - * @psalm-return array|object - */ - private function createReturnValueFromDefinition($definition) - { - if (is_string($definition)) { - return $this->createMock($definition); - } - - if (is_object($definition)) { - return $definition; - } - - return $definition; - } - - /** - * Implement this for post creation assertions. - * - * @param mixed $instance - */ - abstract protected function postCreationAssertions($instance): void; -} diff --git a/test/AbstractFactoryTestCase.php b/test/AbstractFactoryTestCase.php new file mode 100644 index 0000000..713661b --- /dev/null +++ b/test/AbstractFactoryTestCase.php @@ -0,0 +1,50 @@ + + */ + abstract protected function dependencies(): array; + + /** + * @psalm-return callable(ContainerInterface $container):object + */ + abstract protected function factory(): callable; + + protected function setUp(): void + { + parent::setUp(); + $this->container = new InMemoryContainer(); + $this->setupContainer($this->container); + } + + private function setupContainer(InMemoryContainer $container): void + { + /** @psalm-var mixed $service */ + foreach ($this->dependencies() as $dependency => $service) { + $container->set($dependency, $service); + } + } + + public function testInstantiation(): void + { + $factory = $this->factory(); + $instance = $factory($this->container); + $this->postCreationAssertions($instance); + } + + /** + * Implement this for post creation assertions. + */ + abstract protected function postCreationAssertions(mixed $instance): void; +} diff --git a/test/Configuration/ProjectConfigurationFactoryTest.php b/test/Configuration/ProjectConfigurationFactoryTest.php index 0850028..0f49bc3 100644 --- a/test/Configuration/ProjectConfigurationFactoryTest.php +++ b/test/Configuration/ProjectConfigurationFactoryTest.php @@ -7,9 +7,9 @@ use Mezzio\Cors\Configuration\ConfigurationInterface; use Mezzio\Cors\Configuration\ProjectConfiguration; use Mezzio\Cors\Configuration\ProjectConfigurationFactory; -use Mezzio\CorsTest\AbstractFactoryTest; +use Mezzio\CorsTest\AbstractFactoryTestCase; -final class ProjectConfigurationFactoryTest extends AbstractFactoryTest +final class ProjectConfigurationFactoryTest extends AbstractFactoryTestCase { protected function dependencies(): array { @@ -23,10 +23,7 @@ protected function factory(): callable return new ProjectConfigurationFactory(); } - /** - * @param mixed $instance - */ - protected function postCreationAssertions($instance): void + protected function postCreationAssertions(mixed $instance): void { $this->assertInstanceOf(ProjectConfiguration::class, $instance); $this->assertEquals(['X-Foo'], $instance->exposedHeaders()); diff --git a/test/Configuration/RouteConfigurationFactoryFactoryTest.php b/test/Configuration/RouteConfigurationFactoryFactoryTest.php index a8a0fa4..edf0c1b 100644 --- a/test/Configuration/RouteConfigurationFactoryFactoryTest.php +++ b/test/Configuration/RouteConfigurationFactoryFactoryTest.php @@ -6,9 +6,9 @@ use Mezzio\Cors\Configuration\RouteConfigurationFactory; use Mezzio\Cors\Configuration\RouteConfigurationFactoryFactory; -use Mezzio\CorsTest\AbstractFactoryTest; +use Mezzio\CorsTest\AbstractFactoryTestCase; -final class RouteConfigurationFactoryFactoryTest extends AbstractFactoryTest +final class RouteConfigurationFactoryFactoryTest extends AbstractFactoryTestCase { protected function dependencies(): array { @@ -20,10 +20,7 @@ protected function factory(): callable return new RouteConfigurationFactoryFactory(); } - /** - * @param mixed $instance - */ - protected function postCreationAssertions($instance): void + protected function postCreationAssertions(mixed $instance): void { $this->assertInstanceOf(RouteConfigurationFactory::class, $instance); } diff --git a/test/InMemoryContainer.php b/test/InMemoryContainer.php new file mode 100644 index 0000000..b5ee15e --- /dev/null +++ b/test/InMemoryContainer.php @@ -0,0 +1,39 @@ + */ + private array $services = []; + + /** @param string $id */ + public function get($id): mixed + { + if (! $this->has($id)) { + throw new class ($id . ' was not found') extends RuntimeException implements NotFoundExceptionInterface { + }; + } + + return $this->services[$id]; + } + + /** @param string $id */ + public function has($id): bool + { + return array_key_exists($id, $this->services); + } + + public function set(string $id, mixed $item): void + { + $this->services[$id] = $item; + } +} diff --git a/test/Middleware/CorsMiddlewareFactoryTest.php b/test/Middleware/CorsMiddlewareFactoryTest.php index c2c9b82..32c88b8 100644 --- a/test/Middleware/CorsMiddlewareFactoryTest.php +++ b/test/Middleware/CorsMiddlewareFactoryTest.php @@ -9,16 +9,16 @@ use Mezzio\Cors\Service\ConfigurationLocatorInterface; use Mezzio\Cors\Service\CorsInterface; use Mezzio\Cors\Service\ResponseFactoryInterface; -use Mezzio\CorsTest\AbstractFactoryTest; +use Mezzio\CorsTest\AbstractFactoryTestCase; -final class CorsMiddlewareFactoryTest extends AbstractFactoryTest +final class CorsMiddlewareFactoryTest extends AbstractFactoryTestCase { protected function dependencies(): array { return [ - CorsInterface::class => CorsInterface::class, - ConfigurationLocatorInterface::class => ConfigurationLocatorInterface::class, - ResponseFactoryInterface::class => ResponseFactoryInterface::class, + CorsInterface::class => $this->createMock(CorsInterface::class), + ConfigurationLocatorInterface::class => $this->createMock(ConfigurationLocatorInterface::class), + ResponseFactoryInterface::class => $this->createMock(ResponseFactoryInterface::class), ]; } @@ -27,10 +27,7 @@ protected function factory(): callable return new CorsMiddlewareFactory(); } - /** - * @param mixed $instance - */ - protected function postCreationAssertions($instance): void + protected function postCreationAssertions(mixed $instance): void { $this->assertInstanceOf(CorsMiddleware::class, $instance); } diff --git a/test/Middleware/CorsMiddlewareTest.php b/test/Middleware/CorsMiddlewareTest.php index 931d7b6..57113ac 100644 --- a/test/Middleware/CorsMiddlewareTest.php +++ b/test/Middleware/CorsMiddlewareTest.php @@ -37,7 +37,7 @@ final class CorsMiddlewareTest extends TestCase /** * @psalm-return array */ - public function varyHeaderProvider(): array + public static function varyHeaderProvider(): array { return [ 'just origin' => [ diff --git a/test/Service/ConfigurationLocatorFactoryTest.php b/test/Service/ConfigurationLocatorFactoryTest.php index 122a5df..7918885 100644 --- a/test/Service/ConfigurationLocatorFactoryTest.php +++ b/test/Service/ConfigurationLocatorFactoryTest.php @@ -8,19 +8,19 @@ use Mezzio\Cors\Configuration\RouteConfigurationFactoryInterface; use Mezzio\Cors\Service\ConfigurationLocator; use Mezzio\Cors\Service\ConfigurationLocatorFactory; -use Mezzio\CorsTest\AbstractFactoryTest; +use Mezzio\CorsTest\AbstractFactoryTestCase; use Mezzio\Router\RouterInterface; use Psr\Http\Message\ServerRequestFactoryInterface; -final class ConfigurationLocatorFactoryTest extends AbstractFactoryTest +final class ConfigurationLocatorFactoryTest extends AbstractFactoryTestCase { protected function dependencies(): array { return [ - ConfigurationInterface::class => ConfigurationInterface::class, - ServerRequestFactoryInterface::class => ServerRequestFactoryInterface::class, - RouterInterface::class => RouterInterface::class, - RouteConfigurationFactoryInterface::class => RouteConfigurationFactoryInterface::class, + ConfigurationInterface::class => $this->createMock(ConfigurationInterface::class), + ServerRequestFactoryInterface::class => $this->createMock(ServerRequestFactoryInterface::class), + RouterInterface::class => $this->createMock(RouterInterface::class), + RouteConfigurationFactoryInterface::class => $this->createMock(RouteConfigurationFactoryInterface::class), ]; } @@ -29,10 +29,7 @@ protected function factory(): callable return new ConfigurationLocatorFactory(); } - /** - * @param mixed $instance - */ - protected function postCreationAssertions($instance): void + protected function postCreationAssertions(mixed $instance): void { $this->assertInstanceOf(ConfigurationLocator::class, $instance); } diff --git a/test/Service/ConfigurationLocatorTest.php b/test/Service/ConfigurationLocatorTest.php index 0bacd78..af7496f 100644 --- a/test/Service/ConfigurationLocatorTest.php +++ b/test/Service/ConfigurationLocatorTest.php @@ -18,33 +18,17 @@ use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\UriInterface; -use function array_diff; use function array_fill; use function count; +use function in_array; final class ConfigurationLocatorTest extends TestCase { private ConfigurationLocator $locator; - - /** - * @psalm-var MockObject&ConfigurationInterface - */ - private ConfigurationInterface $projectConfiguration; - - /** - * @psalm-var MockObject&ServerRequestFactoryInterface - */ - private ServerRequestFactoryInterface $requestFactory; - - /** - * @psalm-var MockObject&RouterInterface - */ - private RouterInterface $router; - - /** - * @psalm-var MockObject&RouteConfigurationFactoryInterface - */ - private RouteConfigurationFactoryInterface $routeConfigurationFactory; + private ConfigurationInterface&MockObject $projectConfiguration; + private ServerRequestFactoryInterface&MockObject $requestFactory; + private RouterInterface&MockObject $router; + private RouteConfigurationFactoryInterface&MockObject $routeConfigurationFactory; public function testWontLocateAnyConfigurationIfRouteIsUnknown(): void { @@ -54,37 +38,37 @@ public function testWontLocateAnyConfigurationIfRouteIsUnknown(): void $request = $this->createMock(ServerRequestInterface::class); $this->requestFactory - ->expects($this->any()) + ->expects(self::any()) ->method('createServerRequest') ->willReturn($request); $routeResult = $this->createMock(RouteResult::class); $routeResult - ->expects($this->any()) + ->expects(self::any()) ->method('isFailure') ->willReturn(true); $this->router - ->expects($this->any()) + ->expects(self::any()) ->method('match') ->willReturn($routeResult); $routeConfiguration = $this->createMock(RouteConfigurationInterface::class); $this->routeConfigurationFactory - ->expects($this->once()) + ->expects(self::once()) ->method('__invoke') ->with([]) ->willReturn($routeConfiguration); $routeConfiguration - ->expects($this->once()) + ->expects(self::once()) ->method('mergeWithConfiguration') ->with($this->projectConfiguration) ->willReturn($routeConfiguration); $located = $this->locator->locate($metadata); - $this->assertNull($located); + self::assertNull($located); } public function testWillLocateProjectConfigDueRoutesWithoutConfigWithMergedRouteResultsMethods(): void @@ -95,55 +79,55 @@ public function testWillLocateProjectConfigDueRoutesWithoutConfigWithMergedRoute $request = $this->createMock(ServerRequestInterface::class); $this->requestFactory - ->expects($this->any()) + ->expects(self::any()) ->method('createServerRequest') ->with(RequestMethodInterface::METHOD_GET, $requestUri) ->willReturn($request); $routeResult = $this->createMock(RouteResult::class); $routeResult - ->expects($this->any()) + ->expects(self::any()) ->method('isFailure') ->willReturn(false); $this->router - ->expects($this->any()) + ->expects(self::any()) ->method('match') ->willReturn($routeResult); $allowedMethods = [RequestMethodInterface::METHOD_GET]; $routeResult - ->expects($this->once()) + ->expects(self::once()) ->method('getAllowedMethods') ->willReturn($allowedMethods); $routeConfiguration = $this->createMock(RouteConfigurationInterface::class); $routeConfiguration - ->expects($this->any()) + ->expects(self::any()) ->method('mergeWithConfiguration') ->with($this->projectConfiguration) ->willReturnSelf(); $routeConfiguration - ->expects($this->once()) + ->expects(self::once()) ->method('withRequestMethods') ->with($allowedMethods) ->willReturnSelf(); $this->routeConfigurationFactory - ->expects($this->any()) + ->expects(self::any()) ->method('__invoke') ->willReturn($routeConfiguration); $routeConfiguration - ->expects($this->once()) + ->expects(self::once()) ->method('explicit') ->willReturn(true); $located = $this->locator->locate($metadata); - $this->assertEquals($routeConfiguration, $located); + self::assertEquals($routeConfiguration, $located); } public function testWillHandleRouteThatOverridesProjectConfiguration(): void @@ -155,7 +139,7 @@ public function testWillHandleRouteThatOverridesProjectConfiguration(): void $request = $this->createMock(ServerRequestInterface::class); $this->requestFactory - ->expects($this->once()) + ->expects(self::once()) ->method('createServerRequest') ->with($method, $requestUri) ->willReturn($request); @@ -164,23 +148,23 @@ public function testWillHandleRouteThatOverridesProjectConfiguration(): void $routeResult = $this->createMock(RouteResult::class); $routeResult - ->expects($this->once()) + ->expects(self::once()) ->method('isFailure') ->willReturn(false); $routeResult - ->expects($this->once()) + ->expects(self::once()) ->method('getMatchedParams') ->willReturn([RouteConfigurationInterface::PARAMETER_IDENTIFIER => []]); $routeResult - ->expects($this->once()) + ->expects(self::once()) ->method('getAllowedMethods') ->willReturn([]); $routeConfigurationForProject = $this->createMock(RouteConfigurationInterface::class); $routeConfigurationForProject - ->expects($this->once()) + ->expects(self::once()) ->method('mergeWithConfiguration') ->with($this->projectConfiguration) ->willReturnSelf(); @@ -188,37 +172,37 @@ public function testWillHandleRouteThatOverridesProjectConfiguration(): void $routeConfiguration = $this->createMock(RouteConfigurationInterface::class); $routeConfiguration - ->expects($this->once()) + ->expects(self::once()) ->method('overridesProjectConfiguration') ->willReturn(true); $routeConfiguration - ->expects($this->never()) + ->expects(self::never()) ->method('mergeWithConfiguration'); $routeConfiguration - ->expects($this->once()) + ->expects(self::once()) ->method('withRequestMethods') ->willReturnSelf(); $routeConfiguration - ->expects($this->once()) + ->expects(self::once()) ->method('explicit') ->willReturn(true); $this->routeConfigurationFactory - ->expects($this->any()) + ->expects(self::any()) ->method('__invoke') ->willReturnOnConsecutiveCalls($routeConfigurationForProject, $routeConfiguration); $this->router - ->expects($this->once()) + ->expects(self::once()) ->method('match') ->with($request) ->willReturn($routeResult); $config = $this->locator->locate($metadata); - $this->assertEquals($routeConfiguration, $config); + self::assertEquals($routeConfiguration, $config); } public function testWillMergeFromMultipleMatchingRoutes(): void @@ -228,32 +212,35 @@ public function testWillMergeFromMultipleMatchingRoutes(): void $method = 'GET'; $metadata = new CorsMetadata($originUri, $requestUri, $method); - - $consecutiveParameters = $this->createServerRequestArguments($method, $requestUri); - $request = $this->createMock(ServerRequestInterface::class); + $request = $this->createMock(ServerRequestInterface::class); $this->requestFactory - ->expects($this->any()) + ->expects(self::any()) ->method('createServerRequest') - ->withConsecutive( - ...$consecutiveParameters + ->with( + self::callback(static function (string $method): bool { + self::assertTrue(in_array($method, CorsMetadata::ALLOWED_REQUEST_METHODS, true)); + + return true; + }), + $requestUri, ) ->willReturn($request); $matchingRouteResult = $this->createMock(RouteResult::class); $matchingRouteResult - ->expects($this->any()) + ->expects(self::any()) ->method('isFailure') ->willReturn(false); $matchingRouteResult - ->expects($this->once()) + ->expects(self::once()) ->method('getAllowedMethods') ->willReturn(['OPTIONS', 'HEAD']); $failedRouteResult = $this->createMock(RouteResult::class); $failedRouteResult - ->expects($this->any()) + ->expects(self::any()) ->method('isFailure') ->willReturn(true); @@ -262,22 +249,22 @@ public function testWillMergeFromMultipleMatchingRoutes(): void ]; $matchingRouteResultWithConfiguration = $this->createMock(RouteResult::class); $matchingRouteResultWithConfiguration - ->expects($this->any()) + ->expects(self::any()) ->method('isFailure') ->willReturn(false); $matchingRouteResultWithConfiguration - ->expects($this->once()) + ->expects(self::once()) ->method('getAllowedMethods') ->willReturn(['POST']); $matchingRouteResultWithConfiguration - ->expects($this->once()) + ->expects(self::once()) ->method('getMatchedParams') ->willReturn($routeConfigurationParameters); $this->router - ->expects($this->any()) + ->expects(self::any()) ->method('match') ->with($request) ->willReturnOnConsecutiveCalls( @@ -289,46 +276,31 @@ public function testWillMergeFromMultipleMatchingRoutes(): void $routeConfiguration = $this->createMock(RouteConfigurationInterface::class); $routeConfiguration - ->expects($this->any()) + ->expects(self::any()) ->method('withRequestMethods') - ->withConsecutive( - [ + ->with(self::callback(static function (array $argument): bool { + $expectedArguments = [ ['OPTIONS', 'HEAD'], - ], - [ ['POST'], - ] - ) + ]; + self::assertContains($argument, $expectedArguments); + + return true; + })) ->willReturnSelf(); $routeConfiguration - ->expects($this->any()) + ->expects(self::any()) ->method('mergeWithConfiguration') ->willReturnSelf(); $this->routeConfigurationFactory - ->expects($this->any()) + ->expects(self::any()) ->method('__invoke') ->willReturn($routeConfiguration); $locatedConfiguration = $this->locator->locate($metadata); - $this->assertSame($routeConfiguration, $locatedConfiguration); - } - - /** - * @psalm-return list> - */ - private function createServerRequestArguments(string $initialRequestMethod, UriInterface $requestUri): array - { - $initialArgument = [$initialRequestMethod, $requestUri]; - $otherRequestMethods = array_diff(CorsMetadata::ALLOWED_REQUEST_METHODS, [$initialRequestMethod]); - - $consecutiveArguments = []; - foreach ($otherRequestMethods as $requestMethod) { - $consecutiveArguments[] = [$requestMethod, $requestUri]; - } - - return [...[$initialArgument], ...$consecutiveArguments]; + self::assertSame($routeConfiguration, $locatedConfiguration); } public function testWillEarlyReturnExplicitRouteConfiguration(): void @@ -341,13 +313,13 @@ public function testWillEarlyReturnExplicitRouteConfiguration(): void $failedRouteResult = $this->createMock(RouteResult::class); $failedRouteResult - ->expects($this->any()) + ->expects(self::any()) ->method('isFailure') ->willReturn(true); $matchingExplicitRouteResult = $this->createMock(RouteResult::class); $matchingExplicitRouteResult - ->expects($this->any()) + ->expects(self::any()) ->method('isFailure') ->willReturn(false); @@ -358,46 +330,46 @@ public function testWillEarlyReturnExplicitRouteConfiguration(): void ]; $matchingExplicitRouteResult - ->expects($this->once()) + ->expects(self::once()) ->method('getMatchedParams') ->willReturn($routeConfigurationParameters); $matchingExplicitRouteResult - ->expects($this->once()) + ->expects(self::once()) ->method('getAllowedMethods') ->willReturn(['POST']); $routeConfiguration = $this->createMock(RouteConfigurationInterface::class); $routeConfiguration - ->expects($this->any()) + ->expects(self::any()) ->method('mergeWithConfiguration') ->willReturnSelf(); $routeConfiguration - ->expects($this->once()) + ->expects(self::once()) ->method('withRequestMethods') ->with(['POST']) ->willReturnSelf(); $this->routeConfigurationFactory - ->expects($this->any()) + ->expects(self::any()) ->method('__invoke') - ->withConsecutive([], $routeConfigurationParameters) + ->with(self::isType('array')) ->willReturn($routeConfiguration); $routeConfiguration - ->expects($this->any()) + ->expects(self::any()) ->method('explicit') ->willReturn(true); $this ->router - ->expects($this->any()) + ->expects(self::any()) ->method('match') ->willReturnOnConsecutiveCalls($failedRouteResult, $matchingExplicitRouteResult); $locatedConfiguration = $this->locator->locate($metadata); - $this->assertSame($routeConfiguration, $locatedConfiguration); + self::assertSame($routeConfiguration, $locatedConfiguration); } protected function setUp(): void diff --git a/test/Service/CorsFactoryTest.php b/test/Service/CorsFactoryTest.php index 240d5b3..b515d96 100644 --- a/test/Service/CorsFactoryTest.php +++ b/test/Service/CorsFactoryTest.php @@ -6,15 +6,15 @@ use Mezzio\Cors\Service\Cors; use Mezzio\Cors\Service\CorsFactory; -use Mezzio\CorsTest\AbstractFactoryTest; +use Mezzio\CorsTest\AbstractFactoryTestCase; use Psr\Http\Message\UriFactoryInterface; -final class CorsFactoryTest extends AbstractFactoryTest +final class CorsFactoryTest extends AbstractFactoryTestCase { protected function dependencies(): array { return [ - UriFactoryInterface::class => UriFactoryInterface::class, + UriFactoryInterface::class => $this->createMock(UriFactoryInterface::class), ]; } @@ -23,10 +23,7 @@ protected function factory(): callable return new CorsFactory(); } - /** - * @param mixed $instance - */ - protected function postCreationAssertions($instance): void + protected function postCreationAssertions(mixed $instance): void { $this->assertInstanceOf(Cors::class, $instance); } diff --git a/test/Service/CorsMetadataTest.php b/test/Service/CorsMetadataTest.php index 08cca81..eb3fa1c 100644 --- a/test/Service/CorsMetadataTest.php +++ b/test/Service/CorsMetadataTest.php @@ -6,6 +6,7 @@ use Fig\Http\Message\RequestMethodInterface; use Generator; +use Laminas\Diactoros\Uri; use Mezzio\Cors\Configuration\ConfigurationInterface; use Mezzio\Cors\Service\CorsMetadata; use PHPUnit\Framework\TestCase; @@ -42,35 +43,20 @@ public function testAllowsOrigin(UriInterface $origin, array $allowedOrigins): v /** * @psalm-return Generator}> */ - public function allowedOrigins(): Generator + public static function allowedOrigins(): Generator { - $exampleUriWithSubdomain = $this->createMock(UriInterface::class); - $exampleUriWithSubdomain - ->method('__toString') - ->willReturn('https://www.example.com'); - yield 'documentation example with subdomain' => [ - $exampleUriWithSubdomain, + new Uri('https://www.example.com'), self::DOCUMENTATION_ALLOWED_ORIGINS, ]; - $exampleUriWithSubSubdomain = $this->createMock(UriInterface::class); - $exampleUriWithSubSubdomain - ->method('__toString') - ->willReturn('https://subsubdomain.www.example.com'); - yield 'documentation example with sub subdomain' => [ - $exampleUriWithSubSubdomain, + new Uri('https://subsubdomain.www.example.com'), self::DOCUMENTATION_ALLOWED_ORIGINS, ]; - $exampleUriWithoutSubdomain = $this->createMock(UriInterface::class); - $exampleUriWithoutSubdomain - ->method('__toString') - ->willReturn('https://example.com'); - yield 'documentation example without subdomain' => [ - $exampleUriWithoutSubdomain, + new Uri('https://example.com'), self::DOCUMENTATION_ALLOWED_ORIGINS, ]; } diff --git a/test/Service/CorsTest.php b/test/Service/CorsTest.php index 85add28..6226a80 100644 --- a/test/Service/CorsTest.php +++ b/test/Service/CorsTest.php @@ -6,6 +6,8 @@ use Generator; use InvalidArgumentException; +use Laminas\Diactoros\ServerRequest; +use Laminas\Diactoros\Uri; use Mezzio\Cors\Exception\InvalidOriginValueException; use Mezzio\Cors\Service\Cors; use PHPUnit\Framework\MockObject\MockObject; @@ -18,11 +20,7 @@ final class CorsTest extends TestCase { - /** - * @psalm-var MockObject&UriFactoryInterface - */ - private $uriFactory; - + private UriFactoryInterface&MockObject $uriFactory; private Cors $cors; /** @@ -40,12 +38,12 @@ public function testWillDetectIfARequestIsACrossOriginRequest(string $scheme, st $request = $this->createMock(ServerRequestInterface::class); $request - ->expects($this->once()) + ->expects(self::once()) ->method('getUri') ->willReturn($requestUri); $request - ->expects($this->once()) + ->expects(self::once()) ->method('getHeaderLine') ->with('Origin') ->willReturn($origin); @@ -54,12 +52,12 @@ public function testWillDetectIfARequestIsACrossOriginRequest(string $scheme, st $this->applyUriInterfaceMethodAssertions($originUri, $scheme, $host, $port); $this->uriFactory - ->expects($this->once()) + ->expects(self::once()) ->method('createUri') ->with($origin) ->willReturn($originUri); - $this->assertTrue($this->cors->isCorsRequest($request)); + self::assertTrue($this->cors->isCorsRequest($request)); } /** @@ -72,17 +70,17 @@ private function applyUriInterfaceMethodAssertions( ?int $port ): void { $uri - ->expects($this->once()) + ->expects(self::once()) ->method('getScheme') ->willReturn($scheme); $uri - ->expects($this->once()) + ->expects(self::once()) ->method('getHost') ->willReturn($host); $uri - ->expects($this->once()) + ->expects(self::once()) ->method('getPort') ->willReturn($port); } @@ -93,12 +91,12 @@ public function testWontDetectRequestAsCrossOriginIfNoOriginHeaderIsPresent(): v { $request = $this->createMock(ServerRequestInterface::class); $request - ->expects($this->once()) + ->expects(self::once()) ->method('getHeaderLine') ->with('Origin') ->willReturn(''); - $this->assertFalse($this->cors->isCorsRequest($request)); + self::assertFalse($this->cors->isCorsRequest($request)); } // phpcs:disable Generic.Files.LineLength.TooLong @@ -109,12 +107,12 @@ public function testWillThrowInvalidOriginValueExceptionIfOriginContainsValueWhi $request = $this->createMock(ServerRequestInterface::class); $request - ->expects($this->once()) + ->expects(self::once()) ->method('getHeaderLine') ->willReturn('foo'); $this->uriFactory - ->expects($this->once()) + ->expects(self::once()) ->method('createUri') ->with('foo') ->willThrowException(new InvalidArgumentException('Whatever')); @@ -128,12 +126,12 @@ public function testWillThrowInvalidOriginValueExceptionIfOriginContainsValueWhi $request = $this->createMock(ServerRequestInterface::class); $request - ->expects($this->once()) + ->expects(self::once()) ->method('getHeaderLine') ->willReturn('foo'); $this->uriFactory - ->expects($this->once()) + ->expects(self::once()) ->method('createUri') ->with('foo') ->willThrowException(new InvalidArgumentException('Whatever')); @@ -144,7 +142,7 @@ public function testWillThrowInvalidOriginValueExceptionIfOriginContainsValueWhi /** * @psalm-return Generator */ - public function crossOriginProvider(): Generator + public static function crossOriginProvider(): Generator { yield 'secured' => [ 'https', @@ -175,110 +173,80 @@ public function testWillDetectPreflightRequest(): void $this->applyUriInterfaceMethodAssertions($originUri, 'http', 'bar', null); $request - ->expects($this->once()) + ->expects(self::once()) ->method('getHeaderLine') ->willReturn('baz'); $this->uriFactory - ->expects($this->once()) + ->expects(self::once()) ->method('createUri') ->with('baz') ->willReturn($originUri); $request - ->expects($this->once()) + ->expects(self::once()) ->method('getUri') ->willReturn($requestUri); $request - ->expects($this->once()) + ->expects(self::once()) ->method('getMethod') ->willReturn('options'); $request - ->expects($this->once()) + ->expects(self::once()) ->method('hasHeader') ->with('Access-Control-Request-Method') ->willReturn(true); - $this->assertTrue($this->cors->isPreflightRequest($request)); + self::assertTrue($this->cors->isPreflightRequest($request)); } public function testWillCreateMetadataForPreflightRequest(): void { - $requestUri = $this->createMock(UriInterface::class); - $requestUri - ->expects($this->never()) - ->method($this->anything()); - $originUri = $this->createMock(UriInterface::class); - $originUri - ->expects($this->never()) - ->method($this->anything()); + $requestUri = new Uri('https://request.example.com'); + $originUri = new Uri('https://origin.example.com'); - $request = $this->createMock(ServerRequestInterface::class); - $request - ->expects($this->any()) - ->method('getHeaderLine') - ->withConsecutive(['Origin'], ['Access-Control-Request-Method']) - ->willReturnOnConsecutiveCalls('foo', 'get'); + $request = (new ServerRequest()) + ->withUri($requestUri) + ->withAddedHeader('Origin', 'foo') + ->withAddedHeader('Access-Control-Request-Method', 'GET'); $this->uriFactory - ->expects($this->once()) + ->expects(self::once()) ->method('createUri') ->with('foo') ->willReturn($originUri); - $request - ->expects($this->once()) - ->method('getUri') - ->willReturn($requestUri); - $metadata = $this->cors->metadata($request); - $this->assertEquals($originUri, $metadata->origin); - $this->assertEquals($requestUri, $metadata->requestedUri); - $this->assertEquals('GET', $metadata->requestedMethod); + self::assertEquals($originUri, $metadata->origin); + self::assertEquals($requestUri, $metadata->requestedUri); + self::assertEquals('GET', $metadata->requestedMethod); } public function testWillCreateMetadataForCorsRequest(): void { - $requestUri = $this->createMock(UriInterface::class); - $requestUri - ->expects($this->never()) - ->method($this->anything()); - $originUri = $this->createMock(UriInterface::class); - $originUri - ->expects($this->never()) - ->method($this->anything()); - - $request = $this->createMock(ServerRequestInterface::class); - $request - ->expects($this->any()) - ->method('getHeaderLine') - ->withConsecutive(['Origin'], ['Access-Control-Request-Method']) - ->willReturnOnConsecutiveCalls('foo', ''); + $requestUri = new Uri('https://request.example.com'); + $originUri = new Uri('https://origin.example.com'); - $request - ->expects($this->once()) - ->method('getMethod') - ->willReturn('get'); + $request = (new ServerRequest()) + ->withUri($requestUri) + ->withMethod('GET') + ->withAddedHeader('Origin', 'foo') + ->withAddedHeader('Access-Control-Request-Method', ''); $this->uriFactory - ->expects($this->once()) + ->expects(self::once()) ->method('createUri') ->with('foo') ->willReturn($originUri); - $request - ->expects($this->once()) - ->method('getUri') - ->willReturn($requestUri); - $metadata = $this->cors->metadata($request); - $this->assertEquals($originUri, $metadata->origin); - $this->assertEquals($requestUri, $metadata->requestedUri); - $this->assertEquals('GET', $metadata->requestedMethod); + self::assertEquals($originUri, $metadata->origin); + self::assertEquals($requestUri, $metadata->requestedUri); + self::assertEquals('GET', $metadata->requestedMethod); } protected function setUp(): void diff --git a/test/Service/ResponseFactoryFactoryTest.php b/test/Service/ResponseFactoryFactoryTest.php index 818dbe4..532a508 100644 --- a/test/Service/ResponseFactoryFactoryTest.php +++ b/test/Service/ResponseFactoryFactoryTest.php @@ -6,15 +6,15 @@ use Mezzio\Cors\Service\ResponseFactory; use Mezzio\Cors\Service\ResponseFactoryFactory; -use Mezzio\CorsTest\AbstractFactoryTest; +use Mezzio\CorsTest\AbstractFactoryTestCase; use Psr\Http\Message\ResponseFactoryInterface; -final class ResponseFactoryFactoryTest extends AbstractFactoryTest +final class ResponseFactoryFactoryTest extends AbstractFactoryTestCase { protected function dependencies(): array { return [ - ResponseFactoryInterface::class => ResponseFactoryInterface::class, + ResponseFactoryInterface::class => $this->createMock(ResponseFactoryInterface::class), ]; } @@ -23,10 +23,7 @@ protected function factory(): callable return new ResponseFactoryFactory(); } - /** - * @param mixed $instance - */ - protected function postCreationAssertions($instance): void + protected function postCreationAssertions(mixed $instance): void { $this->assertInstanceOf(ResponseFactory::class, $instance); } diff --git a/test/Service/ResponseFactoryTest.php b/test/Service/ResponseFactoryTest.php index a135015..8cc2f86 100644 --- a/test/Service/ResponseFactoryTest.php +++ b/test/Service/ResponseFactoryTest.php @@ -4,6 +4,7 @@ namespace Mezzio\CorsTest\Service; +use Laminas\Diactoros\Response\TextResponse; use Mezzio\Cors\Configuration\ConfigurationInterface; use Mezzio\Cors\Service\ResponseFactory; use PHPUnit\Framework\MockObject\MockObject; @@ -16,11 +17,7 @@ final class ResponseFactoryTest extends TestCase { private ResponseFactory $responseFactory; - - /** - * @psalm-var MockObject&ResponseFactoryInterface - */ - private MockObject $psrResponseFactory; + private ResponseFactoryInterface&MockObject $psrResponseFactory; protected function setUp(): void { @@ -34,10 +31,10 @@ public function testWillApplyExpectedHeadersToPreflightResponseWithoutCredential $origin = 'http://www.example.org'; $configuration = $this->createMock(ConfigurationInterface::class); - $response = $this->createMock(ResponseInterface::class); + $response = new TextResponse(''); $this->psrResponseFactory - ->expects($this->once()) + ->expects(self::once()) ->method('createResponse') ->with(204, 'CORS Details') ->willReturn($response); @@ -46,39 +43,45 @@ public function testWillApplyExpectedHeadersToPreflightResponseWithoutCredential $headers = ['X-Foo-Bar', 'X-Bar-Baz']; $configuration - ->expects($this->once()) + ->expects(self::once()) ->method('allowedMethods') ->willReturn($methods); $configuration - ->expects($this->once()) + ->expects(self::once()) ->method('allowedHeaders') ->willReturn($headers); $configuration - ->expects($this->once()) + ->expects(self::once()) ->method('allowedMaxAge') ->willReturn('0'); $configuration - ->expects($this->once()) + ->expects(self::once()) ->method('credentialsAllowed') ->willReturn(false); - $response - ->expects($this->any()) - ->method('withAddedHeader') - ->withConsecutive( - ['Content-Length', 0], - ['Access-Control-Allow-Origin', $origin], - ['Access-Control-Allow-Methods', implode(', ', $methods)], - ['Access-Control-Allow-Headers', implode(', ', $headers)], - ['Access-Control-Max-Age', 0], - ) - ->willReturnSelf(); - $responseFromFactory = $this->responseFactory->preflight($origin, $configuration); - $this->assertEquals($response, $responseFromFactory); + + self::assertNotSame($response, $responseFromFactory); + self::assertEquals('0', $responseFromFactory->getHeader('Content-Length')[0] ?? null); + self::assertEquals($origin, $responseFromFactory->getHeader('Access-Control-Allow-Origin')[0] ?? null); + $expectAllowMethods = implode(', ', $methods); + self::assertEquals( + $expectAllowMethods, + $responseFromFactory->getHeader('Access-Control-Allow-Methods')[0] ?? null, + ); + + $expectAllowHeaders = implode(', ', $headers); + self::assertEquals( + $expectAllowHeaders, + $responseFromFactory->getHeader('Access-Control-Allow-Headers')[0] ?? null, + ); + self::assertEquals( + '0', + $responseFromFactory->getHeader('Access-Control-Max-Age')[0] ?? null, + ); } public function testWillApplyExpectedHeadersToPreflightResponseWithCredentialsAllowed(): void @@ -86,10 +89,10 @@ public function testWillApplyExpectedHeadersToPreflightResponseWithCredentialsAl $origin = 'http://www.example.org'; $configuration = $this->createMock(ConfigurationInterface::class); - $response = $this->createMock(ResponseInterface::class); + $response = new TextResponse(''); $this->psrResponseFactory - ->expects($this->once()) + ->expects(self::once()) ->method('createResponse') ->with(204, 'CORS Details') ->willReturn($response); @@ -98,41 +101,49 @@ public function testWillApplyExpectedHeadersToPreflightResponseWithCredentialsAl $headers = ['X-Foo-Bar']; $configuration - ->expects($this->once()) + ->expects(self::once()) ->method('allowedMethods') ->willReturn($methods); $configuration - ->expects($this->once()) + ->expects(self::once()) ->method('allowedHeaders') ->willReturn($headers); $configuration - ->expects($this->once()) + ->expects(self::once()) ->method('allowedMaxAge') ->willReturn('0'); $configuration - ->expects($this->once()) + ->expects(self::once()) ->method('credentialsAllowed') ->willReturn(true); - $response - ->expects($this->any()) - ->method('withAddedHeader') - ->withConsecutive( - ['Content-Length', 0], - ['Access-Control-Allow-Origin', $origin], - ['Access-Control-Allow-Methods', implode(', ', $methods)], - ['Access-Control-Allow-Headers', implode(', ', $headers)], - ['Access-Control-Max-Age', 0], - ['Access-Control-Allow-Credentials', 'true'], - ) - ->willReturnSelf(); - $responseFromFactory = $this->responseFactory->preflight($origin, $configuration); - $this->assertEquals($response, $responseFromFactory); + self::assertNotSame($response, $responseFromFactory); + self::assertEquals('0', $responseFromFactory->getHeader('Content-Length')[0] ?? null); + self::assertEquals($origin, $responseFromFactory->getHeader('Access-Control-Allow-Origin')[0] ?? null); + $expectAllowMethods = implode(', ', $methods); + self::assertEquals( + $expectAllowMethods, + $responseFromFactory->getHeader('Access-Control-Allow-Methods')[0] ?? null, + ); + + $expectAllowHeaders = implode(', ', $headers); + self::assertEquals( + $expectAllowHeaders, + $responseFromFactory->getHeader('Access-Control-Allow-Headers')[0] ?? null, + ); + self::assertEquals( + '0', + $responseFromFactory->getHeader('Access-Control-Max-Age')[0] ?? null, + ); + self::assertEquals( + 'true', + $responseFromFactory->getHeader('Access-Control-Allow-Credentials')[0] ?? null, + ); } public function testWillCreateUnauthorizedResponse(): void @@ -140,7 +151,7 @@ public function testWillCreateUnauthorizedResponse(): void $response = $this->createMock(ResponseInterface::class); $this->psrResponseFactory - ->expects($this->once()) + ->expects(self::once()) ->method('createResponse') ->with(403) ->willReturn($response); @@ -148,7 +159,7 @@ public function testWillCreateUnauthorizedResponse(): void $origin = 'foo'; $responseFromFactory = $this->responseFactory->unauthorized($origin); - $this->assertEquals($response, $responseFromFactory); + self::assertEquals($response, $responseFromFactory); } public function testWillApplyExpectedHeadersToCorsResponseWithoutCredentialsAllowed(): void @@ -156,35 +167,33 @@ public function testWillApplyExpectedHeadersToCorsResponseWithoutCredentialsAllo $origin = 'http://www.example.org'; $configuration = $this->createMock(ConfigurationInterface::class); - $response = $this->createMock(ResponseInterface::class); + $response = new TextResponse('Hey There'); $this->psrResponseFactory - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $headers = ['X-Bar']; $configuration - ->expects($this->once()) + ->expects(self::once()) ->method('exposedHeaders') ->willReturn($headers); $configuration - ->expects($this->once()) + ->expects(self::once()) ->method('credentialsAllowed') ->willReturn(false); - $response - ->expects($this->any()) - ->method('withAddedHeader') - ->withConsecutive( - ['Access-Control-Allow-Origin', $origin], - ['Access-Control-Expose-Headers', implode(', ', $headers)] - ) - ->willReturnSelf(); - $responseFromFactory = $this->responseFactory->cors($response, $origin, $configuration); - $this->assertEquals($response, $responseFromFactory); + + self::assertNotSame($response, $responseFromFactory); + self::assertEquals($origin, $responseFromFactory->getHeader('Access-Control-Allow-Origin')[0] ?? null); + $expectExposeHeaders = implode(', ', $headers); + self::assertEquals( + $expectExposeHeaders, + $responseFromFactory->getHeader('Access-Control-Expose-Headers')[0] ?? null, + ); } public function testWillApplyExpectedHeadersToCorsResponseWithCredentialsAllowed(): void @@ -192,35 +201,36 @@ public function testWillApplyExpectedHeadersToCorsResponseWithCredentialsAllowed $origin = 'http://www.example.org'; $configuration = $this->createMock(ConfigurationInterface::class); - $response = $this->createMock(ResponseInterface::class); + $response = new TextResponse('Hey There'); $this->psrResponseFactory - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $headers = ['X-Bar', 'X-Baz']; $configuration - ->expects($this->once()) + ->expects(self::once()) ->method('exposedHeaders') ->willReturn($headers); $configuration - ->expects($this->once()) + ->expects(self::once()) ->method('credentialsAllowed') ->willReturn(true); - $response - ->expects($this->any()) - ->method('withAddedHeader') - ->withConsecutive( - ['Access-Control-Allow-Origin', $origin], - ['Access-Control-Expose-Headers', implode(', ', $headers)], - ['Access-Control-Allow-Credentials', 'true'] - ) - ->willReturnSelf(); - $responseFromFactory = $this->responseFactory->cors($response, $origin, $configuration); - $this->assertEquals($response, $responseFromFactory); + + self::assertNotSame($response, $responseFromFactory); + self::assertEquals($origin, $responseFromFactory->getHeader('Access-Control-Allow-Origin')[0] ?? null); + $expectExposeHeaders = implode(', ', $headers); + self::assertEquals( + $expectExposeHeaders, + $responseFromFactory->getHeader('Access-Control-Expose-Headers')[0] ?? null, + ); + self::assertEquals( + 'true', + $responseFromFactory->getHeader('Access-Control-Allow-Credentials')[0] ?? null, + ); } }