From 7d7ea6bc546ef895a11cdd91d974dd6f75be1ad1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 21 Nov 2023 11:54:36 +0000 Subject: [PATCH 1/4] Update dependency phpunit/phpunit to v10 | datasource | package | from | to | | ---------- | --------------- | ------ | ------ | | packagist | phpunit/phpunit | 9.6.13 | 10.4.2 | Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- composer.json | 2 +- composer.lock | 587 ++++++++++++++++++++------------------------------ 2 files changed, 235 insertions(+), 354 deletions(-) diff --git a/composer.json b/composer.json index 963b5bf..9619198 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "composer/composer": "^2.6.4", "laminas/laminas-coding-standard": "~2.5.0", "mikey179/vfsstream": "^1.6.11", - "phpunit/phpunit": "^9.5.26", + "phpunit/phpunit": "^10.4", "psalm/plugin-phpunit": "^0.18.0", "vimeo/psalm": "^5.15.0", "webmozart/assert": "^1.11.0" diff --git a/composer.lock b/composer.lock index fe14401..e961941 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": "e5f5edc3f95ab23e0f2a5a4038c1b2df", + "content-hash": "f3b0c1df4017519d6065dac3c814e01e", "packages": [], "packages-dev": [ { @@ -988,76 +988,6 @@ }, "time": "2019-12-04T15:06:13+00:00" }, - { - "name": "doctrine/instantiator", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9 || ^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.30 || ^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.5.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-12-30T00:15:36+00:00" - }, { "name": "felixfbecker/advanced-json-rpc", "version": "v3.2.1", @@ -1885,16 +1815,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.29", + "version": "10.1.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" + "reference": "84838eed9ded511f61dc3e8b5944a52d9017b297" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/84838eed9ded511f61dc3e8b5944a52d9017b297", + "reference": "84838eed9ded511f61dc3e8b5944a52d9017b297", "shasum": "" }, "require": { @@ -1902,18 +1832,18 @@ "ext-libxml": "*", "ext-xmlwriter": "*", "nikic/php-parser": "^4.15", - "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", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-text-template": "^3.0", + "sebastian/code-unit-reverse-lookup": "^3.0", + "sebastian/complexity": "^3.0", + "sebastian/environment": "^6.0", + "sebastian/lines-of-code": "^2.0", + "sebastian/version": "^4.0", "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.1" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -1922,7 +1852,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "10.1-dev" } }, "autoload": { @@ -1951,7 +1881,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.8" }, "funding": [ { @@ -1959,32 +1889,32 @@ "type": "github" } ], - "time": "2023-09-19T04:57:46+00:00" + "time": "2023-11-15T13:31:15+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" }, "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/a95037b6d9e608ba092da1b23931e537cadc3c3c", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", "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": { @@ -2011,7 +1941,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" }, "funding": [ { @@ -2019,28 +1950,28 @@ "type": "github" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2023-08-31T06:24:48+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": "*" @@ -2048,7 +1979,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2074,7 +2005,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": [ { @@ -2082,32 +2013,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.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" }, "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/0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", "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": { @@ -2133,7 +2064,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" }, "funding": [ { @@ -2141,32 +2073,32 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2023-08-31T14:07:24+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": { @@ -2192,7 +2124,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": [ { @@ -2200,24 +2132,23 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2023-02-03T06:57:52+00:00" }, { "name": "phpunit/phpunit", - "version": "9.6.13", + "version": "10.4.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be" + "reference": "cacd8b9dd224efa8eb28beb69004126c7ca1a1a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/cacd8b9dd224efa8eb28beb69004126c7ca1a1a1", + "reference": "cacd8b9dd224efa8eb28beb69004126c7ca1a1a1", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -2227,27 +2158,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.28", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", - "sebastian/version": "^3.0.2" + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.1.5", + "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.1", + "sebastian/global-state": "^6.0.1", + "sebastian/object-enumerator": "^5.0", + "sebastian/recursion-context": "^5.0", + "sebastian/type": "^4.0", + "sebastian/version": "^4.0" }, "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -2255,7 +2185,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.6-dev" + "dev-main": "10.4-dev" } }, "autoload": { @@ -2287,7 +2217,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.13" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.4.2" }, "funding": [ { @@ -2303,7 +2233,7 @@ "type": "tidelift" } ], - "time": "2023-09-19T05:39:22+00:00" + "time": "2023-10-26T07:21:45+00:00" }, { "name": "psalm/plugin-phpunit", @@ -2543,28 +2473,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": { @@ -2587,7 +2517,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": [ { @@ -2595,32 +2525,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": { @@ -2643,7 +2573,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": [ { @@ -2651,32 +2581,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": { @@ -2698,7 +2628,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": [ { @@ -2706,34 +2636,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.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "2db5010a484d53ebf536087a70b4a5423c102372" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372", + "reference": "2db5010a484d53ebf536087a70b4a5423c102372", "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.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2772,7 +2704,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1" }, "funding": [ { @@ -2780,33 +2713,33 @@ "type": "github" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2023-08-14T13:18:12+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "68cfb347a44871f01e33ab0ef8215966432f6957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68cfb347a44871f01e33ab0ef8215966432f6957", + "reference": "68cfb347a44871f01e33ab0ef8215966432f6957", "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.1-dev" } }, "autoload": { @@ -2829,7 +2762,8 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.1.0" }, "funding": [ { @@ -2837,33 +2771,33 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-09-28T11:50:59+00:00" }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b", + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3", + "phpunit/phpunit": "^10.0", "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2895,7 +2829,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.0.3" }, "funding": [ { @@ -2903,27 +2838,27 @@ "type": "github" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2023-05-01T07:48:21+00:00" }, { "name": "sebastian/environment", - "version": "5.1.5", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/43c751b41d74f96cbbd4e07b7aec9675651e2951", + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-posix": "*" @@ -2931,7 +2866,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -2950,7 +2885,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", @@ -2958,7 +2893,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.0.1" }, "funding": [ { @@ -2966,34 +2902,34 @@ "type": "github" } ], - "time": "2023-02-03T06:03:51+00:00" + "time": "2023-04-11T05:39:26+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/64f51654862e0f5e318db7e9dcc2292c63cdbddc", + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc", "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.1-dev" } }, "autoload": { @@ -3035,7 +2971,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.1" }, "funding": [ { @@ -3043,38 +2980,35 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2023-09-24T13:22:09+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.6", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bde739e7565280bda77be70044ac1047bc007e34" + "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", - "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/7ea9ead78f6d380d2a667864c132c2f7b83055e4", + "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4", "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": { @@ -3099,7 +3033,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.1" }, "funding": [ { @@ -3107,33 +3042,33 @@ "type": "github" } ], - "time": "2023-08-02T09:26:13+00:00" + "time": "2023-07-19T07:19:23+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d" }, "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/649e40d279e243d985aa8fb6e74dd5bb28dc185d", + "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d", "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": { @@ -3156,7 +3091,8 @@ "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" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.1" }, "funding": [ { @@ -3164,34 +3100,34 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-08-31T09:25:50+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": { @@ -3213,7 +3149,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": [ { @@ -3221,32 +3157,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": { @@ -3268,7 +3204,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": [ { @@ -3276,32 +3212,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.5", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "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": { @@ -3331,62 +3267,7 @@ "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.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-02-03T06:07:39+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": [ { @@ -3394,32 +3275,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.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "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": { @@ -3442,7 +3323,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" }, "funding": [ { @@ -3450,29 +3331,29 @@ "type": "github" } ], - "time": "2023-02-03T06:13: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": { @@ -3495,7 +3376,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": [ { @@ -3503,7 +3384,7 @@ "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2023-02-07T11:34:05+00:00" }, { "name": "seld/jsonlint", From 1dc0e3785924647be5c38083a5499e696154b3bc Mon Sep 17 00:00:00 2001 From: Aleksei Khudiakov Date: Wed, 22 Nov 2023 00:33:35 +1000 Subject: [PATCH 2/4] Migrate tests to phpunit 10 Signed-off-by: Aleksei Khudiakov --- test/ComponentInstallerTest.php | 90 ++++++++++++++----- .../AbstractConfigAggregatorTestCase.php | 2 +- .../ConfigDiscovery/ApplicationConfigTest.php | 2 +- .../ConfigDiscovery/DevelopmentConfigTest.php | 2 +- test/ConfigDiscovery/MezzioConfigTest.php | 2 +- test/ConfigDiscovery/ModulesConfigTest.php | 2 +- ...stractConfigAggregatorInjectorTestCase.php | 56 ++++++------ test/Injector/AbstractInjectorTestCase.php | 10 +-- .../ApplicationConfigInjectorTest.php | 10 +-- .../DevelopmentConfigInjectorTest.php | 10 +-- test/Injector/MezzioConfigInjectorTest.php | 48 +++++----- test/Injector/ModulesConfigInjectorTest.php | 10 +-- test/Injector/NoopInjectorTest.php | 2 +- 13 files changed, 147 insertions(+), 99 deletions(-) diff --git a/test/ComponentInstallerTest.php b/test/ComponentInstallerTest.php index 7901534..db2c349 100644 --- a/test/ComponentInstallerTest.php +++ b/test/ComponentInstallerTest.php @@ -22,16 +22,20 @@ use Laminas\ComponentInstaller\ComponentInstaller; use org\bovigo\vfs\vfsStream; use org\bovigo\vfs\vfsStreamDirectory; +use PHPUnit\Framework\Constraint\Constraint; +use PHPUnit\Framework\Constraint\IsAnything; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use ReflectionObject; use function count; +use function current; use function dirname; use function file_get_contents; use function implode; use function method_exists; use function mkdir; +use function next; use function preg_match; use function preg_quote; use function sprintf; @@ -191,20 +195,40 @@ private function createOutputAssertions(array $informations): void $consecutiveArguments = []; foreach ($informations as $information) { - $consecutiveArguments[] = [ - self::callback(static function (string $argument) use ($information): bool { - return preg_match( - sprintf('/%s/', preg_quote($argument, '/')), - $information - ) !== false; - }), - ]; + $consecutiveArguments[] = self::callback(static function (string $argument) use ($information): bool { + return preg_match( + sprintf('/%s/', preg_quote($argument, '/')), + $information + ) !== false; + }); } + $consecutive = new class ($consecutiveArguments) extends Constraint { + /** + * @param list $assertions + */ + public function __construct(private array $assertions) + { + $this->assertions[] = new IsAnything(); + } + + public function matches(mixed $other): bool + { + $assertion = current($this->assertions); + next($this->assertions); + return $assertion->matches($other); + } + + public function toString(): string + { + return current($this->assertions)->toString(); + } + }; + $this->io ->expects(self::exactly(count($consecutiveArguments))) ->method('write') - ->withConsecutive(...$consecutiveArguments); + ->with($consecutive); } /** @@ -214,22 +238,46 @@ private function createInputAssertions(array $questionsAssertions): void { $consecutiveReturnValues = $consecutiveArguments = []; foreach ($questionsAssertions as $questionAssertion) { - $consecutiveArguments[] = [ - self::callback($questionAssertion->assertion()), - ]; + $consecutiveArguments[] = self::callback($questionAssertion->assertion()); $consecutiveReturnValues[] = $questionAssertion->expectedAnswer; if ($questionAssertion instanceof RememberedAnswerQuestionAssertion) { - $consecutiveArguments[] = [self::callback($questionAssertion->rememberAnswerAssertion())]; + $consecutiveArguments[] = self::callback($questionAssertion->rememberAnswerAssertion()); $consecutiveReturnValues[] = $questionAssertion->remember ? 'y' : 'n'; } } + $consecutive = new class ($consecutiveArguments) extends Constraint { + /** + * @param list $assertions + */ + public function __construct(private array $assertions) + { + $this->assertions[] = new IsAnything(); + } + + public function matches(mixed $other): bool + { + $assertion = current($this->assertions); + next($this->assertions); + return $assertion->matches($other); + } + + public function toString(): string + { + return current($this->assertions)->toString(); + } + }; + + $matcher = self::exactly(count($consecutiveReturnValues)); + $this->io - ->expects(self::exactly(count($consecutiveArguments))) + ->expects($matcher) ->method('ask') - ->withConsecutive(...$consecutiveArguments) - ->willReturnOnConsecutiveCalls(...$consecutiveReturnValues); + ->with($consecutive) + ->willReturnCallback(function () use ($matcher, $consecutiveReturnValues) { + return $consecutiveReturnValues[$matcher->numberOfInvocations() - 1]; + }); } /** @@ -332,7 +380,7 @@ public function getModuleDependencies() * 5: null|string * }> */ - public function dependency(): array + public static function dependency(): array { return [ // 'description' => [ @@ -706,7 +754,7 @@ public function getModuleDependencies() * 2: list * }> */ - public function modules(): array + public static function modules(): array { return [ // 'description' => [ @@ -1347,7 +1395,7 @@ public function testAppendModuleAndPrependComponent(): void * 1: array> * }> */ - public function moduleClass(): array + public static function moduleClass(): array { return [ [__DIR__ . '/TestAsset/ModuleBadlyFormatted.php', ['BadlyFormatted\Application' => ['Dependency1']]], @@ -1744,7 +1792,7 @@ public function testOnPostPackageInstallDoesNotPromptForIgnoredPackages(): void * non-empty-string * }> */ - public function injectorConfigProvider(): array + public static function injectorConfigProvider(): array { $config = <<<'CONFIG' * }> */ - public function packageUpdateScenarios(): Generator + public static function packageUpdateScenarios(): Generator { yield 'package introduces module' => [ [], // Initially installed application modules diff --git a/test/ConfigDiscovery/AbstractConfigAggregatorTestCase.php b/test/ConfigDiscovery/AbstractConfigAggregatorTestCase.php index 6d6eefc..018cc7b 100644 --- a/test/ConfigDiscovery/AbstractConfigAggregatorTestCase.php +++ b/test/ConfigDiscovery/AbstractConfigAggregatorTestCase.php @@ -46,7 +46,7 @@ public function testLocateReturnsFalseWhenFileDoesNotHaveExpectedContents(): voi * 0: string * }> */ - public function validMezzioConfigContents(): array + public static function validMezzioConfigContents(): array { // @codingStandardsIgnoreStart return [ diff --git a/test/ConfigDiscovery/ApplicationConfigTest.php b/test/ConfigDiscovery/ApplicationConfigTest.php index ccf64b1..66dfacb 100644 --- a/test/ConfigDiscovery/ApplicationConfigTest.php +++ b/test/ConfigDiscovery/ApplicationConfigTest.php @@ -41,7 +41,7 @@ public function testLocateReturnsFalseWhenFileDoesNotHaveExpectedContents(): voi /** * @psalm-return array */ - public function validApplicationConfigContents(): array + public static function validApplicationConfigContents(): array { return [ 'long-array' => ['<' . "?php\nreturn array(\n 'modules' => array(\n )\n);"], diff --git a/test/ConfigDiscovery/DevelopmentConfigTest.php b/test/ConfigDiscovery/DevelopmentConfigTest.php index c5966b6..00d8148 100644 --- a/test/ConfigDiscovery/DevelopmentConfigTest.php +++ b/test/ConfigDiscovery/DevelopmentConfigTest.php @@ -41,7 +41,7 @@ public function testLocateReturnsFalseWhenFileDoesNotHaveExpectedContents(): voi /** * @psalm-return array */ - public function validDevelopmentConfigContents(): array + public static function validDevelopmentConfigContents(): array { return [ 'long-array' => ['<' . "?php\nreturn array(\n 'modules' => array(\n )\n);"], diff --git a/test/ConfigDiscovery/MezzioConfigTest.php b/test/ConfigDiscovery/MezzioConfigTest.php index 7fc54e3..320f756 100644 --- a/test/ConfigDiscovery/MezzioConfigTest.php +++ b/test/ConfigDiscovery/MezzioConfigTest.php @@ -41,7 +41,7 @@ public function testLocateReturnsFalseWhenFileDoesNotHaveExpectedContents(): voi /** * @psalm-return array */ - public function validMezzioConfigContents(): array + public static function validMezzioConfigContents(): array { // @codingStandardsIgnoreStart return [ diff --git a/test/ConfigDiscovery/ModulesConfigTest.php b/test/ConfigDiscovery/ModulesConfigTest.php index 306777d..cb9dd28 100644 --- a/test/ConfigDiscovery/ModulesConfigTest.php +++ b/test/ConfigDiscovery/ModulesConfigTest.php @@ -41,7 +41,7 @@ public function testLocateReturnsFalseWhenFileDoesNotHaveExpectedContents(): voi /** * @psalm-return array */ - public function validModulesConfigContents(): array + public static function validModulesConfigContents(): array { return [ 'long-array' => ['<' . "?php\nreturn array(\n);"], diff --git a/test/Injector/AbstractConfigAggregatorInjectorTestCase.php b/test/Injector/AbstractConfigAggregatorInjectorTestCase.php index 12b6c31..743ffe7 100644 --- a/test/Injector/AbstractConfigAggregatorInjectorTestCase.php +++ b/test/Injector/AbstractConfigAggregatorInjectorTestCase.php @@ -21,12 +21,12 @@ abstract class AbstractConfigAggregatorInjectorTestCase extends AbstractInjector InjectorInterface::TYPE_CONFIG_PROVIDER, ]; - public function convertToShortArraySyntax(string $contents): string + public static function convertToShortArraySyntax(string $contents): string { return preg_replace('/array\(([^)]+)\)/s', '[$1]', $contents); } - public function allowedTypes(): array + public static function allowedTypes(): array { return [ 'config-provider' => [ConfigAggregatorInjector::TYPE_CONFIG_PROVIDER, true], @@ -35,7 +35,7 @@ public function allowedTypes(): array ]; } - public function injectComponentProvider(): array + public static function injectComponentProvider(): array { // phpcs:disable Generic.Files.LineLength.TooLong $baseContentsFqcnLongArray = file_get_contents(__DIR__ . '/TestAsset/mezzio-application-fqcn.config.php'); @@ -43,20 +43,20 @@ public function injectComponentProvider(): array $baseContentsImportLongArray = file_get_contents(__DIR__ . '/TestAsset/mezzio-application-import.config.php'); $baseContentsImportLongArrayAltIndent = file_get_contents(__DIR__ . '/TestAsset/mezzio-application-import-alt-indent.config.php'); - $baseContentsFqcnShortArray = $this->convertToShortArraySyntax($baseContentsFqcnLongArray); - $baseContentsGloballyQualifiedShortArray = $this->convertToShortArraySyntax($baseContentsGloballyQualifiedLongArray); - $baseContentsImportShortArray = $this->convertToShortArraySyntax($baseContentsImportLongArray); - $baseContentsImportShortArrayAltIndent = $this->convertToShortArraySyntax($baseContentsImportLongArrayAltIndent); + $baseContentsFqcnShortArray = self::convertToShortArraySyntax($baseContentsFqcnLongArray); + $baseContentsGloballyQualifiedShortArray = self::convertToShortArraySyntax($baseContentsGloballyQualifiedLongArray); + $baseContentsImportShortArray = self::convertToShortArraySyntax($baseContentsImportLongArray); + $baseContentsImportShortArrayAltIndent = self::convertToShortArraySyntax($baseContentsImportLongArrayAltIndent); $expectedContentsFqcnLongArray = file_get_contents(__DIR__ . '/TestAsset/mezzio-populated-fqcn.config.php'); $expectedContentsGloballyQualifiedLongArray = file_get_contents(__DIR__ . '/TestAsset/mezzio-populated-globally-qualified.config.php'); $expectedContentsImportLongArray = file_get_contents(__DIR__ . '/TestAsset/mezzio-populated-import.config.php'); $expectedContentsImportLongArrayAltIndent = file_get_contents(__DIR__ . '/TestAsset/mezzio-populated-import-alt-indent.config.php'); - $expectedContentsFqcnShortArray = $this->convertToShortArraySyntax($expectedContentsFqcnLongArray); - $expectedContentsGloballyQualifiedShortArray = $this->convertToShortArraySyntax($expectedContentsGloballyQualifiedLongArray); - $expectedContentsImportShortArray = $this->convertToShortArraySyntax($expectedContentsImportLongArray); - $expectedContentsImportShortArrayAltIndent = $this->convertToShortArraySyntax($expectedContentsImportLongArrayAltIndent); + $expectedContentsFqcnShortArray = self::convertToShortArraySyntax($expectedContentsFqcnLongArray); + $expectedContentsGloballyQualifiedShortArray = self::convertToShortArraySyntax($expectedContentsGloballyQualifiedLongArray); + $expectedContentsImportShortArray = self::convertToShortArraySyntax($expectedContentsImportLongArray); + $expectedContentsImportShortArrayAltIndent = self::convertToShortArraySyntax($expectedContentsImportLongArrayAltIndent); $injectOnlyFirstOccurrenceInitial = file_get_contents(__DIR__ . '/TestAsset/mezzio-with-postprocessor.config.php'); $injectOnlyFirstOccurrenceExpected = file_get_contents(__DIR__ . '/TestAsset/mezzio-with-postprocessor-post-injection.config.php'); @@ -77,16 +77,16 @@ public function injectComponentProvider(): array // phpcs:enable } - public function packageAlreadyRegisteredProvider(): array + public static function packageAlreadyRegisteredProvider(): array { // phpcs:disable Generic.Files.LineLength.TooLong $fqcnLongArray = file_get_contents(__DIR__ . '/TestAsset/mezzio-populated-fqcn.config.php'); $globallyQualifiedLongArray = file_get_contents(__DIR__ . '/TestAsset/mezzio-populated-globally-qualified.config.php'); $importLongArray = file_get_contents(__DIR__ . '/TestAsset/mezzio-populated-import.config.php'); - $fqcnShortArray = $this->convertToShortArraySyntax($fqcnLongArray); - $globallyQualifiedShortArray = $this->convertToShortArraySyntax($globallyQualifiedLongArray); - $importShortArray = $this->convertToShortArraySyntax($importLongArray); + $fqcnShortArray = self::convertToShortArraySyntax($fqcnLongArray); + $globallyQualifiedShortArray = self::convertToShortArraySyntax($globallyQualifiedLongArray); + $importShortArray = self::convertToShortArraySyntax($importLongArray); return [ 'fqcn-long-array' => [$fqcnLongArray, ConfigAggregatorInjector::TYPE_CONFIG_PROVIDER], @@ -99,7 +99,7 @@ public function packageAlreadyRegisteredProvider(): array // phpcs:enable } - public function emptyConfiguration(): array + public static function emptyConfiguration(): array { // phpcs:disable Generic.Files.LineLength.TooLong $fqcnLongArray = file_get_contents(__DIR__ . '/TestAsset/mezzio-empty-fqcn.config.php'); @@ -107,9 +107,9 @@ public function emptyConfiguration(): array $importLongArray = file_get_contents(__DIR__ . '/TestAsset/mezzio-empty-import.config.php'); // phpcs:enable - $fqcnShortArray = $this->convertToShortArraySyntax($fqcnLongArray); - $globallyQualifiedShortArray = $this->convertToShortArraySyntax($globallyQualifiedLongArray); - $importShortArray = $this->convertToShortArraySyntax($importLongArray); + $fqcnShortArray = self::convertToShortArraySyntax($fqcnLongArray); + $globallyQualifiedShortArray = self::convertToShortArraySyntax($globallyQualifiedLongArray); + $importShortArray = self::convertToShortArraySyntax($importLongArray); return [ 'fqcn-long-array' => [$fqcnLongArray], @@ -121,7 +121,7 @@ public function emptyConfiguration(): array ]; } - public function packagePopulatedInConfiguration(): array + public static function packagePopulatedInConfiguration(): array { // phpcs:disable Generic.Files.LineLength.TooLong $baseContentsFqcnLongArray = file_get_contents(__DIR__ . '/TestAsset/mezzio-populated-fqcn.config.php'); @@ -129,20 +129,20 @@ public function packagePopulatedInConfiguration(): array $baseContentsImportLongArray = file_get_contents(__DIR__ . '/TestAsset/mezzio-populated-import.config.php'); $baseContentsImportLongArrayAltIndent = file_get_contents(__DIR__ . '/TestAsset/mezzio-populated-import-alt-indent.config.php'); - $baseContentsFqcnShortArray = $this->convertToShortArraySyntax($baseContentsFqcnLongArray); - $baseContentsGloballyQualifiedShortArray = $this->convertToShortArraySyntax($baseContentsGloballyQualifiedLongArray); - $baseContentsImportShortArray = $this->convertToShortArraySyntax($baseContentsImportLongArray); - $baseContentsImportShortArrayAltIndent = $this->convertToShortArraySyntax($baseContentsImportLongArrayAltIndent); + $baseContentsFqcnShortArray = self::convertToShortArraySyntax($baseContentsFqcnLongArray); + $baseContentsGloballyQualifiedShortArray = self::convertToShortArraySyntax($baseContentsGloballyQualifiedLongArray); + $baseContentsImportShortArray = self::convertToShortArraySyntax($baseContentsImportLongArray); + $baseContentsImportShortArrayAltIndent = self::convertToShortArraySyntax($baseContentsImportLongArrayAltIndent); $expectedContentsFqcnLongArray = file_get_contents(__DIR__ . '/TestAsset/mezzio-application-fqcn.config.php'); $expectedContentsGloballyQualifiedLongArray = file_get_contents(__DIR__ . '/TestAsset/mezzio-application-globally-qualified.config.php'); $expectedContentsImportLongArray = file_get_contents(__DIR__ . '/TestAsset/mezzio-application-import.config.php'); $expectedContentsImportLongArrayAltIndent = file_get_contents(__DIR__ . '/TestAsset/mezzio-application-import-alt-indent.config.php'); - $expectedContentsFqcnShortArray = $this->convertToShortArraySyntax($expectedContentsFqcnLongArray); - $expectedContentsGloballyQualifiedShortArray = $this->convertToShortArraySyntax($expectedContentsGloballyQualifiedLongArray); - $expectedContentsImportShortArray = $this->convertToShortArraySyntax($expectedContentsImportLongArray); - $expectedContentsImportShortArrayAltIndent = $this->convertToShortArraySyntax($expectedContentsImportLongArrayAltIndent); + $expectedContentsFqcnShortArray = self::convertToShortArraySyntax($expectedContentsFqcnLongArray); + $expectedContentsGloballyQualifiedShortArray = self::convertToShortArraySyntax($expectedContentsGloballyQualifiedLongArray); + $expectedContentsImportShortArray = self::convertToShortArraySyntax($expectedContentsImportLongArray); + $expectedContentsImportShortArrayAltIndent = self::convertToShortArraySyntax($expectedContentsImportLongArrayAltIndent); return [ 'fqcn-long-array' => [$baseContentsFqcnLongArray, $expectedContentsFqcnLongArray], diff --git a/test/Injector/AbstractInjectorTestCase.php b/test/Injector/AbstractInjectorTestCase.php index 295d4d7..806801b 100644 --- a/test/Injector/AbstractInjectorTestCase.php +++ b/test/Injector/AbstractInjectorTestCase.php @@ -52,7 +52,7 @@ protected function setUp(): void * * @psalm-return array */ - abstract public function allowedTypes(): array; + abstract public static function allowedTypes(): array; /** * @psalm-param InjectorInterface::TYPE_* $type @@ -71,7 +71,7 @@ public function testGetTypesAllowedReturnsListOfAllExpectedTypes(): void /** * @psalm-return array */ - abstract public function injectComponentProvider(): array; + abstract public static function injectComponentProvider(): array; /** * @psalm-param InjectorInterface::TYPE_* $type @@ -96,7 +96,7 @@ public function testInjectAddsPackageToModulesListInAppropriateLocation( /** * @psalm-return array */ - abstract public function packageAlreadyRegisteredProvider(): array; + abstract public static function packageAlreadyRegisteredProvider(): array; /** * @param InjectorInterface::TYPE_* $type @@ -118,7 +118,7 @@ public function testInjectDoesNotModifyContentsIfPackageIsAlreadyRegistered(stri /** * @psalm-return array */ - abstract public function emptyConfiguration(): array; + abstract public static function emptyConfiguration(): array; /** * @dataProvider emptyConfiguration @@ -136,7 +136,7 @@ public function testRemoveDoesNothingIfPackageIsNotInConfigFile(string $contents /** * @psalm-return array */ - abstract public function packagePopulatedInConfiguration(): array; + abstract public static function packagePopulatedInConfiguration(): array; /** * @dataProvider packagePopulatedInConfiguration diff --git a/test/Injector/ApplicationConfigInjectorTest.php b/test/Injector/ApplicationConfigInjectorTest.php index 2409711..a4ea692 100644 --- a/test/Injector/ApplicationConfigInjectorTest.php +++ b/test/Injector/ApplicationConfigInjectorTest.php @@ -29,7 +29,7 @@ class ApplicationConfigInjectorTest extends AbstractInjectorTestCase InjectorInterface::TYPE_BEFORE_APPLICATION, ]; - public function allowedTypes(): array + public static function allowedTypes(): array { return [ 'config-provider' => [InjectorInterface::TYPE_CONFIG_PROVIDER, false], @@ -40,7 +40,7 @@ public function allowedTypes(): array ]; } - public function injectComponentProvider(): array + public static function injectComponentProvider(): array { // phpcs:disable Generic.Files.LineLength.TooLong $baseContentsLongArray = '<' . "?php\nreturn array(\n 'modules' => array(\n 'Application',\n )\n);"; @@ -54,7 +54,7 @@ public function injectComponentProvider(): array // phpcs:enable } - public function packageAlreadyRegisteredProvider(): array + public static function packageAlreadyRegisteredProvider(): array { // phpcs:disable Generic.Files.LineLength.TooLong return [ @@ -67,7 +67,7 @@ public function packageAlreadyRegisteredProvider(): array // phpcs:enable } - public function emptyConfiguration(): array + public static function emptyConfiguration(): array { // phpcs:disable Generic.Files.LineLength.TooLong $baseContentsLongArray = '<' . "?php\nreturn array(\n 'modules' => array(\n 'Application',\n )\n);"; @@ -80,7 +80,7 @@ public function emptyConfiguration(): array ]; } - public function packagePopulatedInConfiguration(): array + public static function packagePopulatedInConfiguration(): array { // phpcs:disable Generic.Files.LineLength.TooLong $baseContentsLongArray = '<' . "?php\nreturn array(\n 'modules' => array(\n 'Application',\n )\n);"; diff --git a/test/Injector/DevelopmentConfigInjectorTest.php b/test/Injector/DevelopmentConfigInjectorTest.php index 8c9be5c..c3c4e7f 100644 --- a/test/Injector/DevelopmentConfigInjectorTest.php +++ b/test/Injector/DevelopmentConfigInjectorTest.php @@ -29,7 +29,7 @@ class DevelopmentConfigInjectorTest extends AbstractInjectorTestCase InjectorInterface::TYPE_BEFORE_APPLICATION, ]; - public function allowedTypes(): array + public static function allowedTypes(): array { return [ 'config-provider' => [InjectorInterface::TYPE_CONFIG_PROVIDER, false], @@ -40,7 +40,7 @@ public function allowedTypes(): array ]; } - public function injectComponentProvider(): array + public static function injectComponentProvider(): array { // phpcs:disable Generic.Files.LineLength.TooLong $baseContentsLongArray = '<' . "?php\nreturn array(\n 'modules' => array(\n 'Application',\n )\n);"; @@ -54,7 +54,7 @@ public function injectComponentProvider(): array // phpcs:enable } - public function packageAlreadyRegisteredProvider(): array + public static function packageAlreadyRegisteredProvider(): array { // phpcs:disable Generic.Files.LineLength.TooLong return [ @@ -66,7 +66,7 @@ public function packageAlreadyRegisteredProvider(): array // phpcs:enable } - public function emptyConfiguration(): array + public static function emptyConfiguration(): array { // phpcs:disable Generic.Files.LineLength.TooLong $baseContentsLongArray = '<' . "?php\nreturn array(\n 'modules' => array(\n 'Application',\n )\n);"; @@ -79,7 +79,7 @@ public function emptyConfiguration(): array ]; } - public function packagePopulatedInConfiguration(): array + public static function packagePopulatedInConfiguration(): array { // phpcs:disable Generic.Files.LineLength.TooLong $baseContentsLongArray = '<' . "?php\nreturn array(\n 'modules' => array(\n 'Application',\n )\n);"; diff --git a/test/Injector/MezzioConfigInjectorTest.php b/test/Injector/MezzioConfigInjectorTest.php index b7af6f7..826660e 100644 --- a/test/Injector/MezzioConfigInjectorTest.php +++ b/test/Injector/MezzioConfigInjectorTest.php @@ -29,12 +29,12 @@ class MezzioConfigInjectorTest extends AbstractInjectorTestCase InjectorInterface::TYPE_CONFIG_PROVIDER, ]; - public function convertToShortArraySyntax(string $contents): string + public static function convertToShortArraySyntax(string $contents): string { return preg_replace('/array\(([^)]+)\)/s', '[$1]', $contents); } - public function allowedTypes(): array + public static function allowedTypes(): array { return [ 'config-provider' => [InjectorInterface::TYPE_CONFIG_PROVIDER, true], @@ -43,24 +43,24 @@ public function allowedTypes(): array ]; } - public function injectComponentProvider(): array + public static function injectComponentProvider(): array { // phpcs:disable Generic.Files.LineLength.TooLong $baseContentsFqcnLongArray = file_get_contents(__DIR__ . '/TestAsset/legacy-mezzio-application-fqcn.config.php'); $baseContentsGloballyQualifiedLongArray = file_get_contents(__DIR__ . '/TestAsset/legacy-mezzio-application-globally-qualified.config.php'); $baseContentsImportLongArray = file_get_contents(__DIR__ . '/TestAsset/legacy-mezzio-application-import.config.php'); - $baseContentsFqcnShortArray = $this->convertToShortArraySyntax($baseContentsFqcnLongArray); - $baseContentsGloballyQualifiedShortArray = $this->convertToShortArraySyntax($baseContentsGloballyQualifiedLongArray); - $baseContentsImportShortArray = $this->convertToShortArraySyntax($baseContentsImportLongArray); + $baseContentsFqcnShortArray = self::convertToShortArraySyntax($baseContentsFqcnLongArray); + $baseContentsGloballyQualifiedShortArray = self::convertToShortArraySyntax($baseContentsGloballyQualifiedLongArray); + $baseContentsImportShortArray = self::convertToShortArraySyntax($baseContentsImportLongArray); $expectedContentsFqcnLongArray = file_get_contents(__DIR__ . '/TestAsset/legacy-mezzio-populated-fqcn.config.php'); $expectedContentsGloballyQualifiedLongArray = file_get_contents(__DIR__ . '/TestAsset/legacy-mezzio-populated-globally-qualified.config.php'); $expectedContentsImportLongArray = file_get_contents(__DIR__ . '/TestAsset/legacy-mezzio-populated-import.config.php'); - $expectedContentsFqcnShortArray = $this->convertToShortArraySyntax($expectedContentsFqcnLongArray); - $expectedContentsGloballyQualifiedShortArray = $this->convertToShortArraySyntax($expectedContentsGloballyQualifiedLongArray); - $expectedContentsImportShortArray = $this->convertToShortArraySyntax($expectedContentsImportLongArray); + $expectedContentsFqcnShortArray = self::convertToShortArraySyntax($expectedContentsFqcnLongArray); + $expectedContentsGloballyQualifiedShortArray = self::convertToShortArraySyntax($expectedContentsGloballyQualifiedLongArray); + $expectedContentsImportShortArray = self::convertToShortArraySyntax($expectedContentsImportLongArray); return [ 'fqcn-long-array' => [InjectorInterface::TYPE_CONFIG_PROVIDER, $baseContentsFqcnLongArray, $expectedContentsFqcnLongArray], @@ -73,16 +73,16 @@ public function injectComponentProvider(): array // phpcs:enable } - public function packageAlreadyRegisteredProvider(): array + public static function packageAlreadyRegisteredProvider(): array { // phpcs:disable Generic.Files.LineLength.TooLong $fqcnLongArray = file_get_contents(__DIR__ . '/TestAsset/legacy-mezzio-populated-fqcn.config.php'); $globallyQualifiedLongArray = file_get_contents(__DIR__ . '/TestAsset/legacy-mezzio-populated-globally-qualified.config.php'); $importLongArray = file_get_contents(__DIR__ . '/TestAsset/legacy-mezzio-populated-import.config.php'); - $fqcnShortArray = $this->convertToShortArraySyntax($fqcnLongArray); - $globallyQualifiedShortArray = $this->convertToShortArraySyntax($globallyQualifiedLongArray); - $importShortArray = $this->convertToShortArraySyntax($importLongArray); + $fqcnShortArray = self::convertToShortArraySyntax($fqcnLongArray); + $globallyQualifiedShortArray = self::convertToShortArraySyntax($globallyQualifiedLongArray); + $importShortArray = self::convertToShortArraySyntax($importLongArray); return [ 'fqcn-long-array' => [$fqcnLongArray, InjectorInterface::TYPE_CONFIG_PROVIDER], @@ -95,7 +95,7 @@ public function packageAlreadyRegisteredProvider(): array // phpcs:enable } - public function emptyConfiguration(): array + public static function emptyConfiguration(): array { // phpcs:disable Generic.Files.LineLength.TooLong $fqcnLongArray = file_get_contents(__DIR__ . '/TestAsset/legacy-mezzio-empty-fqcn.config.php'); @@ -103,9 +103,9 @@ public function emptyConfiguration(): array $importLongArray = file_get_contents(__DIR__ . '/TestAsset/legacy-mezzio-empty-import.config.php'); // phpcs:enable - $fqcnShortArray = $this->convertToShortArraySyntax($fqcnLongArray); - $globallyQualifiedShortArray = $this->convertToShortArraySyntax($globallyQualifiedLongArray); - $importShortArray = $this->convertToShortArraySyntax($importLongArray); + $fqcnShortArray = self::convertToShortArraySyntax($fqcnLongArray); + $globallyQualifiedShortArray = self::convertToShortArraySyntax($globallyQualifiedLongArray); + $importShortArray = self::convertToShortArraySyntax($importLongArray); return [ 'fqcn-long-array' => [$fqcnLongArray], @@ -117,24 +117,24 @@ public function emptyConfiguration(): array ]; } - public function packagePopulatedInConfiguration(): array + public static function packagePopulatedInConfiguration(): array { // phpcs:disable Generic.Files.LineLength.TooLong $baseContentsFqcnLongArray = file_get_contents(__DIR__ . '/TestAsset/legacy-mezzio-populated-fqcn.config.php'); $baseContentsGloballyQualifiedLongArray = file_get_contents(__DIR__ . '/TestAsset/legacy-mezzio-populated-globally-qualified.config.php'); $baseContentsImportLongArray = file_get_contents(__DIR__ . '/TestAsset/legacy-mezzio-populated-import.config.php'); - $baseContentsFqcnShortArray = $this->convertToShortArraySyntax($baseContentsFqcnLongArray); - $baseContentsGloballyQualifiedShortArray = $this->convertToShortArraySyntax($baseContentsGloballyQualifiedLongArray); - $baseContentsImportShortArray = $this->convertToShortArraySyntax($baseContentsImportLongArray); + $baseContentsFqcnShortArray = self::convertToShortArraySyntax($baseContentsFqcnLongArray); + $baseContentsGloballyQualifiedShortArray = self::convertToShortArraySyntax($baseContentsGloballyQualifiedLongArray); + $baseContentsImportShortArray = self::convertToShortArraySyntax($baseContentsImportLongArray); $expectedContentsFqcnLongArray = file_get_contents(__DIR__ . '/TestAsset/legacy-mezzio-application-fqcn.config.php'); $expectedContentsGloballyQualifiedLongArray = file_get_contents(__DIR__ . '/TestAsset/legacy-mezzio-application-globally-qualified.config.php'); $expectedContentsImportLongArray = file_get_contents(__DIR__ . '/TestAsset/legacy-mezzio-application-import.config.php'); - $expectedContentsFqcnShortArray = $this->convertToShortArraySyntax($expectedContentsFqcnLongArray); - $expectedContentsGloballyQualifiedShortArray = $this->convertToShortArraySyntax($expectedContentsGloballyQualifiedLongArray); - $expectedContentsImportShortArray = $this->convertToShortArraySyntax($expectedContentsImportLongArray); + $expectedContentsFqcnShortArray = self::convertToShortArraySyntax($expectedContentsFqcnLongArray); + $expectedContentsGloballyQualifiedShortArray = self::convertToShortArraySyntax($expectedContentsGloballyQualifiedLongArray); + $expectedContentsImportShortArray = self::convertToShortArraySyntax($expectedContentsImportLongArray); return [ 'fqcn-long-array' => [$baseContentsFqcnLongArray, $expectedContentsFqcnLongArray], diff --git a/test/Injector/ModulesConfigInjectorTest.php b/test/Injector/ModulesConfigInjectorTest.php index 10f56d1..b6dd83c 100644 --- a/test/Injector/ModulesConfigInjectorTest.php +++ b/test/Injector/ModulesConfigInjectorTest.php @@ -29,7 +29,7 @@ class ModulesConfigInjectorTest extends AbstractInjectorTestCase InjectorInterface::TYPE_BEFORE_APPLICATION, ]; - public function allowedTypes(): array + public static function allowedTypes(): array { return [ 'config-provider' => [InjectorInterface::TYPE_CONFIG_PROVIDER, false], @@ -40,7 +40,7 @@ public function allowedTypes(): array ]; } - public function injectComponentProvider(): array + public static function injectComponentProvider(): array { // phpcs:disable Generic.Files.LineLength.TooLong $baseContentsLongArray = '<' . "?php\nreturn array(\n 'Application',\n);"; @@ -54,7 +54,7 @@ public function injectComponentProvider(): array // phpcs:enable } - public function packageAlreadyRegisteredProvider(): array + public static function packageAlreadyRegisteredProvider(): array { // phpcs:disable Generic.Files.LineLength.TooLong return [ @@ -66,7 +66,7 @@ public function packageAlreadyRegisteredProvider(): array // phpcs:enable } - public function emptyConfiguration(): array + public static function emptyConfiguration(): array { $baseContentsLongArray = '<' . "?php\nreturn array(\n 'Application',\n);"; $baseContentsShortArray = '<' . "?php\nreturn [\n 'Application',\n];"; @@ -77,7 +77,7 @@ public function emptyConfiguration(): array ]; } - public function packagePopulatedInConfiguration(): array + public static function packagePopulatedInConfiguration(): array { $baseContentsLongArray = '<' . "?php\nreturn array(\n 'Application',\n);"; $baseContentsShortArray = '<' . "?php\nreturn [\n 'Application',\n];"; diff --git a/test/Injector/NoopInjectorTest.php b/test/Injector/NoopInjectorTest.php index 73ce6df..e657101 100644 --- a/test/Injector/NoopInjectorTest.php +++ b/test/Injector/NoopInjectorTest.php @@ -34,7 +34,7 @@ public function testGetTypesAllowedReturnsNoTypes(): void /** * @psalm-return array */ - public function packageTypes(): array + public static function packageTypes(): array { return [ 'config-provider' => [NoopInjector::TYPE_CONFIG_PROVIDER], From 1909ba241b2a19c0453b65023ef8ab66dcbf50d7 Mon Sep 17 00:00:00 2001 From: Aleksei Khudiakov Date: Wed, 22 Nov 2023 00:36:56 +1000 Subject: [PATCH 3/4] Migrate phpunit configuration Signed-off-by: Aleksei Khudiakov --- .gitignore | 2 +- phpunit.xml.dist | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index d5189bd..45fd006 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ /.phpcs-cache -/.phpunit.result.cache +/.phpunit.cache /.psalm-cache/ /clover.xml /coveralls-upload.json diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 5cb9049..e39b9e5 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -3,17 +3,24 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" bootstrap="vendor/autoload.php" - convertDeprecationsToExceptions="true" - colors="true"> + cacheDirectory=".phpunit.cache" + displayDetailsOnIncompleteTests="true" + displayDetailsOnSkippedTests="true" + displayDetailsOnTestsThatTriggerDeprecations="true" + displayDetailsOnTestsThatTriggerErrors="true" + displayDetailsOnTestsThatTriggerNotices="true" + displayDetailsOnTestsThatTriggerWarnings="true" + colors="true" +> ./test - + src - + From f5b50a7a78811e52468833de36d1d0a5f7d0cc15 Mon Sep 17 00:00:00 2001 From: Aleksei Khudiakov Date: Wed, 22 Nov 2023 00:38:57 +1000 Subject: [PATCH 4/4] Update psalm baseline Signed-off-by: Aleksei Khudiakov --- psalm-baseline.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index eb20cac..b6deee2 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -72,12 +72,6 @@ __construct - - - withConsecutive - withConsecutive - - new Collection([