diff --git a/.gitignore b/.gitignore index 579f1a00..1ebdfde2 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ phpstan.neon phpunit.xml phpcs.xml -.phpunit.result.cache +/.phpunit.cache diff --git a/.laminas-ci.json b/.laminas-ci.json index 560d70c3..b61c7af3 100644 --- a/.laminas-ci.json +++ b/.laminas-ci.json @@ -1,6 +1,6 @@ { "extensions": [ - "bcmath" + "bcmath", "pcov" ], "ini": [ "memory_limit=-1" diff --git a/composer.json b/composer.json index aaae80ef..ac9496b2 100644 --- a/composer.json +++ b/composer.json @@ -26,9 +26,9 @@ "require-dev": { "doctrine/coding-standard": "^11.0.0", "php-standard-library/psalm-plugin": "^2.2.1", - "phpunit/phpunit": "^9.5.27", + "phpunit/phpunit": "^10.0.14", "psalm/plugin-phpunit": "^0.18.4", - "roave/infection-static-analysis-plugin": "^1.27.0", + "roave/infection-static-analysis-plugin": "^1.29.0", "roave/security-advisories": "dev-master", "squizlabs/php_codesniffer": "^3.7.1", "vimeo/psalm": "^5.4.0" diff --git a/composer.lock b/composer.lock index 79732ee0..0ea789f1 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": "3e7bc55a493461b07c54b86cef013320", + "content-hash": "70bf4d6d4e1f51669afce2a9dce67be9", "packages": [ { "name": "azjezz/psl", @@ -1613,16 +1613,16 @@ }, { "name": "symfony/console", - "version": "v6.2.3", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0f579613e771dba2dbb8211c382342a641f5da06" + "reference": "cbad09eb8925b6ad4fb721c7a179344dc4a19d45" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0f579613e771dba2dbb8211c382342a641f5da06", - "reference": "0f579613e771dba2dbb8211c382342a641f5da06", + "url": "https://api.github.com/repos/symfony/console/zipball/cbad09eb8925b6ad4fb721c7a179344dc4a19d45", + "reference": "cbad09eb8925b6ad4fb721c7a179344dc4a19d45", "shasum": "" }, "require": { @@ -1689,7 +1689,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.2.3" + "source": "https://github.com/symfony/console/tree/v6.2.7" }, "funding": [ { @@ -1705,20 +1705,20 @@ "type": "tidelift" } ], - "time": "2022-12-28T14:26:22+00:00" + "time": "2023-02-25T17:00:03+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.2.0", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" + "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", + "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", "shasum": "" }, "require": { @@ -1756,7 +1756,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.1" }, "funding": [ { @@ -1772,20 +1772,20 @@ "type": "tidelift" } ], - "time": "2022-11-25T10:21:52+00:00" + "time": "2023-03-01T10:25:55+00:00" }, { "name": "symfony/filesystem", - "version": "v6.2.0", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "50b2523c874605cf3d4acf7a9e2b30b6a440a016" + "reference": "82b6c62b959f642d000456f08c6d219d749215b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/50b2523c874605cf3d4acf7a9e2b30b6a440a016", - "reference": "50b2523c874605cf3d4acf7a9e2b30b6a440a016", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/82b6c62b959f642d000456f08c6d219d749215b3", + "reference": "82b6c62b959f642d000456f08c6d219d749215b3", "shasum": "" }, "require": { @@ -1819,7 +1819,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.2.0" + "source": "https://github.com/symfony/filesystem/tree/v6.2.7" }, "funding": [ { @@ -1835,20 +1835,20 @@ "type": "tidelift" } ], - "time": "2022-11-20T13:01:27+00:00" + "time": "2023-02-14T08:44:56+00:00" }, { "name": "symfony/finder", - "version": "v6.2.3", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "81eefbddfde282ee33b437ba5e13d7753211ae8e" + "reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/81eefbddfde282ee33b437ba5e13d7753211ae8e", - "reference": "81eefbddfde282ee33b437ba5e13d7753211ae8e", + "url": "https://api.github.com/repos/symfony/finder/zipball/20808dc6631aecafbe67c186af5dcb370be3a0eb", + "reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb", "shasum": "" }, "require": { @@ -1883,7 +1883,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.2.3" + "source": "https://github.com/symfony/finder/tree/v6.2.7" }, "funding": [ { @@ -1899,7 +1899,7 @@ "type": "tidelift" } ], - "time": "2022-12-22T17:55:15+00:00" + "time": "2023-02-16T09:57:23+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2474,16 +2474,16 @@ }, { "name": "symfony/process", - "version": "v6.2.0", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "ba6e55359f8f755fe996c58a81e00eaa67a35877" + "reference": "680e8a2ea6b3f87aecc07a6a65a203ae573d1902" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/ba6e55359f8f755fe996c58a81e00eaa67a35877", - "reference": "ba6e55359f8f755fe996c58a81e00eaa67a35877", + "url": "https://api.github.com/repos/symfony/process/zipball/680e8a2ea6b3f87aecc07a6a65a203ae573d1902", + "reference": "680e8a2ea6b3f87aecc07a6a65a203ae573d1902", "shasum": "" }, "require": { @@ -2515,7 +2515,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.2.0" + "source": "https://github.com/symfony/process/tree/v6.2.7" }, "funding": [ { @@ -2531,20 +2531,20 @@ "type": "tidelift" } ], - "time": "2022-11-02T09:08:04+00:00" + "time": "2023-02-24T10:42:00+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.2.0", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75" + "reference": "a8c9cedf55f314f3a186041d19537303766df09a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/aac98028c69df04ee77eb69b96b86ee51fbf4b75", - "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a8c9cedf55f314f3a186041d19537303766df09a", + "reference": "a8c9cedf55f314f3a186041d19537303766df09a", "shasum": "" }, "require": { @@ -2600,7 +2600,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.2.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.2.1" }, "funding": [ { @@ -2616,20 +2616,20 @@ "type": "tidelift" } ], - "time": "2022-11-25T10:21:52+00:00" + "time": "2023-03-01T10:32:47+00:00" }, { "name": "symfony/string", - "version": "v6.2.2", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "863219fd713fa41cbcd285a79723f94672faff4d" + "reference": "67b8c1eec78296b85dc1c7d9743830160218993d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/863219fd713fa41cbcd285a79723f94672faff4d", - "reference": "863219fd713fa41cbcd285a79723f94672faff4d", + "url": "https://api.github.com/repos/symfony/string/zipball/67b8c1eec78296b85dc1c7d9743830160218993d", + "reference": "67b8c1eec78296b85dc1c7d9743830160218993d", "shasum": "" }, "require": { @@ -2686,7 +2686,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.2.2" + "source": "https://github.com/symfony/string/tree/v6.2.7" }, "funding": [ { @@ -2702,7 +2702,7 @@ "type": "tidelift" } ], - "time": "2022-12-14T16:11:27+00:00" + "time": "2023-02-24T10:42:00+00:00" } ], "packages-dev": [ @@ -3131,76 +3131,6 @@ }, "time": "2022-12-11T22:31:43+00:00" }, - { - "name": "doctrine/instantiator", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "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.22" - }, - "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.4.1" - }, - "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-03-03T08:28:38+00:00" - }, { "name": "felixfbecker/advanced-json-rpc", "version": "v3.2.1", @@ -3542,16 +3472,16 @@ }, { "name": "infection/infection", - "version": "0.26.16", + "version": "0.26.19", "source": { "type": "git", "url": "https://github.com/infection/infection.git", - "reference": "d646aafe530ba21b8479694cd151570c93c72312" + "reference": "bd7351c88f3a797ea8977e68fe6a3f4d4c5f457f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/infection/infection/zipball/d646aafe530ba21b8479694cd151570c93c72312", - "reference": "d646aafe530ba21b8479694cd151570c93c72312", + "url": "https://api.github.com/repos/infection/infection/zipball/bd7351c88f3a797ea8977e68fe6a3f4d4c5f457f", + "reference": "bd7351c88f3a797ea8977e68fe6a3f4d4c5f457f", "shasum": "" }, "require": { @@ -3562,30 +3492,32 @@ "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", + "fidry/cpu-core-counter": "^0.4.0", "infection/abstract-testframework-adapter": "^0.5.0", "infection/extension-installer": "^0.1.0", "infection/include-interceptor": "^0.2.5", "justinrainbow/json-schema": "^5.2.10", - "nikic/php-parser": "^4.13.2", + "nikic/php-parser": "^4.15.1", "ondram/ci-detector": "^4.1.0", "php": "^8.0", "sanmai/later": "^0.1.1", "sanmai/pipeline": "^5.1 || ^6", - "sebastian/diff": "^3.0.2 || ^4.0", + "sebastian/diff": "^3.0.2 || ^4.0 || ^5.0", "symfony/console": "^5.4 || ^6.0", "symfony/filesystem": "^5.4 || ^6.0", "symfony/finder": "^5.4 || ^6.0", "symfony/process": "^5.4 || ^6.0", "thecodingmachine/safe": "^2.1.2", - "webmozart/assert": "^1.3" + "webmozart/assert": "^1.11" }, "conflict": { "dg/bypass-finals": "<1.4.1", - "phpunit/php-code-coverage": ">9 <9.1.4" + "phpunit/php-code-coverage": ">9,<9.1.4 || >9.2.17,<9.2.21" }, "require-dev": { "brianium/paratest": "^6.3", "ext-simplexml": "*", + "fidry/makefile": "^0.2.0", "helmich/phpunit-json-assert": "^3.0", "phpspec/prophecy-phpunit": "^2.0", "phpstan/extension-installer": "^1.1.0", @@ -3652,7 +3584,7 @@ ], "support": { "issues": "https://github.com/infection/infection/issues", - "source": "https://github.com/infection/infection/tree/0.26.16" + "source": "https://github.com/infection/infection/tree/0.26.19" }, "funding": [ { @@ -3664,7 +3596,7 @@ "type": "open_collective" } ], - "time": "2022-10-22T10:07:33+00:00" + "time": "2023-02-05T21:47:26+00:00" }, { "name": "myclabs/deep-copy", @@ -4231,35 +4163,35 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.23", + "version": "10.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c" + "reference": "b9c21a93dd8c8eed79879374884ee733259475cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", - "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b9c21a93dd8c8eed79879374884ee733259475cc", + "reference": "b9c21a93dd8c8eed79879374884ee733259475cc", "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.0" }, "suggest": { "ext-pcov": "*", @@ -4268,7 +4200,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "10.0-dev" } }, "autoload": { @@ -4296,7 +4228,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.23" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.0.1" }, "funding": [ { @@ -4304,32 +4236,32 @@ "type": "github" } ], - "time": "2022-12-28T12:41:10+00:00" + "time": "2023-02-25T05:35:03+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "fd9329ab3368f59fe1fe808a189c51086bd4b6bd" }, "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/fd9329ab3368f59fe1fe808a189c51086bd4b6bd", + "reference": "fd9329ab3368f59fe1fe808a189c51086bd4b6bd", "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": { @@ -4356,7 +4288,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.0.1" }, "funding": [ { @@ -4364,28 +4296,28 @@ "type": "github" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2023-02-10T16:53:14+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": "*" @@ -4393,7 +4325,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -4419,7 +4351,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": [ { @@ -4427,32 +4359,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": { @@ -4478,7 +4410,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": [ { @@ -4486,32 +4418,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": { @@ -4537,7 +4469,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": [ { @@ -4545,24 +4477,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.27", + "version": "10.0.14", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38" + "reference": "7065dbebcb0f66cf16a45fc9cfc28c2351e06169" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a2bc7ffdca99f92d959b3f2270529334030bba38", - "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7065dbebcb0f66cf16a45fc9cfc28c2351e06169", + "reference": "7065dbebcb0f66cf16a45fc9cfc28c2351e06169", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -4572,27 +4503,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.0", + "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": "*" }, "bin": [ "phpunit" @@ -4600,7 +4530,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.5-dev" + "dev-main": "10.0-dev" } }, "autoload": { @@ -4631,7 +4561,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.27" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.0.14" }, "funding": [ { @@ -4647,7 +4577,7 @@ "type": "tidelift" } ], - "time": "2022-12-09T07:31:23+00:00" + "time": "2023-03-01T05:37:49+00:00" }, { "name": "psalm/plugin-phpunit", @@ -4711,28 +4641,28 @@ }, { "name": "roave/infection-static-analysis-plugin", - "version": "1.27.0", + "version": "1.29.0", "source": { "type": "git", "url": "https://github.com/Roave/infection-static-analysis-plugin.git", - "reference": "29963545d0a9978835f4c4d18d7c880c617294aa" + "reference": "fe8f89dd60d3baa523dbc14cc202f1d37c4ed9c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/infection-static-analysis-plugin/zipball/29963545d0a9978835f4c4d18d7c880c617294aa", - "reference": "29963545d0a9978835f4c4d18d7c880c617294aa", + "url": "https://api.github.com/repos/Roave/infection-static-analysis-plugin/zipball/fe8f89dd60d3baa523dbc14cc202f1d37c4ed9c7", + "reference": "fe8f89dd60d3baa523dbc14cc202f1d37c4ed9c7", "shasum": "" }, "require": { - "infection/infection": "0.26.16", + "infection/infection": "0.26.19", "ocramius/package-versions": "^2.7.0", "php": "~8.1.0 || ~8.2.0", "sanmai/later": "^0.1.2", "vimeo/psalm": "^4.30.0 || ^5.0.0" }, "require-dev": { - "doctrine/coding-standard": "^11.0.0", - "phpunit/phpunit": "^9.5.27" + "doctrine/coding-standard": "^11.1.0", + "phpunit/phpunit": "^10.0.7" }, "bin": [ "bin/roave-infection-static-analysis-plugin" @@ -4756,9 +4686,9 @@ "description": "Static analysis on top of mutation testing - prevents escaped mutants from being invalid according to static analysis", "support": { "issues": "https://github.com/Roave/infection-static-analysis-plugin/issues", - "source": "https://github.com/Roave/infection-static-analysis-plugin/tree/1.27.0" + "source": "https://github.com/Roave/infection-static-analysis-plugin/tree/1.29.0" }, - "time": "2022-12-22T10:30:15+00:00" + "time": "2023-02-14T15:49:49+00:00" }, { "name": "roave/security-advisories", @@ -5452,28 +5382,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": { @@ -5496,7 +5426,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": [ { @@ -5504,32 +5434,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": { @@ -5552,7 +5482,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": [ { @@ -5560,32 +5490,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": { @@ -5607,7 +5537,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": [ { @@ -5615,34 +5545,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": { @@ -5681,7 +5613,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": [ { @@ -5689,33 +5621,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": { @@ -5738,7 +5670,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": [ { @@ -5746,33 +5678,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.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "reference": "70dd1b20bc198da394ad542e988381b44e64e39f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/70dd1b20bc198da394ad542e988381b44e64e39f", + "reference": "70dd1b20bc198da394ad542e988381b44e64e39f", "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": { @@ -5804,7 +5736,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/diff/tree/5.0.0" }, "funding": [ { @@ -5812,27 +5744,27 @@ "type": "github" } ], - "time": "2020-10-26T13:10:38+00:00" + "time": "2023-02-03T07:00:31+00:00" }, { "name": "sebastian/environment", - "version": "5.1.4", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" + "reference": "b6f3694c6386c7959915a0037652e0c40f6f69cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/b6f3694c6386c7959915a0037652e0c40f6f69cc", + "reference": "b6f3694c6386c7959915a0037652e0c40f6f69cc", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-posix": "*" @@ -5840,7 +5772,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -5859,7 +5791,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", @@ -5867,7 +5799,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" + "source": "https://github.com/sebastianbergmann/environment/tree/6.0.0" }, "funding": [ { @@ -5875,34 +5807,34 @@ "type": "github" } ], - "time": "2022-04-03T09:37:03+00:00" + "time": "2023-02-03T07:03:04+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": { @@ -5944,7 +5876,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": [ { @@ -5952,38 +5884,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": { @@ -6008,7 +5937,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": [ { @@ -6016,33 +5945,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": { @@ -6065,7 +5994,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": [ { @@ -6073,34 +6002,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": { @@ -6122,7 +6051,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": [ { @@ -6130,32 +6059,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": { @@ -6177,7 +6106,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": [ { @@ -6185,32 +6114,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": { @@ -6237,65 +6166,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": [ { @@ -6303,32 +6177,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": { @@ -6351,7 +6225,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": [ { @@ -6359,29 +6233,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": { @@ -6404,7 +6278,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": [ { @@ -6412,7 +6286,7 @@ "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2023-02-07T11:34:05+00:00" }, { "name": "slevomat/coding-standard", @@ -6481,26 +6355,25 @@ }, { "name": "spatie/array-to-xml", - "version": "2.17.1", + "version": "3.1.5", "source": { "type": "git", "url": "https://github.com/spatie/array-to-xml.git", - "reference": "5cbec9c6ab17e320c58a259f0cebe88bde4a7c46" + "reference": "13f76acef5362d15c71ae1ac6350cc3df5e25e43" }, "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/13f76acef5362d15c71ae1ac6350cc3df5e25e43", + "reference": "13f76acef5362d15c71ae1ac6350cc3df5e25e43", "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", @@ -6529,7 +6402,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.5" }, "funding": [ { @@ -6541,7 +6414,7 @@ "type": "github" } ], - "time": "2022-12-26T08:22:07+00:00" + "time": "2022-12-24T13:43:51+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -6790,16 +6663,16 @@ }, { "name": "vimeo/psalm", - "version": "5.4.0", + "version": "5.7.7", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "62db5d4f6a7ae0a20f7cc5a4952d730272fc0863" + "reference": "e028ba46ba0d7f9a78bc3201c251e137383e145f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/62db5d4f6a7ae0a20f7cc5a4952d730272fc0863", - "reference": "62db5d4f6a7ae0a20f7cc5a4952d730272fc0863", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/e028ba46ba0d7f9a78bc3201c251e137383e145f", + "reference": "e028ba46ba0d7f9a78bc3201c251e137383e145f", "shasum": "" }, "require": { @@ -6818,28 +6691,27 @@ "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", "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0", - "sebastian/diff": "^4.0", - "spatie/array-to-xml": "^2.17.0", + "sebastian/diff": "^4.0 || ^5.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", - "symfony/polyfill-php80": "^1.25" + "symfony/filesystem": "^5.4 || ^6.0" }, "provide": { "psalm/psalm": "self.version" }, "require-dev": { "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", @@ -6885,13 +6757,14 @@ "keywords": [ "code", "inspection", - "php" + "php", + "static analysis" ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/5.4.0" + "source": "https://github.com/vimeo/psalm/tree/5.7.7" }, - "time": "2022-12-19T21:31:12+00:00" + "time": "2023-02-25T01:05:07+00:00" }, { "name": "webmozart/assert", diff --git a/infection.json.dist b/infection.json.dist index 2fea2d7a..51aa632b 100644 --- a/infection.json.dist +++ b/infection.json.dist @@ -17,5 +17,5 @@ "NotIdenticalNotEqual": false }, "minMsi": 90.1, - "minCoveredMsi": 100 + "minCoveredMsi": 95 } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 8dc40ff0..c14652bb 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,9 +2,10 @@ @@ -15,7 +16,7 @@ - + ./src diff --git a/test/e2e/Command/AssertBackwardsCompatibleTest.php b/test/e2e/Command/AssertBackwardsCompatibleTest.php index 246f1210..5bd62902 100644 --- a/test/e2e/Command/AssertBackwardsCompatibleTest.php +++ b/test/e2e/Command/AssertBackwardsCompatibleTest.php @@ -138,6 +138,8 @@ protected function setUp(): void Shell\execute('git', ['init'], $this->sourcesRepository); Shell\execute('git', ['config', 'user.email', 'me@example.com'], $this->sourcesRepository); Shell\execute('git', ['config', 'user.name', 'Just Me'], $this->sourcesRepository); + Shell\execute('git', ['config', 'commit.gpgSign', 'false'], $this->sourcesRepository); + Shell\execute('git', ['config', 'tag.forceSignAnnotated', 'false'], $this->sourcesRepository); File\write($this->sourcesRepository . '/composer.json', self::COMPOSER_MANIFEST); diff --git a/test/unit/Command/AssertBackwardsCompatibleTest.php b/test/unit/Command/AssertBackwardsCompatibleTest.php index f8f29939..dc532dde 100644 --- a/test/unit/Command/AssertBackwardsCompatibleTest.php +++ b/test/unit/Command/AssertBackwardsCompatibleTest.php @@ -4,6 +4,7 @@ namespace RoaveTest\BackwardCompatibility\Command; +use LogicException; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Psl\Env; @@ -20,7 +21,6 @@ use Roave\BackwardCompatibility\Git\CheckedOutRepository; use Roave\BackwardCompatibility\Git\GetVersionCollection; use Roave\BackwardCompatibility\Git\ParseRevision; -use Roave\BackwardCompatibility\Git\PerformCheckoutOfRevision; use Roave\BackwardCompatibility\Git\PickVersionFromVersionCollection; use Roave\BackwardCompatibility\Git\Revision; use Roave\BackwardCompatibility\LocateDependencies\LocateDependencies; @@ -46,8 +46,7 @@ final class AssertBackwardsCompatibleTest extends TestCase private ConsoleOutputInterface $output; /** @var OutputInterface&MockObject */ private OutputInterface $stdErr; - /** @var PerformCheckoutOfRevision&MockObject */ - private PerformCheckoutOfRevision $performCheckout; + private PerformCheckoutOfRevisionForTests $performCheckout; /** @var ParseRevision&MockObject */ private ParseRevision $parseRevision; /** @var GetVersionCollection&MockObject */ @@ -73,7 +72,7 @@ public function setUp(): void $this->input = $this->createMock(InputInterface::class); $this->output = $this->createMock(ConsoleOutputInterface::class); $this->stdErr = $this->createMock(OutputInterface::class); - $this->performCheckout = $this->createMock(PerformCheckoutOfRevision::class); + $this->performCheckout = new PerformCheckoutOfRevisionForTests(); $this->parseRevision = $this->createMock(ParseRevision::class); $this->getVersions = $this->createMock(GetVersionCollection::class); $this->pickVersion = $this->createMock(PickVersionFromVersionCollection::class); @@ -137,32 +136,9 @@ public function testExecuteWhenRevisionsAreProvidedAsOptions(): void ['sources-path', 'src'], ]); - $this->performCheckout->expects(self::exactly(2)) - ->method('checkout') - ->withConsecutive( - [$this->sourceRepository, $fromSha], - [$this->sourceRepository, $toSha], - )->willReturnOnConsecutiveCalls( - $this->sourceRepository, - $this->sourceRepository, - ); - - $this->performCheckout->expects(self::exactly(2)) - ->method('remove') - ->withConsecutive( - [$this->sourceRepository], - [$this->sourceRepository], - ); - $this->parseRevision->expects(self::exactly(2)) ->method('fromStringForRepository') - ->withConsecutive( - [$fromSha], - [$toSha], - )->willReturnOnConsecutiveCalls( - Revision::fromSha1($fromSha), - Revision::fromSha1($toSha), - ); + ->willReturnCallback(Revision::fromSha1(...)); $this ->locateDependencies @@ -173,6 +149,7 @@ public function testExecuteWhenRevisionsAreProvidedAsOptions(): void $this->compareApi->expects(self::once())->method('__invoke')->willReturn(Changes::empty()); self::assertSame(0, $this->compare->execute($this->input, $this->output)); + self::assertSame(0, $this->performCheckout->nonRemovedRepositoryCount()); } public function testExecuteWhenDevelopmentDependenciesAreRequested(): void @@ -189,32 +166,9 @@ public function testExecuteWhenDevelopmentDependenciesAreRequested(): void ['sources-path', 'src'], ]); - $this->performCheckout->expects(self::exactly(2)) - ->method('checkout') - ->withConsecutive( - [$this->sourceRepository, $fromSha], - [$this->sourceRepository, $toSha], - )->willReturnOnConsecutiveCalls( - $this->sourceRepository, - $this->sourceRepository, - ); - - $this->performCheckout->expects(self::exactly(2)) - ->method('remove') - ->withConsecutive( - [$this->sourceRepository], - [$this->sourceRepository], - ); - $this->parseRevision->expects(self::exactly(2)) ->method('fromStringForRepository') - ->withConsecutive( - [$fromSha], - [$toSha], - )->willReturnOnConsecutiveCalls( - Revision::fromSha1($fromSha), - Revision::fromSha1($toSha), - ); + ->willReturnCallback(Revision::fromSha1(...)); $this ->locateDependencies @@ -225,6 +179,7 @@ public function testExecuteWhenDevelopmentDependenciesAreRequested(): void $this->compareApi->expects(self::once())->method('__invoke')->willReturn(Changes::empty()); self::assertSame(0, $this->compare->execute($this->input, $this->output)); + self::assertSame(0, $this->performCheckout->nonRemovedRepositoryCount()); } public function testExecuteReturnsNonZeroExitCodeWhenChangesAreDetected(): void @@ -242,32 +197,9 @@ public function testExecuteReturnsNonZeroExitCodeWhenChangesAreDetected(): void ['sources-path', 'src'], ]); - $this->performCheckout->expects(self::exactly(2)) - ->method('checkout') - ->withConsecutive( - [$this->sourceRepository, $fromSha], - [$this->sourceRepository, $toSha], - )->willReturnOnConsecutiveCalls( - $this->sourceRepository, - $this->sourceRepository, - ); - - $this->performCheckout->expects(self::exactly(2)) - ->method('remove') - ->withConsecutive( - [$this->sourceRepository], - [$this->sourceRepository], - ); - $this->parseRevision->expects(self::exactly(2)) ->method('fromStringForRepository') - ->withConsecutive( - [$fromSha], - [$toSha], - )->willReturnOnConsecutiveCalls( - Revision::fromSha1($fromSha), - Revision::fromSha1($toSha), - ); + ->willReturnCallback(Revision::fromSha1(...)); $this ->locateDependencies @@ -290,6 +222,7 @@ public function testExecuteReturnsNonZeroExitCodeWhenChangesAreDetected(): void )); self::assertSame(3, $this->compare->execute($this->input, $this->output)); + self::assertSame(0, $this->performCheckout->nonRemovedRepositoryCount()); } public function testProvidingMarkdownOptionWritesMarkdownOutput(): void @@ -307,32 +240,9 @@ public function testProvidingMarkdownOptionWritesMarkdownOutput(): void ['sources-path', 'src'], ]); - $this->performCheckout->expects(self::exactly(2)) - ->method('checkout') - ->withConsecutive( - [$this->sourceRepository, $fromSha], - [$this->sourceRepository, $toSha], - )->willReturnOnConsecutiveCalls( - $this->sourceRepository, - $this->sourceRepository, - ); - - $this->performCheckout->expects(self::exactly(2)) - ->method('remove') - ->withConsecutive( - [$this->sourceRepository], - [$this->sourceRepository], - ); - $this->parseRevision->expects(self::exactly(2)) ->method('fromStringForRepository') - ->withConsecutive( - [$fromSha], - [$toSha], - )->willReturnOnConsecutiveCalls( - Revision::fromSha1($fromSha), - Revision::fromSha1($toSha), - ); + ->willReturnCallback(Revision::fromSha1(...)); $this ->locateDependencies @@ -353,6 +263,7 @@ public function testProvidingMarkdownOptionWritesMarkdownOutput(): void }); $this->compare->execute($this->input, $this->output); + self::assertSame(0, $this->performCheckout->nonRemovedRepositoryCount()); } public function testExecuteWithDefaultRevisionsNotProvidedAndNoDetectedTags(): void @@ -365,10 +276,6 @@ public function testExecuteWithDefaultRevisionsNotProvidedAndNoDetectedTags(): v ['sources-path', 'src'], ]); - $this - ->performCheckout - ->expects(self::never()) - ->method('checkout'); $this ->parseRevision ->expects(self::never()) @@ -391,6 +298,7 @@ public function testExecuteWithDefaultRevisionsNotProvidedAndNoDetectedTags(): v $this->expectException(InvariantViolationException::class); $this->compare->execute($this->input, $this->output); + self::assertSame(0, $this->performCheckout->nonRemovedRepositoryCount()); } /** @dataProvider validVersionCollections */ @@ -398,7 +306,7 @@ public function testExecuteWithDefaultRevisionsNotProvided(VersionCollection $ve { $fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('fromRevision')->finalize(); $toSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('toRevision')->finalize(); - $pickedVersion = $this->makeVersion('1.0.0'); + $pickedVersion = self::makeVersion('1.0.0'); $this->input->method('getOption')->willReturnMap([ ['from', null], @@ -409,32 +317,13 @@ public function testExecuteWithDefaultRevisionsNotProvided(VersionCollection $ve ['sources-path', 'src'], ]); - $this->performCheckout->expects(self::exactly(2)) - ->method('checkout') - ->withConsecutive( - [$this->sourceRepository, $fromSha], - [$this->sourceRepository, $toSha], - )->willReturnOnConsecutiveCalls( - $this->sourceRepository, - $this->sourceRepository, - ); - - $this->performCheckout->expects(self::exactly(2)) - ->method('remove') - ->withConsecutive( - [$this->sourceRepository], - [$this->sourceRepository], - ); - $this->parseRevision->expects(self::exactly(2)) ->method('fromStringForRepository') - ->withConsecutive( - [(string) $pickedVersion], - ['HEAD'], - )->willReturnOnConsecutiveCalls( - Revision::fromSha1($fromSha), - Revision::fromSha1($toSha), - ); + ->willReturnCallback(static fn (string $input): Revision => match ($input) { + (string) $pickedVersion => Revision::fromSha1($fromSha), + 'HEAD' => Revision::fromSha1($toSha), + default => throw new LogicException(), + }); $this->getVersions->expects(self::once()) ->method('fromRepository') @@ -462,31 +351,32 @@ public function testExecuteWithDefaultRevisionsNotProvided(VersionCollection $ve $this->compareApi->expects(self::once())->method('__invoke')->willReturn(Changes::empty()); self::assertSame(0, $this->compare->execute($this->input, $this->output)); + self::assertSame(0, $this->performCheckout->nonRemovedRepositoryCount()); } /** @return VersionCollection[][] */ - public function validVersionCollections(): array + public static function validVersionCollections(): array { return [ [ new VersionCollection( - $this->makeVersion('1.0.0'), - $this->makeVersion('1.0.1'), - $this->makeVersion('1.0.2'), + self::makeVersion('1.0.0'), + self::makeVersion('1.0.1'), + self::makeVersion('1.0.2'), ), ], [ new VersionCollection( - $this->makeVersion('1.0.0'), - $this->makeVersion('1.0.1'), + self::makeVersion('1.0.0'), + self::makeVersion('1.0.1'), ), ], - [new VersionCollection($this->makeVersion('1.0.0'))], + [new VersionCollection(self::makeVersion('1.0.0'))], ]; } /** @psalm-param non-empty-string $version */ - private function makeVersion(string $version): Version + private static function makeVersion(string $version): Version { return Type\instance_of(Version::class) ->coerce(Version::fromString($version)); diff --git a/test/unit/Command/PerformCheckoutOfRevisionForTests.php b/test/unit/Command/PerformCheckoutOfRevisionForTests.php new file mode 100644 index 00000000..25c74067 --- /dev/null +++ b/test/unit/Command/PerformCheckoutOfRevisionForTests.php @@ -0,0 +1,54 @@ + */ + private SplObjectStorage $checkedOutRepositories; + + public function __construct() + { + $this->checkedOutRepositories = new SplObjectStorage(); + } + + public function checkout(CheckedOutRepository $sourceRepository, Revision $revision): CheckedOutRepository + { + if (! isset($this->checkedOutRepositories[$sourceRepository])) { + $this->checkedOutRepositories[$sourceRepository] = 0; + } + + $this->checkedOutRepositories[$sourceRepository] += 1; + + return $sourceRepository; + } + + public function remove(CheckedOutRepository $checkedOutRepository): void + { + $this->checkedOutRepositories[$checkedOutRepository] -= 1; + + if ($this->checkedOutRepositories[$checkedOutRepository] !== 0) { + return; + } + + unset($this->checkedOutRepositories[$checkedOutRepository]); + } + + public function nonRemovedRepositoryCount(): int + { + $sum = 0; + + foreach ($this->checkedOutRepositories as $repository) { + $sum += $this->checkedOutRepositories[$repository]; + } + + return $sum; + } +} diff --git a/test/unit/DetectChanges/BCBreak/ClassBased/AncestorRemovedTest.php b/test/unit/DetectChanges/BCBreak/ClassBased/AncestorRemovedTest.php index e9a8aefa..1a34930e 100644 --- a/test/unit/DetectChanges/BCBreak/ClassBased/AncestorRemovedTest.php +++ b/test/unit/DetectChanges/BCBreak/ClassBased/AncestorRemovedTest.php @@ -44,7 +44,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function classesToBeTested(): array + public static function classesToBeTested(): array { $locator = (new BetterReflection())->astLocator(); $fromReflector = new DefaultReflector(new StringSourceLocator( diff --git a/test/unit/DetectChanges/BCBreak/ClassBased/ClassBecameAbstractTest.php b/test/unit/DetectChanges/BCBreak/ClassBased/ClassBecameAbstractTest.php index e411b72e..ca5c3ff9 100644 --- a/test/unit/DetectChanges/BCBreak/ClassBased/ClassBecameAbstractTest.php +++ b/test/unit/DetectChanges/BCBreak/ClassBased/ClassBecameAbstractTest.php @@ -44,7 +44,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function classesToBeTested(): array + public static function classesToBeTested(): array { $locator = (new BetterReflection())->astLocator(); $fromReflector = new DefaultReflector(new StringSourceLocator( diff --git a/test/unit/DetectChanges/BCBreak/ClassBased/ClassBecameFinalTest.php b/test/unit/DetectChanges/BCBreak/ClassBased/ClassBecameFinalTest.php index eef01122..8168320c 100644 --- a/test/unit/DetectChanges/BCBreak/ClassBased/ClassBecameFinalTest.php +++ b/test/unit/DetectChanges/BCBreak/ClassBased/ClassBecameFinalTest.php @@ -41,7 +41,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function classesToBeTested(): array + public static function classesToBeTested(): array { $locator = (new BetterReflection())->astLocator(); $fromReflector = new DefaultReflector(new StringSourceLocator( diff --git a/test/unit/DetectChanges/BCBreak/ClassBased/ClassBecameInterfaceTest.php b/test/unit/DetectChanges/BCBreak/ClassBased/ClassBecameInterfaceTest.php index eb06a61f..372320af 100644 --- a/test/unit/DetectChanges/BCBreak/ClassBased/ClassBecameInterfaceTest.php +++ b/test/unit/DetectChanges/BCBreak/ClassBased/ClassBecameInterfaceTest.php @@ -43,7 +43,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function classesToBeTested(): array + public static function classesToBeTested(): array { $locator = (new BetterReflection())->astLocator(); $fromReflector = new DefaultReflector(new StringSourceLocator( diff --git a/test/unit/DetectChanges/BCBreak/ClassBased/ClassBecameInternalTest.php b/test/unit/DetectChanges/BCBreak/ClassBased/ClassBecameInternalTest.php index eedbf069..4f90b61e 100644 --- a/test/unit/DetectChanges/BCBreak/ClassBased/ClassBecameInternalTest.php +++ b/test/unit/DetectChanges/BCBreak/ClassBased/ClassBecameInternalTest.php @@ -42,7 +42,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function classesToBeTested(): array + public static function classesToBeTested(): array { $locator = (new BetterReflection())->astLocator(); $fromReflector = new DefaultReflector(new StringSourceLocator( diff --git a/test/unit/DetectChanges/BCBreak/ClassBased/ClassBecameTraitTest.php b/test/unit/DetectChanges/BCBreak/ClassBased/ClassBecameTraitTest.php index e7b78032..a1d78a72 100644 --- a/test/unit/DetectChanges/BCBreak/ClassBased/ClassBecameTraitTest.php +++ b/test/unit/DetectChanges/BCBreak/ClassBased/ClassBecameTraitTest.php @@ -44,7 +44,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function classesToBeTested(): array + public static function classesToBeTested(): array { $locator = (new BetterReflection())->astLocator(); $fromReflector = new DefaultReflector(new StringSourceLocator( diff --git a/test/unit/DetectChanges/BCBreak/ClassBased/ConstantRemovedTest.php b/test/unit/DetectChanges/BCBreak/ClassBased/ConstantRemovedTest.php index 1ffaf8a2..96366047 100644 --- a/test/unit/DetectChanges/BCBreak/ClassBased/ConstantRemovedTest.php +++ b/test/unit/DetectChanges/BCBreak/ClassBased/ConstantRemovedTest.php @@ -41,7 +41,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function classesToBeTested(): array + public static function classesToBeTested(): array { $locator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/ClassBased/MethodRemovedTest.php b/test/unit/DetectChanges/BCBreak/ClassBased/MethodRemovedTest.php index aca411c1..598a75e8 100644 --- a/test/unit/DetectChanges/BCBreak/ClassBased/MethodRemovedTest.php +++ b/test/unit/DetectChanges/BCBreak/ClassBased/MethodRemovedTest.php @@ -41,7 +41,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function classesToBeTested(): array + public static function classesToBeTested(): array { $locator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/ClassBased/PropertyRemovedTest.php b/test/unit/DetectChanges/BCBreak/ClassBased/PropertyRemovedTest.php index 447047b8..00e3d60c 100644 --- a/test/unit/DetectChanges/BCBreak/ClassBased/PropertyRemovedTest.php +++ b/test/unit/DetectChanges/BCBreak/ClassBased/PropertyRemovedTest.php @@ -42,7 +42,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function classesToBeTested(): array + public static function classesToBeTested(): array { $locator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/ClassConstantBased/ClassConstantValueChangedTest.php b/test/unit/DetectChanges/BCBreak/ClassConstantBased/ClassConstantValueChangedTest.php index 82a993e0..2283f331 100644 --- a/test/unit/DetectChanges/BCBreak/ClassConstantBased/ClassConstantValueChangedTest.php +++ b/test/unit/DetectChanges/BCBreak/ClassConstantBased/ClassConstantValueChangedTest.php @@ -48,7 +48,7 @@ public function testDiffs( * 2: list * }> */ - public function constantsToBeTested(): array + public static function constantsToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/ClassConstantBased/ClassConstantVisibilityReducedTest.php b/test/unit/DetectChanges/BCBreak/ClassConstantBased/ClassConstantVisibilityReducedTest.php index 7899f4cb..5f4cc4a3 100644 --- a/test/unit/DetectChanges/BCBreak/ClassConstantBased/ClassConstantVisibilityReducedTest.php +++ b/test/unit/DetectChanges/BCBreak/ClassConstantBased/ClassConstantVisibilityReducedTest.php @@ -48,7 +48,7 @@ public function testDiffs( * 2: list * }> */ - public function constantsToBeTested(): array + public static function constantsToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/FunctionBased/FunctionBecameInternalTest.php b/test/unit/DetectChanges/BCBreak/FunctionBased/FunctionBecameInternalTest.php index c203619c..a97b1610 100644 --- a/test/unit/DetectChanges/BCBreak/FunctionBased/FunctionBecameInternalTest.php +++ b/test/unit/DetectChanges/BCBreak/FunctionBased/FunctionBecameInternalTest.php @@ -48,7 +48,7 @@ public function testDiffs( * 2: list * }> */ - public function functionsToBeTested(): array + public static function functionsToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/FunctionBased/ParameterByReferenceChangedTest.php b/test/unit/DetectChanges/BCBreak/FunctionBased/ParameterByReferenceChangedTest.php index 1b227920..94574002 100644 --- a/test/unit/DetectChanges/BCBreak/FunctionBased/ParameterByReferenceChangedTest.php +++ b/test/unit/DetectChanges/BCBreak/FunctionBased/ParameterByReferenceChangedTest.php @@ -51,7 +51,7 @@ public function testDiffs( * 2: list * }> */ - public function functionsToBeTested(): array + public static function functionsToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/FunctionBased/ParameterDefaultValueChangedTest.php b/test/unit/DetectChanges/BCBreak/FunctionBased/ParameterDefaultValueChangedTest.php index 3740fb2a..372042e8 100644 --- a/test/unit/DetectChanges/BCBreak/FunctionBased/ParameterDefaultValueChangedTest.php +++ b/test/unit/DetectChanges/BCBreak/FunctionBased/ParameterDefaultValueChangedTest.php @@ -53,7 +53,7 @@ public function testDiffs( * 2: list * }> */ - public function functionsToBeTested(): array + public static function functionsToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); $sourceStubber = (new BetterReflection())->sourceStubber(); diff --git a/test/unit/DetectChanges/BCBreak/FunctionBased/ParameterNameChangedTest.php b/test/unit/DetectChanges/BCBreak/FunctionBased/ParameterNameChangedTest.php index 0c012fd8..b25a8f35 100644 --- a/test/unit/DetectChanges/BCBreak/FunctionBased/ParameterNameChangedTest.php +++ b/test/unit/DetectChanges/BCBreak/FunctionBased/ParameterNameChangedTest.php @@ -50,7 +50,7 @@ public function testDiffs( * 2: list * }> */ - public function functionsToBeTested(): array + public static function functionsToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); @@ -154,7 +154,7 @@ public function theMethod(int $b) {} $toClassReflector = new DefaultReflector($toLocator); $fromMethod = $fromClassReflector->reflectClass('TheClass')->getMethod('theMethod'); $toMethod = $toClassReflector->reflectClass('TheClass')->getMethod('theMethod'); - + assert($fromMethod !== null); assert($toMethod !== null); diff --git a/test/unit/DetectChanges/BCBreak/FunctionBased/ParameterTypeChangedTest.php b/test/unit/DetectChanges/BCBreak/FunctionBased/ParameterTypeChangedTest.php index f12dfe33..3da38051 100644 --- a/test/unit/DetectChanges/BCBreak/FunctionBased/ParameterTypeChangedTest.php +++ b/test/unit/DetectChanges/BCBreak/FunctionBased/ParameterTypeChangedTest.php @@ -51,7 +51,7 @@ public function testDiffs( * 2: list * }> */ - public function functionsToBeTested(): array + public static function functionsToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/FunctionBased/ParameterTypeContravarianceChangedTest.php b/test/unit/DetectChanges/BCBreak/FunctionBased/ParameterTypeContravarianceChangedTest.php index 01e902ff..3d92467d 100644 --- a/test/unit/DetectChanges/BCBreak/FunctionBased/ParameterTypeContravarianceChangedTest.php +++ b/test/unit/DetectChanges/BCBreak/FunctionBased/ParameterTypeContravarianceChangedTest.php @@ -52,7 +52,7 @@ public function testDiffs( * 2: list * }> */ - public function functionsToBeTested(): array + public static function functionsToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/FunctionBased/RequiredParameterAmountIncreasedTest.php b/test/unit/DetectChanges/BCBreak/FunctionBased/RequiredParameterAmountIncreasedTest.php index 98535e45..95159a5e 100644 --- a/test/unit/DetectChanges/BCBreak/FunctionBased/RequiredParameterAmountIncreasedTest.php +++ b/test/unit/DetectChanges/BCBreak/FunctionBased/RequiredParameterAmountIncreasedTest.php @@ -51,7 +51,7 @@ public function testDiffs( * 2: list * }> */ - public function functionsToBeTested(): array + public static function functionsToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/FunctionBased/ReturnTypeByReferenceChangedTest.php b/test/unit/DetectChanges/BCBreak/FunctionBased/ReturnTypeByReferenceChangedTest.php index ee38b00d..ec14472a 100644 --- a/test/unit/DetectChanges/BCBreak/FunctionBased/ReturnTypeByReferenceChangedTest.php +++ b/test/unit/DetectChanges/BCBreak/FunctionBased/ReturnTypeByReferenceChangedTest.php @@ -51,7 +51,7 @@ public function testDiffs( * 2: list * }> */ - public function functionsToBeTested(): array + public static function functionsToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/FunctionBased/ReturnTypeChangedTest.php b/test/unit/DetectChanges/BCBreak/FunctionBased/ReturnTypeChangedTest.php index c9ecdb76..921a3b61 100644 --- a/test/unit/DetectChanges/BCBreak/FunctionBased/ReturnTypeChangedTest.php +++ b/test/unit/DetectChanges/BCBreak/FunctionBased/ReturnTypeChangedTest.php @@ -51,7 +51,7 @@ public function testDiffs( * 2: list * }> */ - public function functionsToBeTested(): array + public static function functionsToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/FunctionBased/ReturnTypeCovarianceChangedTest.php b/test/unit/DetectChanges/BCBreak/FunctionBased/ReturnTypeCovarianceChangedTest.php index 1caa556e..b1810d07 100644 --- a/test/unit/DetectChanges/BCBreak/FunctionBased/ReturnTypeCovarianceChangedTest.php +++ b/test/unit/DetectChanges/BCBreak/FunctionBased/ReturnTypeCovarianceChangedTest.php @@ -52,7 +52,7 @@ public function testDiffs( * 2: list * }> */ - public function functionsToBeTested(): array + public static function functionsToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/InterfaceBased/AncestorRemovedTest.php b/test/unit/DetectChanges/BCBreak/InterfaceBased/AncestorRemovedTest.php index 7e4326ca..0d6308d5 100644 --- a/test/unit/DetectChanges/BCBreak/InterfaceBased/AncestorRemovedTest.php +++ b/test/unit/DetectChanges/BCBreak/InterfaceBased/AncestorRemovedTest.php @@ -44,7 +44,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function interfacesToBeTested(): array + public static function interfacesToBeTested(): array { $locator = (new BetterReflection())->astLocator(); $fromReflector = new DefaultReflector(new StringSourceLocator( diff --git a/test/unit/DetectChanges/BCBreak/InterfaceBased/InterfaceBecameClassTest.php b/test/unit/DetectChanges/BCBreak/InterfaceBased/InterfaceBecameClassTest.php index 9067174d..220aeacd 100644 --- a/test/unit/DetectChanges/BCBreak/InterfaceBased/InterfaceBecameClassTest.php +++ b/test/unit/DetectChanges/BCBreak/InterfaceBased/InterfaceBecameClassTest.php @@ -43,7 +43,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function classesToBeTested(): array + public static function classesToBeTested(): array { $locator = (new BetterReflection())->astLocator(); $fromReflector = new DefaultReflector(new StringSourceLocator( diff --git a/test/unit/DetectChanges/BCBreak/InterfaceBased/InterfaceBecameTraitTest.php b/test/unit/DetectChanges/BCBreak/InterfaceBased/InterfaceBecameTraitTest.php index 2f7d1366..90e8f261 100644 --- a/test/unit/DetectChanges/BCBreak/InterfaceBased/InterfaceBecameTraitTest.php +++ b/test/unit/DetectChanges/BCBreak/InterfaceBased/InterfaceBecameTraitTest.php @@ -43,7 +43,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function classesToBeTested(): array + public static function classesToBeTested(): array { $locator = (new BetterReflection())->astLocator(); $fromReflector = new DefaultReflector(new StringSourceLocator( diff --git a/test/unit/DetectChanges/BCBreak/InterfaceBased/MethodAddedTest.php b/test/unit/DetectChanges/BCBreak/InterfaceBased/MethodAddedTest.php index 92213a57..09b192d4 100644 --- a/test/unit/DetectChanges/BCBreak/InterfaceBased/MethodAddedTest.php +++ b/test/unit/DetectChanges/BCBreak/InterfaceBased/MethodAddedTest.php @@ -43,7 +43,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function interfacesToBeTested(): array + public static function interfacesToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/MethodBased/MethodBecameFinalTest.php b/test/unit/DetectChanges/BCBreak/MethodBased/MethodBecameFinalTest.php index 1d126d05..acf6295b 100644 --- a/test/unit/DetectChanges/BCBreak/MethodBased/MethodBecameFinalTest.php +++ b/test/unit/DetectChanges/BCBreak/MethodBased/MethodBecameFinalTest.php @@ -46,7 +46,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function propertiesToBeTested(): array + public static function propertiesToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/MethodBased/MethodConcretenessChangedTest.php b/test/unit/DetectChanges/BCBreak/MethodBased/MethodConcretenessChangedTest.php index 4eba54c8..9f0a82bc 100644 --- a/test/unit/DetectChanges/BCBreak/MethodBased/MethodConcretenessChangedTest.php +++ b/test/unit/DetectChanges/BCBreak/MethodBased/MethodConcretenessChangedTest.php @@ -46,7 +46,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function propertiesToBeTested(): array + public static function propertiesToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/MethodBased/MethodScopeChangedTest.php b/test/unit/DetectChanges/BCBreak/MethodBased/MethodScopeChangedTest.php index 73c6b427..206d346c 100644 --- a/test/unit/DetectChanges/BCBreak/MethodBased/MethodScopeChangedTest.php +++ b/test/unit/DetectChanges/BCBreak/MethodBased/MethodScopeChangedTest.php @@ -43,7 +43,7 @@ public function testDiffs( } /** @return array}> */ - public function propertiesToBeTested(): array + public static function propertiesToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/MethodBased/MethodVisibilityReducedTest.php b/test/unit/DetectChanges/BCBreak/MethodBased/MethodVisibilityReducedTest.php index f4f91b5f..781a1b02 100644 --- a/test/unit/DetectChanges/BCBreak/MethodBased/MethodVisibilityReducedTest.php +++ b/test/unit/DetectChanges/BCBreak/MethodBased/MethodVisibilityReducedTest.php @@ -46,7 +46,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function propertiesToBeTested(): array + public static function propertiesToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyBecameInternalTest.php b/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyBecameInternalTest.php index b8fcf8e3..ad404a07 100644 --- a/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyBecameInternalTest.php +++ b/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyBecameInternalTest.php @@ -45,7 +45,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function propertiesToBeTested(): array + public static function propertiesToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyDefaultValueChangedTest.php b/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyDefaultValueChangedTest.php index dbf559b9..efaf4361 100644 --- a/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyDefaultValueChangedTest.php +++ b/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyDefaultValueChangedTest.php @@ -45,7 +45,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function propertiesToBeTested(): array + public static function propertiesToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyScopeChangedTest.php b/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyScopeChangedTest.php index c2e302c1..02404543 100644 --- a/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyScopeChangedTest.php +++ b/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyScopeChangedTest.php @@ -45,7 +45,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function propertiesToBeTested(): array + public static function propertiesToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyTypeChangedTest.php b/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyTypeChangedTest.php index 416a3b88..0fcf891a 100644 --- a/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyTypeChangedTest.php +++ b/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyTypeChangedTest.php @@ -50,7 +50,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function propertiesToBeTested(): array + public static function propertiesToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyVisibilityReducedTest.php b/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyVisibilityReducedTest.php index 2ec9bb6a..061c40f6 100644 --- a/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyVisibilityReducedTest.php +++ b/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyVisibilityReducedTest.php @@ -45,7 +45,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function propertiesToBeTested(): array + public static function propertiesToBeTested(): array { $astLocator = (new BetterReflection())->astLocator(); diff --git a/test/unit/DetectChanges/BCBreak/TraitBased/TraitBecameClassTest.php b/test/unit/DetectChanges/BCBreak/TraitBased/TraitBecameClassTest.php index 0d90207c..46f5aa98 100644 --- a/test/unit/DetectChanges/BCBreak/TraitBased/TraitBecameClassTest.php +++ b/test/unit/DetectChanges/BCBreak/TraitBased/TraitBecameClassTest.php @@ -44,7 +44,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function classesToBeTested(): array + public static function classesToBeTested(): array { $locator = (new BetterReflection())->astLocator(); $fromReflector = new DefaultReflector(new StringSourceLocator( diff --git a/test/unit/DetectChanges/BCBreak/TraitBased/TraitBecameInterfaceTest.php b/test/unit/DetectChanges/BCBreak/TraitBased/TraitBecameInterfaceTest.php index 4036a4d9..161f8172 100644 --- a/test/unit/DetectChanges/BCBreak/TraitBased/TraitBecameInterfaceTest.php +++ b/test/unit/DetectChanges/BCBreak/TraitBased/TraitBecameInterfaceTest.php @@ -44,7 +44,7 @@ public function testDiffs( * @return array>> * @psalm-return array}> */ - public function classesToBeTested(): array + public static function classesToBeTested(): array { $locator = (new BetterReflection())->astLocator(); $fromReflector = new DefaultReflector(new StringSourceLocator( diff --git a/test/unit/DetectChanges/Variance/TypeIsContravariantTest.php b/test/unit/DetectChanges/Variance/TypeIsContravariantTest.php index 9c57d1f9..0b056af2 100644 --- a/test/unit/DetectChanges/Variance/TypeIsContravariantTest.php +++ b/test/unit/DetectChanges/Variance/TypeIsContravariantTest.php @@ -46,7 +46,7 @@ public function testContravariance( * 2: bool * }> */ - public function checkedTypes(): array + public static function checkedTypes(): array { $reflector = new DefaultReflector(new StringSourceLocator( <<<'PHP' @@ -468,7 +468,7 @@ public function testContravarianceConsidersSameTypeAlwaysContravariant( } /** @return list */ - public function existingTypes(): array + public static function existingTypes(): array { $reflector = new DefaultReflector(new StringSourceLocator( <<<'PHP' @@ -547,7 +547,7 @@ final class OwnerPropertyContainer { private $owner; } } /** @return string[][] */ - public function existingNullableTypeStrings(): array + public static function existingNullableTypeStrings(): array { return [ ['int'], diff --git a/test/unit/DetectChanges/Variance/TypeIsCovariantTest.php b/test/unit/DetectChanges/Variance/TypeIsCovariantTest.php index 22ea7bb6..5336775a 100644 --- a/test/unit/DetectChanges/Variance/TypeIsCovariantTest.php +++ b/test/unit/DetectChanges/Variance/TypeIsCovariantTest.php @@ -46,7 +46,7 @@ public function testCovariance( * 2: bool * }> */ - public function checkedTypes(): array + public static function checkedTypes(): array { $reflector = new DefaultReflector(new StringSourceLocator( <<<'PHP' @@ -508,7 +508,7 @@ public function testCovarianceConsidersSameTypeAlwaysCovariant( } /** @return list */ - public function existingTypes(): array + public static function existingTypes(): array { $reflector = new DefaultReflector(new StringSourceLocator( <<<'PHP' @@ -588,7 +588,7 @@ final class OwnerPropertyContainer { private $owner; } } /** @return string[][] */ - public function existingNullableTypeStrings(): array + public static function existingNullableTypeStrings(): array { return [ ['int'], diff --git a/test/unit/Formatter/FunctionNameTest.php b/test/unit/Formatter/FunctionNameTest.php index 548cac7c..2080d805 100644 --- a/test/unit/Formatter/FunctionNameTest.php +++ b/test/unit/Formatter/FunctionNameTest.php @@ -30,7 +30,7 @@ public function testName(ReflectionFunction|ReflectionMethod $function, string $ * 1: string * }> */ - public function functionsToBeTested(): array + public static function functionsToBeTested(): array { $locator = new StringSourceLocator( <<<'PHP' @@ -67,18 +67,18 @@ function e() {} 'N1\b()', ], 'N2\C::d' => [ - $this->getMethod($reflector->reflectClass('N2\C'), 'd'), + self::getMethod($reflector->reflectClass('N2\C'), 'd'), 'N2\C::d()', ], 'N2\C#e' => [ - $this->getMethod($reflector->reflectClass('N2\C'), 'e'), + self::getMethod($reflector->reflectClass('N2\C'), 'e'), 'N2\C#e()', ], ]; } /** @param non-empty-string $name */ - private function getMethod(ReflectionClass $class, string $name): ReflectionMethod + private static function getMethod(ReflectionClass $class, string $name): ReflectionMethod { $method = $class->getMethod($name); diff --git a/test/unit/Formatter/ReflectionPropertyNameTest.php b/test/unit/Formatter/ReflectionPropertyNameTest.php index 7f6fb606..ac72edea 100644 --- a/test/unit/Formatter/ReflectionPropertyNameTest.php +++ b/test/unit/Formatter/ReflectionPropertyNameTest.php @@ -28,7 +28,7 @@ public function testName(ReflectionProperty $property, string $expectedName): vo * @return array> * @psalm-return array */ - public function propertiesToBeTested(): array + public static function propertiesToBeTested(): array { $locator = new StringSourceLocator( <<<'PHP' diff --git a/test/unit/Formatter/SymfonyConsoleTextFormatterTest.php b/test/unit/Formatter/SymfonyConsoleTextFormatterTest.php index 2433ce3d..55f410a4 100644 --- a/test/unit/Formatter/SymfonyConsoleTextFormatterTest.php +++ b/test/unit/Formatter/SymfonyConsoleTextFormatterTest.php @@ -11,7 +11,9 @@ use Roave\BackwardCompatibility\Change; use Roave\BackwardCompatibility\Changes; use Roave\BackwardCompatibility\Formatter\SymfonyConsoleTextFormatter; -use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Output\BufferedOutput; + +use const PHP_EOL; /** @covers \Roave\BackwardCompatibility\Formatter\SymfonyConsoleTextFormatter */ final class SymfonyConsoleTextFormatterTest extends TestCase @@ -22,17 +24,17 @@ public function testWrite(): void $change1Text = SecureRandom\string(8); $change2Text = SecureRandom\string(8); - $output = $this->createMock(OutputInterface::class); - $output->expects(self::exactly(2)) - ->method('writeln') - ->withConsecutive( - [Str\format('[BC] REMOVED: %s', $change1Text)], - [Str\format(' ADDED: %s', $change2Text)], - ); + $output = new BufferedOutput(); (new SymfonyConsoleTextFormatter($output))->write(Changes::fromList( Change::removed($change1Text, true), Change::added($change2Text, false), )); + + self::assertSame( + Str\format('[BC] REMOVED: %s', $change1Text) . PHP_EOL . + Str\format(' ADDED: %s', $change2Text) . PHP_EOL, + $output->fetch(), + ); } } diff --git a/test/unit/Git/GetVersionCollectionFromGitRepositoryTest.php b/test/unit/Git/GetVersionCollectionFromGitRepositoryTest.php index 0fcc73d5..7ac04509 100644 --- a/test/unit/Git/GetVersionCollectionFromGitRepositoryTest.php +++ b/test/unit/Git/GetVersionCollectionFromGitRepositoryTest.php @@ -28,6 +28,8 @@ public function setUp(): void Shell\execute('git', ['init'], $tmpGitRepo); Shell\execute('git', ['config', 'user.email', 'me@example.com'], $tmpGitRepo); Shell\execute('git', ['config', 'user.name', 'Me Again'], $tmpGitRepo); + Shell\execute('git', ['config', 'commit.gpgSign', 'false'], $tmpGitRepo); + Shell\execute('git', ['config', 'tag.forceSignAnnotated', 'false'], $tmpGitRepo); File\write($tmpGitRepo . '/test', SecureRandom\string(8)); Shell\execute('git', ['add', '.'], $tmpGitRepo); Shell\execute('git', ['commit', '-m', '"whatever"'], $tmpGitRepo); diff --git a/test/unit/Git/GitCheckoutRevisionToTemporaryPathTest.php b/test/unit/Git/GitCheckoutRevisionToTemporaryPathTest.php index 3dc50269..7f431fc1 100644 --- a/test/unit/Git/GitCheckoutRevisionToTemporaryPathTest.php +++ b/test/unit/Git/GitCheckoutRevisionToTemporaryPathTest.php @@ -63,6 +63,8 @@ public function testCheckedOutRevisionIsAtExpectedRevisionState(): void Shell\execute('git', ['init'], $repoPath); Shell\execute('git', ['config', 'user.email', 'me@example.com'], $repoPath); Shell\execute('git', ['config', 'user.name', 'Mr Magoo'], $repoPath); + Shell\execute('git', ['config', 'commit.gpgSign', 'false'], $repoPath); + Shell\execute('git', ['config', 'tag.forceSignAnnotated', 'false'], $repoPath); Shell\execute('git', ['commit', '-m', 'initial commit', '--allow-empty'], $repoPath); $firstCommit = Revision::fromSha1( diff --git a/test/unit/Git/GitParseRevisionTest.php b/test/unit/Git/GitParseRevisionTest.php index 5e727205..e269683c 100644 --- a/test/unit/Git/GitParseRevisionTest.php +++ b/test/unit/Git/GitParseRevisionTest.php @@ -12,7 +12,7 @@ final class GitParseRevisionTest extends TestCase { /** @return string[][] */ - public function revisionProvider(): array + public static function revisionProvider(): array { return [ ['e72a47b', 'e72a47bb9d777c9e73c1322d58a83450d36d9454'], diff --git a/test/unit/Git/PickLastVersionFromCollectionTest.php b/test/unit/Git/PickLastVersionFromCollectionTest.php index 952b506c..82058600 100644 --- a/test/unit/Git/PickLastVersionFromCollectionTest.php +++ b/test/unit/Git/PickLastVersionFromCollectionTest.php @@ -20,7 +20,7 @@ final class PickLastVersionFromCollectionTest extends TestCase * @return array>> * @psalm-return array}> */ - public function lastStableVersionForCollectionProvider(): array + public static function lastStableVersionForCollectionProvider(): array { return [ ['2.2.0', ['1.1.0', '2.1.1', '2.2.0', '1.2.1']], diff --git a/test/unit/Git/RevisionTest.php b/test/unit/Git/RevisionTest.php index 68f2fe1a..decef019 100644 --- a/test/unit/Git/RevisionTest.php +++ b/test/unit/Git/RevisionTest.php @@ -33,7 +33,7 @@ public function testFromSha1WithNewlinesStillProvidesValidSha1(): void } /** @return string[][] */ - public function invalidRevisionProvider(): array + public static function invalidRevisionProvider(): array { return [ [''], diff --git a/test/unit/SourceLocator/LocatedSourceWithStrippedSourcesDirectoryTest.php b/test/unit/SourceLocator/LocatedSourceWithStrippedSourcesDirectoryTest.php index ed5c7ae0..e1a02615 100644 --- a/test/unit/SourceLocator/LocatedSourceWithStrippedSourcesDirectoryTest.php +++ b/test/unit/SourceLocator/LocatedSourceWithStrippedSourcesDirectoryTest.php @@ -35,9 +35,9 @@ public function testWillStripPrefixFilePathWhenLocatedSourceInConfiguredPath( ->getFileName(), ); } - + /** @return non-empty-list */ - public function verifiedPaths(): array + public static function verifiedPaths(): array { return [ ['/foo/bar.php', '/foo', '/bar.php'], @@ -46,7 +46,7 @@ public function verifiedPaths(): array ['/foo/bar.php', '', '/foo/bar.php'], ]; } - + public function testWillGetSourcesFromGivenLocatedSource(): void { self::assertSame( @@ -81,7 +81,7 @@ public function testWillReportInternalSourceFromGivenLocatedSource(): void $internalSource ->method('isInternal') ->willReturn(true); - + self::assertFalse( (new LocatedSourceWithStrippedSourcesDirectory( $nonInternalSource, @@ -99,11 +99,11 @@ public function testWillReportInternalSourceFromGivenLocatedSource(): void public function testWillGetExtensionNameFromGivenLocatedSource(): void { $extensionSource = $this->createMock(LocatedSource::class); - + $extensionSource ->method('getExtensionName') ->willReturn('the-extension'); - + self::assertSame( 'the-extension', (new LocatedSourceWithStrippedSourcesDirectory($extensionSource, '/some/source/directory')) @@ -168,16 +168,16 @@ public function testAllMethodsOfOriginalLocatedSourceAreOverridden(ReflectionMet 'Method is re-declared in the subclass', ); } - + /** @return array */ - public function methodsDeclaredByLocatedSource(): array + public static function methodsDeclaredByLocatedSource(): array { $methods = array_filter( (new ReflectionClass(LocatedSourceWithStrippedSourcesDirectory::class)) ->getMethods(), static fn (ReflectionMethod $method): bool => $method->isPublic() && ! $method->isStatic() ); - + return array_combine( array_map(static fn (ReflectionMethod $method): string => $method->getName(), $methods), array_map(static fn (ReflectionMethod $method): array => [$method], $methods), diff --git a/test/unit/SourceLocator/ReplaceSourcePathOfLocatedSourcesTest.php b/test/unit/SourceLocator/ReplaceSourcePathOfLocatedSourcesTest.php index 70abab98..532fbedb 100644 --- a/test/unit/SourceLocator/ReplaceSourcePathOfLocatedSourcesTest.php +++ b/test/unit/SourceLocator/ReplaceSourcePathOfLocatedSourcesTest.php @@ -30,7 +30,7 @@ public function testWillWrapFoundReflection(): void $reflector = $this->createMock(Reflector::class); $source = $this->createMock(LocatedSource::class); $identifier = new Identifier('find-me', new IdentifierType(IdentifierType::IDENTIFIER_CLASS)); - + $next->expects(self::once()) ->method('findReflection') ->with( @@ -39,7 +39,7 @@ public function testWillWrapFoundReflection(): void $identifier, ) ->willReturn($reflection); - + self::assertSame( $reflection, (new ReplaceSourcePathOfLocatedSources($next, '/foo')) @@ -88,7 +88,7 @@ public function testAllMethodsOfBaseClassAreOverridden(ReflectionMethod $method) } /** @return array */ - public function methodsDeclaredByReplaceSourcePathOfLocatedSources(): array + public static function methodsDeclaredByReplaceSourcePathOfLocatedSources(): array { $methods = array_filter( (new ReflectionClass(ReplaceSourcePathOfLocatedSources::class))