diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index e4529696..f2305794 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -19,6 +19,8 @@ jobs: - "development" php-version: - "8.1" + - "8.2" + - "8.3" operating-system: - "ubuntu-latest" @@ -73,7 +75,7 @@ jobs: dependencies: - "locked" php-version: - - "8.2" + - "8.4" operating-system: - "ubuntu-latest" diff --git a/.gitignore b/.gitignore index 1822a153..2bba3150 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ /vendor/ -/.phpcs.cache +/*.cache /infection.log -/.phpunit.result.cache /build diff --git a/composer.json b/composer.json index e7b3a44a..ae3805a3 100644 --- a/composer.json +++ b/composer.json @@ -10,18 +10,18 @@ } ], "require": { - "php": "~8.1.0 || ~8.2.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", "ext-json": "*", "fig/http-message-util": "^1.1.5", "psr/http-factory": "^1.0.2", - "psr/http-message": "^1.1.0", + "psr/http-message": "^1.1 || ^2.0", "psr/http-server-middleware": "^1.0.2" }, "require-dev": { "infection/infection": "^0.27", "jms/serializer": "^3.26.0", "laminas/laminas-diactoros": "^3.0.0", - "lcobucci/coding-standard": "^9.0", + "lcobucci/coding-standard": "^11.0", "league/plates": "^3.5.0", "middlewares/negotiation": "^2.1", "phpstan/extension-installer": "^1.3.1", @@ -29,7 +29,7 @@ "phpstan/phpstan-deprecation-rules": "^1.1.3", "phpstan/phpstan-phpunit": "^1.3.13", "phpstan/phpstan-strict-rules": "^1.5.1", - "phpunit/phpunit": "^9.6.9", + "phpunit/phpunit": "^10.4", "twig/twig": "^3.6.1" }, "suggest": { diff --git a/composer.lock b/composer.lock index 56f73699..7f7e09c4 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": "1ad9a507fbf00bfc5dc29906114ce93a", + "content-hash": "62ff53f1aeeedaefae0dd0c4d2f64732", "packages": [ { "name": "fig/http-message-util", @@ -515,35 +515,38 @@ }, { "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.2", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" + "url": "https://github.com/PHPCSStandards/composer-installer.git", + "reference": "4be43904336affa5c2f70744a348312336afd0da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da", + "reference": "4be43904336affa5c2f70744a348312336afd0da", "shasum": "" }, "require": { "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.3", + "php": ">=5.4", "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" }, "require-dev": { "composer/composer": "*", + "ext-json": "*", + "ext-zip": "*", "php-parallel-lint/php-parallel-lint": "^1.3.1", - "phpcompatibility/php-compatibility": "^9.0" + "phpcompatibility/php-compatibility": "^9.0", + "yoast/phpunit-polyfills": "^1.0" }, "type": "composer-plugin", "extra": { - "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" }, "autoload": { "psr-4": { - "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -559,7 +562,7 @@ }, { "name": "Contributors", - "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" + "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors" } ], "description": "PHP_CodeSniffer Standards Composer Installer Plugin", @@ -583,10 +586,10 @@ "tests" ], "support": { - "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", - "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + "issues": "https://github.com/PHPCSStandards/composer-installer/issues", + "source": "https://github.com/PHPCSStandards/composer-installer" }, - "time": "2022-02-04T12:51:07+00:00" + "time": "2023-01-05T11:28:13+00:00" }, { "name": "doctrine/annotations", @@ -666,22 +669,22 @@ }, { "name": "doctrine/coding-standard", - "version": "10.0.0", + "version": "12.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/coding-standard.git", - "reference": "7903671d7d33c231c8921058b7c14b8f57cbacb7" + "reference": "1b2b7dc58c68833af481fb9325c25abd40681c79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/coding-standard/zipball/7903671d7d33c231c8921058b7c14b8f57cbacb7", - "reference": "7903671d7d33c231c8921058b7c14b8f57cbacb7", + "url": "https://api.github.com/repos/doctrine/coding-standard/zipball/1b2b7dc58c68833af481fb9325c25abd40681c79", + "reference": "1b2b7dc58c68833af481fb9325c25abd40681c79", "shasum": "" }, "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0.0", "php": "^7.2 || ^8.0", - "slevomat/coding-standard": "^8.2", + "slevomat/coding-standard": "^8.11", "squizlabs/php_codesniffer": "^3.7" }, "type": "phpcodesniffer-standard", @@ -706,6 +709,7 @@ "code", "coding", "cs", + "dev", "doctrine", "rules", "sniffer", @@ -715,9 +719,9 @@ ], "support": { "issues": "https://github.com/doctrine/coding-standard/issues", - "source": "https://github.com/doctrine/coding-standard/tree/10.0.0" + "source": "https://github.com/doctrine/coding-standard/tree/12.0.0" }, - "time": "2022-08-26T10:53:05+00:00" + "time": "2023-04-24T17:43:28+00:00" }, { "name": "doctrine/instantiator", @@ -1553,21 +1557,21 @@ }, { "name": "lcobucci/coding-standard", - "version": "9.0.0", + "version": "11.0.0", "source": { "type": "git", "url": "https://github.com/lcobucci/coding-standard.git", - "reference": "423695a885f24d98bc46c075b778b85e554ce6b3" + "reference": "439181c5ac83c92cbeca86324eaef992296a2efc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/coding-standard/zipball/423695a885f24d98bc46c075b778b85e554ce6b3", - "reference": "423695a885f24d98bc46c075b778b85e554ce6b3", + "url": "https://api.github.com/repos/lcobucci/coding-standard/zipball/439181c5ac83c92cbeca86324eaef992296a2efc", + "reference": "439181c5ac83c92cbeca86324eaef992296a2efc", "shasum": "" }, "require": { - "doctrine/coding-standard": "^10.0", - "php": "^8.1" + "doctrine/coding-standard": "^12.0.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0" }, "require-dev": { "roave/security-advisories": "dev-latest" @@ -1586,7 +1590,7 @@ "description": "Lcobucci's Coding Standard", "support": { "issues": "https://github.com/lcobucci/coding-standard/issues", - "source": "https://github.com/lcobucci/coding-standard/tree/9.0.0" + "source": "https://github.com/lcobucci/coding-standard/tree/11.0.0" }, "funding": [ { @@ -1598,7 +1602,7 @@ "type": "patreon" } ], - "time": "2022-09-13T20:21:34+00:00" + "time": "2023-07-30T21:10:00+00:00" }, { "name": "league/plates", @@ -2133,16 +2137,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.23.1", + "version": "1.24.3", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26" + "reference": "12f01d214f1c73b9c91fdb3b1c415e4c70652083" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/846ae76eef31c6d7790fac9bc399ecee45160b26", - "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/12f01d214f1c73b9c91fdb3b1c415e4c70652083", + "reference": "12f01d214f1c73b9c91fdb3b1c415e4c70652083", "shasum": "" }, "require": { @@ -2174,9 +2178,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.23.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.3" }, - "time": "2023-08-03T16:32:59+00:00" + "time": "2023-11-18T20:15:32+00:00" }, { "name": "phpstan/phpstan", @@ -2391,16 +2395,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": { @@ -2408,18 +2412,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", @@ -2428,7 +2432,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "10.1-dev" } }, "autoload": { @@ -2457,7 +2461,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": [ { @@ -2465,32 +2469,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": { @@ -2517,7 +2521,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": [ { @@ -2525,28 +2530,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": "*" @@ -2554,7 +2559,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2580,7 +2585,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": [ { @@ -2588,32 +2593,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": { @@ -2639,7 +2644,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": [ { @@ -2647,32 +2653,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": { @@ -2698,7 +2704,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": [ { @@ -2706,24 +2712,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": "*", @@ -2733,27 +2738,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" @@ -2761,7 +2765,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.6-dev" + "dev-main": "10.4-dev" } }, "autoload": { @@ -2793,7 +2797,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": [ { @@ -2809,7 +2813,7 @@ "type": "tidelift" } ], - "time": "2023-09-19T05:39:22+00:00" + "time": "2023-10-26T07:21:45+00:00" }, { "name": "psr/cache", @@ -3094,28 +3098,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": { @@ -3138,7 +3142,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": [ { @@ -3146,32 +3150,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": { @@ -3194,7 +3198,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": [ { @@ -3202,32 +3206,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": { @@ -3249,7 +3253,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": [ { @@ -3257,34 +3261,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": { @@ -3323,7 +3329,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": [ { @@ -3331,33 +3338,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": { @@ -3380,7 +3387,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": [ { @@ -3388,33 +3396,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": { @@ -3446,7 +3454,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": [ { @@ -3454,27 +3463,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": "*" @@ -3482,7 +3491,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -3501,7 +3510,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", @@ -3509,7 +3518,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": [ { @@ -3517,34 +3527,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": { @@ -3586,7 +3596,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": [ { @@ -3594,38 +3605,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": { @@ -3650,7 +3658,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": [ { @@ -3658,33 +3667,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": { @@ -3707,7 +3716,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": [ { @@ -3715,34 +3725,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": { @@ -3764,7 +3774,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": [ { @@ -3772,32 +3782,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": { @@ -3819,7 +3829,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": [ { @@ -3827,32 +3837,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": { @@ -3882,62 +3892,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": [ { @@ -3945,32 +3900,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": { @@ -3993,7 +3948,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": [ { @@ -4001,29 +3956,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": { @@ -4046,7 +4001,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": [ { @@ -4054,36 +4009,36 @@ "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2023-02-07T11:34:05+00:00" }, { "name": "slevomat/coding-standard", - "version": "8.13.1", + "version": "8.14.1", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "a13c15e20f2d307a1ca8dec5313ec462a4466470" + "reference": "fea1fd6f137cc84f9cba0ae30d549615dbc6a926" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/a13c15e20f2d307a1ca8dec5313ec462a4466470", - "reference": "a13c15e20f2d307a1ca8dec5313ec462a4466470", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/fea1fd6f137cc84f9cba0ae30d549615dbc6a926", + "reference": "fea1fd6f137cc84f9cba0ae30d549615dbc6a926", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0", "php": "^7.2 || ^8.0", - "phpstan/phpdoc-parser": "^1.22.0", + "phpstan/phpdoc-parser": "^1.23.1", "squizlabs/php_codesniffer": "^3.7.1" }, "require-dev": { "phing/phing": "2.17.4", "php-parallel-lint/php-parallel-lint": "1.3.2", - "phpstan/phpstan": "1.10.21", - "phpstan/phpstan-deprecation-rules": "1.1.3", - "phpstan/phpstan-phpunit": "1.3.13", + "phpstan/phpstan": "1.10.37", + "phpstan/phpstan-deprecation-rules": "1.1.4", + "phpstan/phpstan-phpunit": "1.3.14", "phpstan/phpstan-strict-rules": "1.5.1", - "phpunit/phpunit": "7.5.20|8.5.21|9.6.8|10.2.2" + "phpunit/phpunit": "8.5.21|9.6.8|10.3.5" }, "type": "phpcodesniffer-standard", "extra": { @@ -4107,7 +4062,7 @@ ], "support": { "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/8.13.1" + "source": "https://github.com/slevomat/coding-standard/tree/8.14.1" }, "funding": [ { @@ -4119,7 +4074,7 @@ "type": "tidelift" } ], - "time": "2023-06-25T12:52:34+00:00" + "time": "2023-10-08T07:28:08+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -4180,16 +4135,16 @@ }, { "name": "symfony/console", - "version": "v6.3.4", + "version": "v6.3.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6" + "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/eca495f2ee845130855ddf1cf18460c38966c8b6", - "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6", + "url": "https://api.github.com/repos/symfony/console/zipball/0d14a9f6d04d4ac38a8cea1171f4554e325dae92", + "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92", "shasum": "" }, "require": { @@ -4250,7 +4205,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.3.4" + "source": "https://github.com/symfony/console/tree/v6.3.8" }, "funding": [ { @@ -4266,11 +4221,11 @@ "type": "tidelift" } ], - "time": "2023-08-16T10:10:12+00:00" + "time": "2023-10-31T08:09:35+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", @@ -4317,7 +4272,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.3.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" }, "funding": [ { @@ -4938,16 +4893,16 @@ }, { "name": "symfony/service-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" + "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", - "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/b3313c2dbffaf71c8de2934e2ea56ed2291a3838", + "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838", "shasum": "" }, "require": { @@ -5000,7 +4955,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.4.0" }, "funding": [ { @@ -5016,20 +4971,20 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2023-07-30T20:28:31+00:00" }, { "name": "symfony/string", - "version": "v6.3.5", + "version": "v6.3.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339" + "reference": "13880a87790c76ef994c91e87efb96134522577a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339", - "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339", + "url": "https://api.github.com/repos/symfony/string/zipball/13880a87790c76ef994c91e87efb96134522577a", + "reference": "13880a87790c76ef994c91e87efb96134522577a", "shasum": "" }, "require": { @@ -5086,7 +5041,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.5" + "source": "https://github.com/symfony/string/tree/v6.3.8" }, "funding": [ { @@ -5102,7 +5057,7 @@ "type": "tidelift" } ], - "time": "2023-09-18T10:38:32+00:00" + "time": "2023-11-09T08:28:21+00:00" }, { "name": "thecodingmachine/safe", @@ -5245,16 +5200,16 @@ }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", "shasum": "" }, "require": { @@ -5283,7 +5238,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.2" }, "funding": [ { @@ -5291,7 +5246,7 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2023-11-20T00:12:19+00:00" }, { "name": "twig/twig", @@ -5486,7 +5441,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "~8.1.0 || ~8.2.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", "ext-json": "*" }, "platform-dev": [], diff --git a/phpunit.xml.dist b/phpunit.xml.dist index bb8fb303..acab431e 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -3,22 +3,21 @@ - + src - + diff --git a/src/ContentTypeMiddleware.php b/src/ContentTypeMiddleware.php index 784ba90f..355a4aaa 100644 --- a/src/ContentTypeMiddleware.php +++ b/src/ContentTypeMiddleware.php @@ -41,7 +41,7 @@ public static function fromRecommendedSettings( } /** - * {@inheritdoc} + * {@inheritDoc} * * @throws ContentCouldNotBeFormatted */ diff --git a/src/Formatter/JmsSerializer.php b/src/Formatter/JmsSerializer.php index 2529dbf5..127d7cd5 100644 --- a/src/Formatter/JmsSerializer.php +++ b/src/Formatter/JmsSerializer.php @@ -17,7 +17,7 @@ public function __construct( ) { } - /** {@inheritdoc} */ + /** {@inheritDoc} */ // phpcs:ignore SlevomatCodingStandard.Functions.UnusedParameter public function formatContent(mixed $content, array $attributes = []): string { diff --git a/src/Formatter/Json.php b/src/Formatter/Json.php index 04090257..beb48fcd 100644 --- a/src/Formatter/Json.php +++ b/src/Formatter/Json.php @@ -24,7 +24,7 @@ public function __construct(private readonly int $flags = self::DEFAULT_FLAGS) { } - /** {@inheritdoc} */ + /** {@inheritDoc} */ // phpcs:ignore SlevomatCodingStandard.Functions.UnusedParameter public function formatContent(mixed $content, array $attributes = []): string { diff --git a/src/Formatter/Plates.php b/src/Formatter/Plates.php index 0d703a6c..32badd22 100644 --- a/src/Formatter/Plates.php +++ b/src/Formatter/Plates.php @@ -20,7 +20,7 @@ public function __construct( ) { } - /** {@inheritdoc} */ + /** {@inheritDoc} */ public function formatContent(mixed $content, array $attributes = []): string { try { diff --git a/src/Formatter/StringCast.php b/src/Formatter/StringCast.php index 429e425c..49c4ccf0 100644 --- a/src/Formatter/StringCast.php +++ b/src/Formatter/StringCast.php @@ -10,7 +10,7 @@ final class StringCast extends ContentOnly { - /** {@inheritdoc} */ + /** {@inheritDoc} */ // phpcs:ignore SlevomatCodingStandard.Functions.UnusedParameter public function formatContent(mixed $content, array $attributes = []): string { diff --git a/src/Formatter/Twig.php b/src/Formatter/Twig.php index a8386b53..39627e62 100644 --- a/src/Formatter/Twig.php +++ b/src/Formatter/Twig.php @@ -20,7 +20,7 @@ public function __construct( ) { } - /** {@inheritdoc} */ + /** {@inheritDoc} */ public function formatContent(mixed $content, array $attributes = []): string { try { diff --git a/src/UnformattedResponse.php b/src/UnformattedResponse.php index 11b01672..0c96c9c0 100644 --- a/src/UnformattedResponse.php +++ b/src/UnformattedResponse.php @@ -26,7 +26,7 @@ public function getProtocolVersion(): string return $this->decoratedResponse->getProtocolVersion(); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ public function withProtocolVersion($version) { return new self( @@ -36,31 +36,31 @@ public function withProtocolVersion($version) ); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ public function getHeaders(): array { return $this->decoratedResponse->getHeaders(); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ public function hasHeader($name): bool { return $this->decoratedResponse->hasHeader($name); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ public function getHeader($name) { return $this->decoratedResponse->getHeader($name); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ public function getHeaderLine($name): string { return $this->decoratedResponse->getHeaderLine($name); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ public function withHeader($name, $value) { return new self( @@ -70,7 +70,7 @@ public function withHeader($name, $value) ); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ public function withAddedHeader($name, $value) { return new self( @@ -80,7 +80,7 @@ public function withAddedHeader($name, $value) ); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ public function withoutHeader($name) { return new self( @@ -95,7 +95,7 @@ public function getBody(): StreamInterface return $this->decoratedResponse->getBody(); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ public function withBody(StreamInterface $body) { return new self( @@ -110,7 +110,7 @@ public function getStatusCode(): int return $this->decoratedResponse->getStatusCode(); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ public function withStatus($code, $reasonPhrase = '') { return new self( diff --git a/tests/ContentTypeMiddlewareTest.php b/tests/ContentTypeMiddlewareTest.php index 02f280d3..f68a562a 100644 --- a/tests/ContentTypeMiddlewareTest.php +++ b/tests/ContentTypeMiddlewareTest.php @@ -12,6 +12,7 @@ use Lcobucci\ContentNegotiation\Formatter; use Lcobucci\ContentNegotiation\Tests\Formatter\NaiveTemplateEngine; use Lcobucci\ContentNegotiation\UnformattedResponse; +use PHPUnit\Framework\Attributes as PHPUnit; use PHPUnit\Framework\TestCase; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; @@ -19,7 +20,11 @@ use function array_map; -/** @coversDefaultClass \Lcobucci\ContentNegotiation\ContentTypeMiddleware */ +#[PHPUnit\CoversClass(ContentTypeMiddleware::class)] +#[PHPUnit\UsesClass(Formatter\Json::class)] +#[PHPUnit\UsesClass(Formatter\ContentOnly::class)] +#[PHPUnit\UsesClass(Formatter\NotAcceptable::class)] +#[PHPUnit\UsesClass(UnformattedResponse::class)] final class ContentTypeMiddlewareTest extends TestCase { private const SUPPORTED_FORMATS = [ @@ -37,16 +42,7 @@ final class ContentTypeMiddlewareTest extends TestCase ], ]; - /** - * @test - * - * @covers ::__construct() - * @covers ::fromRecommendedSettings() - * @covers ::process() - * - * @uses \Lcobucci\ContentNegotiation\Formatter\Json - * @uses \Lcobucci\ContentNegotiation\Formatter\ContentOnly - */ + #[PHPUnit\Test] public function processShouldReturnFormattedResponseDirectly(): void { $middleware = $this->createMiddleware(); @@ -57,18 +53,7 @@ public function processShouldReturnFormattedResponseDirectly(): void self::assertSame('application/json; charset=UTF-8', $response->getHeaderLine('Content-Type')); } - /** - * @test - * - * @covers ::__construct() - * @covers ::fromRecommendedSettings() - * @covers ::process() - * @covers ::extractContentType() - * - * @uses \Lcobucci\ContentNegotiation\UnformattedResponse - * @uses \Lcobucci\ContentNegotiation\Formatter\Json - * @uses \Lcobucci\ContentNegotiation\Formatter\NotAcceptable - */ + #[PHPUnit\Test] public function processShouldReturnAResponseWithErrorWhenFormatterWasNotFound(): void { $middleware = $this->createMiddleware(); @@ -83,18 +68,7 @@ public function processShouldReturnAResponseWithErrorWhenFormatterWasNotFound(): self::assertSame('text/plain; charset=UTF-8', $response->getHeaderLine('Content-Type')); } - /** - * @test - * - * @covers ::__construct() - * @covers ::fromRecommendedSettings() - * @covers ::process() - * @covers ::extractContentType() - * - * @uses \Lcobucci\ContentNegotiation\UnformattedResponse - * @uses \Lcobucci\ContentNegotiation\Formatter\ContentOnly - * @uses \Lcobucci\ContentNegotiation\Formatter\Json - */ + #[PHPUnit\Test] public function processShouldReturnAResponseWithFormattedContent(): void { $middleware = $this->createMiddleware(); @@ -110,18 +84,7 @@ public function processShouldReturnAResponseWithFormattedContent(): void self::assertJsonStringEqualsJsonString('{"id":1,"name":"Testing"}', (string) $response->getBody()); } - /** - * @test - * - * @covers ::__construct() - * @covers ::fromRecommendedSettings() - * @covers ::process() - * @covers ::extractContentType() - * - * @uses \Lcobucci\ContentNegotiation\UnformattedResponse - * @uses \Lcobucci\ContentNegotiation\Formatter\ContentOnly - * @uses \Lcobucci\ContentNegotiation\Formatter\Json - */ + #[PHPUnit\Test] public function processShouldPassAttributesToTheFormatterProperly(): void { $middleware = $this->createMiddleware(); @@ -141,18 +104,7 @@ public function processShouldPassAttributesToTheFormatterProperly(): void self::assertStringContainsString('
Testing
', $body); } - /** - * @test - * - * @covers ::__construct() - * @covers ::fromRecommendedSettings() - * @covers ::process() - * @covers ::extractContentType() - * - * @uses \Lcobucci\ContentNegotiation\UnformattedResponse - * @uses \Lcobucci\ContentNegotiation\Formatter\ContentOnly - * @uses \Lcobucci\ContentNegotiation\Formatter\Json - */ + #[PHPUnit\Test] public function processShouldReturnAResponseWithFormattedContentEvenWithoutForcingTheCharset(): void { $middleware = $this->createMiddleware(false); diff --git a/tests/Formatter/ContentOnlyTest.php b/tests/Formatter/ContentOnlyTest.php deleted file mode 100644 index 7aa029f5..00000000 --- a/tests/Formatter/ContentOnlyTest.php +++ /dev/null @@ -1,31 +0,0 @@ -getMockForAbstractClass(ContentOnly::class); - $formatter->method('formatContent')->willReturn('A fancy result'); - - $response = $formatter->format(new UnformattedResponse(new Response(), 'testing'), new StreamFactory()); - - self::assertSame('A fancy result', $response->getBody()->getContents()); - } -} diff --git a/tests/Formatter/JmsSerializerTest.php b/tests/Formatter/JmsSerializerTest.php index 22a411bb..e6f6890d 100644 --- a/tests/Formatter/JmsSerializerTest.php +++ b/tests/Formatter/JmsSerializerTest.php @@ -4,58 +4,55 @@ namespace Lcobucci\ContentNegotiation\Tests\Formatter; use JMS\Serializer\SerializerInterface; +use Laminas\Diactoros\Response; +use Laminas\Diactoros\StreamFactory; use Lcobucci\ContentNegotiation\ContentCouldNotBeFormatted; +use Lcobucci\ContentNegotiation\Formatter\ContentOnly; use Lcobucci\ContentNegotiation\Formatter\JmsSerializer; -use PHPUnit\Framework\MockObject\MockObject; +use Lcobucci\ContentNegotiation\UnformattedResponse; +use PHPUnit\Framework\Attributes as PHPUnit; use PHPUnit\Framework\TestCase; use RuntimeException; -/** @coversDefaultClass \Lcobucci\ContentNegotiation\Formatter\JmsSerializer */ +#[PHPUnit\CoversClass(JmsSerializer::class)] +#[PHPUnit\CoversClass(ContentOnly::class)] +#[PHPUnit\UsesClass(UnformattedResponse::class)] final class JmsSerializerTest extends TestCase { - /** @var SerializerInterface&MockObject */ - private SerializerInterface $serializer; - - /** @before */ - public function createSerializer(): void - { - $this->serializer = $this->createMock(SerializerInterface::class); - } - - /** - * @test - * - * @covers ::__construct() - * @covers ::formatContent() - */ + #[PHPUnit\Test] public function formatShouldSimplyForwardCallToSerializer(): void { $content = ['a' => 'test']; - $this->serializer->expects(self::once()) - ->method('serialize') - ->with($content, 'json') - ->willReturn('{"a":"test"}'); - - $formatter = new JmsSerializer($this->serializer, 'json'); + $jms = $this->createMock(SerializerInterface::class); + $jms->expects(self::once()) + ->method('serialize') + ->with($content, 'json') + ->willReturn('{"a":"test"}'); - self::assertSame('{"a":"test"}', $formatter->formatContent($content)); + self::assertSame('{"a":"test"}', $this->format($jms, $content)); } - /** - * @test - * - * @covers ::__construct() - * @covers ::formatContent() - */ + #[PHPUnit\Test] public function formatShouldConvertAnyRaisedException(): void { $this->expectException(ContentCouldNotBeFormatted::class); - $this->serializer->method('serialize') - ->willThrowException(new RuntimeException()); + $jms = $this->createMock(SerializerInterface::class); + $jms->method('serialize') + ->willThrowException(new RuntimeException()); + + $this->format($jms, ['a' => 'test']); + } + + private function format(SerializerInterface $jms, mixed $content): string + { + $formatter = new JmsSerializer($jms, 'json'); + $formatted = $formatter->format( + new UnformattedResponse(new Response(), $content), + new StreamFactory(), + ); - $formatter = new JmsSerializer($this->serializer, 'json'); - $formatter->formatContent(['a' => 'test']); + return (string) $formatted->getBody(); } } diff --git a/tests/Formatter/JsonTest.php b/tests/Formatter/JsonTest.php index 15808637..e8e104c0 100644 --- a/tests/Formatter/JsonTest.php +++ b/tests/Formatter/JsonTest.php @@ -4,9 +4,14 @@ namespace Lcobucci\ContentNegotiation\Tests\Formatter; use JsonSerializable; +use Laminas\Diactoros\Response; +use Laminas\Diactoros\StreamFactory; use Lcobucci\ContentNegotiation\ContentCouldNotBeFormatted; +use Lcobucci\ContentNegotiation\Formatter\ContentOnly; use Lcobucci\ContentNegotiation\Formatter\Json; use Lcobucci\ContentNegotiation\Tests\PersonDto; +use Lcobucci\ContentNegotiation\UnformattedResponse; +use PHPUnit\Framework\Attributes as PHPUnit; use PHPUnit\Framework\TestCase; use RuntimeException; @@ -14,32 +19,24 @@ use const JSON_UNESCAPED_SLASHES; -/** @coversDefaultClass \Lcobucci\ContentNegotiation\Formatter\Json */ +#[PHPUnit\CoversClass(Json::class)] +#[PHPUnit\CoversClass(ContentOnly::class)] +#[PHPUnit\UsesClass(UnformattedResponse::class)] final class JsonTest extends TestCase { - /** - * @test - * - * @covers ::__construct() - * - * @uses \Lcobucci\ContentNegotiation\Formatter\Json::formatContent() - */ + #[PHPUnit\Test] public function constructorShouldAllowTheConfigurationOfEncodingFlags(): void { self::assertSame( '["","\'bar\'","\"baz\"","&blong&","\u00e9","http://"]', - (new Json(JSON_UNESCAPED_SLASHES)) - ->formatContent(['', "'bar'", '"baz"', '&blong&', "\xc3\xa9", 'http://']), + $this->formatContent( + ['', "'bar'", '"baz"', '&blong&', "\xc3\xa9", 'http://'], + new Json(JSON_UNESCAPED_SLASHES), + ), ); } - /** - * @test - * - * @covers ::__construct() - * - * @uses \Lcobucci\ContentNegotiation\Formatter\Json::formatContent() - */ + #[PHPUnit\Test] public function constructorShouldUseDefaultFlagsWhenNothingWasSet(): void { self::assertSame( @@ -48,13 +45,7 @@ public function constructorShouldUseDefaultFlagsWhenNothingWasSet(): void ); } - /** - * @test - * - * @covers ::formatContent() - * - * @uses \Lcobucci\ContentNegotiation\Formatter\Json::__construct() - */ + #[PHPUnit\Test] public function formatShouldReturnAJsonEncodedValue(): void { self::assertJsonStringEqualsJsonString( @@ -63,13 +54,7 @@ public function formatShouldReturnAJsonEncodedValue(): void ); } - /** - * @test - * - * @covers ::formatContent() - * - * @uses \Lcobucci\ContentNegotiation\Formatter\Json::__construct() - */ + #[PHPUnit\Test] public function formatShouldRaiseExceptionWhenContentCouldNotBeEncoded(): void { $this->expectException(ContentCouldNotBeFormatted::class); @@ -78,13 +63,7 @@ public function formatShouldRaiseExceptionWhenContentCouldNotBeEncoded(): void $this->formatContent(acos(8)); } - /** - * @test - * - * @covers ::formatContent() - * - * @uses \Lcobucci\ContentNegotiation\Formatter\Json::__construct() - */ + #[PHPUnit\Test] public function formatShouldConvertAnyExceptionDuringJsonSerialization(): void { $this->expectException(ContentCouldNotBeFormatted::class); @@ -101,8 +80,13 @@ public function jsonSerialize(): mixed ); } - private function formatContent(mixed $content): string + private function formatContent(mixed $content, Json $formatter = new Json()): string { - return (new Json())->formatContent($content); + $formatted = $formatter->format( + new UnformattedResponse(new Response(), $content), + new StreamFactory(), + ); + + return (string) $formatted->getBody(); } } diff --git a/tests/Formatter/NaiveTemplateEngine.php b/tests/Formatter/NaiveTemplateEngine.php index e1e9d9f1..c2dcb276 100644 --- a/tests/Formatter/NaiveTemplateEngine.php +++ b/tests/Formatter/NaiveTemplateEngine.php @@ -19,7 +19,7 @@ final class NaiveTemplateEngine extends ContentOnly private const EXTENSION = 'html'; /** - * {@inheritdoc} + * {@inheritDoc} */ public function formatContent(mixed $content, array $attributes = []): string { diff --git a/tests/Formatter/NotAcceptableTest.php b/tests/Formatter/NotAcceptableTest.php index 8f5ee0e1..6222a4dd 100644 --- a/tests/Formatter/NotAcceptableTest.php +++ b/tests/Formatter/NotAcceptableTest.php @@ -8,24 +8,20 @@ use Laminas\Diactoros\StreamFactory; use Lcobucci\ContentNegotiation\Formatter\NotAcceptable; use Lcobucci\ContentNegotiation\UnformattedResponse; +use PHPUnit\Framework\Attributes as PHPUnit; use PHPUnit\Framework\TestCase; -/** @coversDefaultClass \Lcobucci\ContentNegotiation\Formatter\NotAcceptable */ +#[PHPUnit\CoversClass(NotAcceptable::class)] +#[PHPUnit\UsesClass(UnformattedResponse::class)] final class NotAcceptableTest extends TestCase { - /** - * @test - * - * @covers ::format - * - * @uses \Lcobucci\ContentNegotiation\UnformattedResponse - */ + #[PHPUnit\Test] public function formatShouldReturnAResponseWithEmptyBodyAndTheCorrectStatusCode(): void { $formatter = new NotAcceptable(); $response = $formatter->format(new UnformattedResponse(new Response(), 'testing'), new StreamFactory()); - self::assertSame('', $response->getBody()->getContents()); + self::assertSame('', (string) $response->getBody()); self::assertSame(StatusCodeInterface::STATUS_NOT_ACCEPTABLE, $response->getStatusCode()); } } diff --git a/tests/Formatter/PlatesTest.php b/tests/Formatter/PlatesTest.php index 8c993fa5..5938e167 100644 --- a/tests/Formatter/PlatesTest.php +++ b/tests/Formatter/PlatesTest.php @@ -3,71 +3,72 @@ namespace Lcobucci\ContentNegotiation\Tests\Formatter; +use Laminas\Diactoros\Response; +use Laminas\Diactoros\StreamFactory; use Lcobucci\ContentNegotiation\ContentCouldNotBeFormatted; +use Lcobucci\ContentNegotiation\Formatter\ContentOnly; use Lcobucci\ContentNegotiation\Formatter\Plates; use Lcobucci\ContentNegotiation\Tests\PersonDto; +use Lcobucci\ContentNegotiation\UnformattedResponse; use League\Plates\Engine; +use PHPUnit\Framework\Attributes as PHPUnit; use PHPUnit\Framework\TestCase; use function dirname; -/** @coversDefaultClass \Lcobucci\ContentNegotiation\Formatter\Plates */ +#[PHPUnit\CoversClass(Plates::class)] +#[PHPUnit\CoversClass(ContentOnly::class)] +#[PHPUnit\UsesClass(UnformattedResponse::class)] final class PlatesTest extends TestCase { - private Engine $engine; - - /** @before */ - public function configureEngine(): void - { - $this->engine = new Engine(dirname(__DIR__, 2) . '/templates/plates'); - } - - /** - * @test - * - * @covers ::__construct() - * @covers ::formatContent() - * @covers ::render() - */ + #[PHPUnit\Test] public function formatShouldReturnContentFormattedByPlates(): void { - $formatter = new Plates($this->engine); - $content = $formatter->formatContent(new PersonDto(1, 'Testing'), ['template' => 'person']); + $content = $this->format( + new PersonDto(1, 'Testing'), + ['template' => 'person'], + ); self::assertStringContainsString('
1
', $content); self::assertStringContainsString('
Testing
', $content); } - /** - * @test - * - * @covers ::__construct() - * @covers ::formatContent() - * @covers ::render() - */ + #[PHPUnit\Test] public function formatShouldReadTemplateNameFromCustomAttribute(): void { - $formatter = new Plates($this->engine, 'fancy!'); - $content = $formatter->formatContent(new PersonDto(1, 'Testing'), ['fancy!' => 'person']); + $content = $this->format( + new PersonDto(1, 'Testing'), + ['fancy!' => 'person'], + 'fancy!', + ); self::assertStringContainsString('
1
', $content); self::assertStringContainsString('
Testing
', $content); } - /** - * @test - * - * @covers ::__construct() - * @covers ::formatContent() - * @covers ::render() - */ + #[PHPUnit\Test] public function formatShouldConvertAnyPlatesException(): void { - $formatter = new Plates($this->engine); - $this->expectException(ContentCouldNotBeFormatted::class); $this->expectExceptionMessage('An error occurred while formatting using plates'); - $formatter->formatContent(new PersonDto(1, 'Testing'), ['template' => 'no-template-at-all']); + $this->format(new PersonDto(1, 'Testing'), ['template' => 'no-template-at-all']); + } + + /** @param array $attributes */ + private function format( + mixed $content, + array $attributes = [], + string $templateAttribute = 'template', + ): string { + $formatter = new Plates( + new Engine(dirname(__DIR__, 2) . '/templates/plates'), + $templateAttribute, + ); + + return (string) $formatter->format( + new UnformattedResponse(new Response(), $content, $attributes), + new StreamFactory(), + )->getBody(); } } diff --git a/tests/Formatter/StringCastTest.php b/tests/Formatter/StringCastTest.php index 0ddfc240..c4a84abe 100644 --- a/tests/Formatter/StringCastTest.php +++ b/tests/Formatter/StringCastTest.php @@ -3,31 +3,32 @@ namespace Lcobucci\ContentNegotiation\Tests\Formatter; +use Laminas\Diactoros\Response; +use Laminas\Diactoros\StreamFactory; use Lcobucci\ContentNegotiation\ContentCouldNotBeFormatted; +use Lcobucci\ContentNegotiation\Formatter\ContentOnly; use Lcobucci\ContentNegotiation\Formatter\StringCast; +use Lcobucci\ContentNegotiation\UnformattedResponse; +use PHPUnit\Framework\Attributes as PHPUnit; use PHPUnit\Framework\TestCase; use Stringable; -/** @coversDefaultClass \Lcobucci\ContentNegotiation\Formatter\StringCast */ +#[PHPUnit\CoversClass(StringCast::class)] +#[PHPUnit\CoversClass(ContentOnly::class)] +#[PHPUnit\UsesClass(UnformattedResponse::class)] final class StringCastTest extends TestCase { - /** - * @test - * @dataProvider validData - * - * @covers ::formatContent() - */ + #[PHPUnit\Test] + #[PHPUnit\DataProvider('validData')] public function formatShouldSimplyReturnTheStringRepresentationOfTheContent( string $expected, mixed $content, ): void { - $formatter = new StringCast(); - - self::assertSame($expected, $formatter->formatContent($content)); + self::assertSame($expected, $this->format($content)); } - /** @return mixed[][] */ - public function validData(): array + /** @return iterable */ + public static function validData(): iterable { $test = new class { @@ -45,45 +46,40 @@ public function __toString(): string } }; - return [ - ['test', 'test'], - ['test', $test], - ['test2', $test2], - ['1', 1], - ['1.1', 1.1], - ['1', true], - ['', false], - ['', null], - ]; + yield ['test', 'test']; + yield ['test', $test]; + yield ['test2', $test2]; + yield ['1', 1]; + yield ['1.1', 1.1]; + yield ['1', true]; + yield ['', false]; + yield ['', null]; } - /** - * @test - * - * @covers ::formatContent() - */ + #[PHPUnit\Test] public function formatShouldRaiseExceptionWhenContentCouldNotBeCastToString(): void { $this->expectException(ContentCouldNotBeFormatted::class); - $content = new class - { - }; - - $formatter = new StringCast(); - $formatter->formatContent($content); + $this->format(new class () { + }); } - /** - * @test - * - * @covers ::formatContent() - */ + #[PHPUnit\Test] public function formatShouldRaiseExceptionWhenContentIsAnArray(): void { $this->expectException(ContentCouldNotBeFormatted::class); + $this->format([]); + } + + private function format(mixed $content): string + { $formatter = new StringCast(); - $formatter->formatContent([]); + + return (string) $formatter->format( + new UnformattedResponse(new Response(), $content), + new StreamFactory(), + )->getBody(); } } diff --git a/tests/Formatter/TwigTest.php b/tests/Formatter/TwigTest.php index 095680d0..6d9c3e7d 100644 --- a/tests/Formatter/TwigTest.php +++ b/tests/Formatter/TwigTest.php @@ -3,74 +3,72 @@ namespace Lcobucci\ContentNegotiation\Tests\Formatter; +use Laminas\Diactoros\Response; +use Laminas\Diactoros\StreamFactory; use Lcobucci\ContentNegotiation\ContentCouldNotBeFormatted; +use Lcobucci\ContentNegotiation\Formatter\ContentOnly; use Lcobucci\ContentNegotiation\Formatter\Twig; use Lcobucci\ContentNegotiation\Tests\PersonDto; +use Lcobucci\ContentNegotiation\UnformattedResponse; +use PHPUnit\Framework\Attributes as PHPUnit; use PHPUnit\Framework\TestCase; use Twig\Environment; use Twig\Loader\FilesystemLoader; use function dirname; -/** @coversDefaultClass \Lcobucci\ContentNegotiation\Formatter\Twig */ +#[PHPUnit\CoversClass(Twig::class)] +#[PHPUnit\CoversClass(ContentOnly::class)] +#[PHPUnit\UsesClass(UnformattedResponse::class)] final class TwigTest extends TestCase { - private Environment $environment; - - /** @before */ - public function configureEngine(): void - { - $this->environment = new Environment( - new FilesystemLoader('templates/twig', dirname(__DIR__, 2) . '/'), - ); - } - - /** - * @test - * - * @covers ::__construct() - * @covers ::formatContent() - * @covers ::render() - */ + #[PHPUnit\Test] public function formatShouldReturnContentFormattedByPlates(): void { - $formatter = new Twig($this->environment); - $content = $formatter->formatContent(new PersonDto(1, 'Testing'), ['template' => 'person.twig']); + $content = $this->format(new PersonDto(1, 'Testing'), ['template' => 'person.twig']); self::assertStringContainsString('
1
', $content); self::assertStringContainsString('
Testing
', $content); } - /** - * @test - * - * @covers ::__construct() - * @covers ::formatContent() - * @covers ::render() - */ + #[PHPUnit\Test] public function formatShouldReadTemplateNameFromCustomAttribute(): void { - $formatter = new Twig($this->environment, 'fancy!'); - $content = $formatter->formatContent(new PersonDto(1, 'Testing'), ['fancy!' => 'person.twig']); + $content = $this->format( + new PersonDto(1, 'Testing'), + ['fancy!' => 'person.twig'], + 'fancy!', + ); self::assertStringContainsString('
1
', $content); self::assertStringContainsString('
Testing
', $content); } - /** - * @test - * - * @covers ::__construct() - * @covers ::formatContent() - * @covers ::render() - */ + #[PHPUnit\Test] public function formatShouldConvertAnyTwigException(): void { - $formatter = new Twig($this->environment); - $this->expectException(ContentCouldNotBeFormatted::class); $this->expectExceptionMessage('An error occurred while formatting using twig'); - $formatter->formatContent(new PersonDto(1, 'Testing'), ['template' => 'no-template-at-all']); + $this->format(new PersonDto(1, 'Testing'), ['template' => 'no-template-at-all']); + } + + /** @param array $attributes */ + private function format( + mixed $content, + array $attributes = [], + string $templateAttribute = 'template', + ): string { + $formatter = new Twig( + new Environment( + new FilesystemLoader('templates/twig', dirname(__DIR__, 2) . '/'), + ), + $templateAttribute, + ); + + return (string) $formatter->format( + new UnformattedResponse(new Response(), $content, $attributes), + new StreamFactory(), + )->getBody(); } } diff --git a/tests/UnformattedResponseTest.php b/tests/UnformattedResponseTest.php index 513e0fbf..66a7e6c2 100644 --- a/tests/UnformattedResponseTest.php +++ b/tests/UnformattedResponseTest.php @@ -6,17 +6,13 @@ use Laminas\Diactoros\Response; use Laminas\Diactoros\Stream; use Lcobucci\ContentNegotiation\UnformattedResponse; +use PHPUnit\Framework\Attributes as PHPUnit; use PHPUnit\Framework\TestCase; -/** @coversDefaultClass \Lcobucci\ContentNegotiation\UnformattedResponse */ +#[PHPUnit\CoversClass(UnformattedResponse::class)] final class UnformattedResponseTest extends TestCase { - /** - * @test - * - * @covers ::__construct - * @covers ::getUnformattedContent() - */ + #[PHPUnit\Test] public function getUnformattedContentShouldReturnTheConfiguredValue(): void { $dto = new PersonDto(1, 'Testing'); @@ -25,14 +21,7 @@ public function getUnformattedContentShouldReturnTheConfiguredValue(): void self::assertSame($dto, $response->getUnformattedContent()); } - /** - * @test - * - * @covers ::withAttribute() - * - * @uses \Lcobucci\ContentNegotiation\UnformattedResponse::__construct() - * @uses \Lcobucci\ContentNegotiation\UnformattedResponse::getAttributes() - */ + #[PHPUnit\Test] public function withAttributeShouldReturnANewInstanceWithTheAddedAttribute(): void { $response1 = new UnformattedResponse(new Response(), new PersonDto(1, 'Testing')); @@ -42,14 +31,7 @@ public function withAttributeShouldReturnANewInstanceWithTheAddedAttribute(): vo self::assertSame(['test' => 1], $response2->getAttributes()); } - /** - * @test - * - * @covers ::__construct() - * @covers ::withAttribute() - * - * @uses \Lcobucci\ContentNegotiation\UnformattedResponse::getAttributes() - */ + #[PHPUnit\Test] public function withAttributeShouldOverrideExistingAttributes(): void { $response = new UnformattedResponse( @@ -61,12 +43,7 @@ public function withAttributeShouldOverrideExistingAttributes(): void self::assertSame(['test' => 2], $response->withAttribute('test', 2)->getAttributes()); } - /** - * @test - * - * @covers ::__construct() - * @covers ::getAttributes() - */ + #[PHPUnit\Test] public function getAttributesShouldReturnTheConfiguredAttributes(): void { $response = new UnformattedResponse( @@ -78,89 +55,49 @@ public function getAttributesShouldReturnTheConfiguredAttributes(): void self::assertSame(['test' => 1], $response->getAttributes()); } - /** - * @test - * - * @covers ::__construct - * @covers ::getProtocolVersion() - */ + #[PHPUnit\Test] public function getProtocolVersionShouldReturnTheSameValueAsTheDecoratedObject(): void { $this->assertGetterReturn('getProtocolVersion'); } - /** - * @test - * - * @covers ::__construct - * @covers ::getHeaders() - */ + #[PHPUnit\Test] public function getHeadersShouldReturnTheSameValueAsTheDecoratedObject(): void { $this->assertGetterReturn('getHeaders'); } - /** - * @test - * - * @covers ::__construct - * @covers ::hasHeader() - */ + #[PHPUnit\Test] public function hasHeaderShouldReturnTheSameValueAsTheDecoratedObject(): void { $this->assertGetterReturn('hasHeader', 'Content-Type'); } - /** - * @test - * - * @covers ::__construct - * @covers ::getHeader() - */ + #[PHPUnit\Test] public function getHeaderShouldReturnTheSameValueAsTheDecoratedObject(): void { $this->assertGetterReturn('getHeader', 'Content-Type'); } - /** - * @test - * - * @covers ::__construct - * @covers ::getHeaderLine() - */ + #[PHPUnit\Test] public function getHeaderLineShouldReturnTheSameValueAsTheDecoratedObject(): void { $this->assertGetterReturn('getHeaderLine', 'Content-Type'); } - /** - * @test - * - * @covers ::__construct - * @covers ::getBody() - */ + #[PHPUnit\Test] public function getBodyShouldReturnTheSameValueAsTheDecoratedObject(): void { $this->assertGetterReturn('getBody'); } - /** - * @test - * - * @covers ::__construct - * @covers ::getStatusCode() - */ + #[PHPUnit\Test] public function getStatusCodeShouldReturnTheSameValueAsTheDecoratedObject(): void { $this->assertGetterReturn('getStatusCode'); } - /** - * @test - * - * @covers ::__construct - * @covers ::getReasonPhrase() - */ + #[PHPUnit\Test] public function getReasonPhraseShouldReturnTheSameValueAsTheDecoratedObject(): void { $this->assertGetterReturn('getReasonPhrase'); @@ -174,67 +111,37 @@ private function assertGetterReturn(string $method, mixed ...$arguments): void self::assertSame($decoratedResponse->$method(...$arguments), $response->$method(...$arguments)); } - /** - * @test - * - * @covers ::__construct - * @covers ::withProtocolVersion() - */ + #[PHPUnit\Test] public function withProtocolVersionShouldReturnANewInstanceWithTheModifiedDecoratedObject(): void { $this->assertSetterReturn('withProtocolVersion', '2'); } - /** - * @test - * - * @covers ::__construct - * @covers ::withHeader() - */ + #[PHPUnit\Test] public function withHeaderShouldReturnANewInstanceWithTheModifiedDecoratedObject(): void { $this->assertSetterReturn('withHeader', 'Content-Type', 'application/json'); } - /** - * @test - * - * @covers ::__construct - * @covers ::withAddedHeader() - */ + #[PHPUnit\Test] public function withAddedHeaderShouldReturnANewInstanceWithTheModifiedDecoratedObject(): void { $this->assertSetterReturn('withAddedHeader', 'Content-Type', 'application/json'); } - /** - * @test - * - * @covers ::__construct - * @covers ::withoutHeader() - */ + #[PHPUnit\Test] public function withoutHeaderShouldReturnANewInstanceWithTheModifiedDecoratedObject(): void { $this->assertSetterReturn('withoutHeader', 'Content-Type'); } - /** - * @test - * - * @covers ::__construct - * @covers ::withBody() - */ + #[PHPUnit\Test] public function withBodyShouldReturnANewInstanceWithTheModifiedDecoratedObject(): void { $this->assertSetterReturn('withBody', new Stream('php://temp', 'wb+')); } - /** - * @test - * - * @covers ::__construct - * @covers ::withStatus() - */ + #[PHPUnit\Test] public function withStatusShouldReturnANewInstanceWithTheModifiedDecoratedObject(): void { $this->assertSetterReturn('withStatus', 202);