diff --git a/.idea/php-test-framework.xml b/.idea/php-test-framework.xml index 8df1288..20a85ab 100644 --- a/.idea/php-test-framework.xml +++ b/.idea/php-test-framework.xml @@ -5,7 +5,7 @@ - + diff --git a/.idea/php.xml b/.idea/php.xml index 7321c98..3040e92 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -46,7 +46,7 @@ - + diff --git a/.idea/phpunit.xml b/.idea/phpunit.xml index 395ca1f..8523430 100644 --- a/.idea/phpunit.xml +++ b/.idea/phpunit.xml @@ -3,7 +3,7 @@ diff --git a/composer.json b/composer.json index 7ddb4aa..1d62cdd 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "goodboyalex/php_components_pack", "description": "[RU] Набор компонентов для сайта на PHP / [EN] A set of components for PHP website", - "minimum-stability": "dev", + "minimum-stability": "stable", "keywords": [ "components" ], diff --git a/composer.lock b/composer.lock index 86e9e65..7f6e378 100644 --- a/composer.lock +++ b/composer.lock @@ -4,21 +4,21 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "397ce2fd8c196db9f04cbac66a42584e", + "content-hash": "3e8e67b45a0b9103475706ce9f6a3ba1", "packages": [], "packages-dev": [ { "name": "myclabs/deep-copy", - "version": "1.x-dev", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "4764e040f8743e92b86c36f488f32d0265dd1dae" + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/4764e040f8743e92b86c36f488f32d0265dd1dae", - "reference": "4764e040f8743e92b86c36f488f32d0265dd1dae", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", "shasum": "" }, "require": { @@ -34,7 +34,6 @@ "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, - "default-branch": true, "type": "library", "autoload": { "files": [ @@ -58,7 +57,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.x" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" }, "funding": [ { @@ -66,7 +65,7 @@ "type": "tidelift" } ], - "time": "2024-11-26T13:04:49+00:00" + "time": "2024-11-08T17:47:46+00:00" }, { "name": "nikic/php-parser", @@ -128,7 +127,7 @@ }, { "name": "phar-io/manifest", - "version": "dev-master", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", @@ -148,7 +147,6 @@ "phar-io/version": "^3.0.1", "php": "^7.2 || ^8.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -247,44 +245,44 @@ }, { "name": "phpunit/php-code-coverage", - "version": "dev-main", + "version": "11.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "30b614244b02907cf0b2edc559fd5e24bd05ea57" + "reference": "418c59fd080954f8c4aa5631d9502ecda2387118" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/30b614244b02907cf0b2edc559fd5e24bd05ea57", - "reference": "30b614244b02907cf0b2edc559fd5e24bd05ea57", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/418c59fd080954f8c4aa5631d9502ecda2387118", + "reference": "418c59fd080954f8c4aa5631d9502ecda2387118", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^5.4.0", - "php": ">=8.3", - "phpunit/php-file-iterator": "^6.0-dev", - "phpunit/php-text-template": "^5.0-dev", - "sebastian/complexity": "^5.0-dev", - "sebastian/environment": "^8.0-dev", - "sebastian/lines-of-code": "^4.0-dev", - "sebastian/version": "^6.0-dev", + "nikic/php-parser": "^5.3.1", + "php": ">=8.2", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-text-template": "^4.0.1", + "sebastian/code-unit-reverse-lookup": "^4.0.1", + "sebastian/complexity": "^4.0.1", + "sebastian/environment": "^7.2.0", + "sebastian/lines-of-code": "^3.0.1", + "sebastian/version": "^5.0.2", "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.5.0" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "12.0.x-dev" + "dev-main": "11.0.x-dev" } }, "autoload": { @@ -313,7 +311,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/main" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.8" }, "funding": [ { @@ -321,33 +319,32 @@ "type": "github" } ], - "time": "2025-01-28T10:09:07+00:00" + "time": "2024-12-11T12:34:27+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "dev-main", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "a1339a60b2206324e440c4a3806bbd873fda0860" + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a1339a60b2206324e440c4a3806bbd873fda0860", - "reference": "a1339a60b2206324e440c4a3806bbd873fda0860", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/118cfaaa8bc5aef3287bf315b6060b1174754af6", + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^11.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -375,7 +372,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/main" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.0" }, "funding": [ { @@ -383,37 +380,36 @@ "type": "github" } ], - "time": "2025-01-15T13:41:39+00:00" + "time": "2024-08-27T05:02:59+00:00" }, { "name": "phpunit/php-invoker", - "version": "dev-main", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "a79e641e661a20d3b8c264b0b3b9eb0d98f98506" + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/a79e641e661a20d3b8c264b0b3b9eb0d98f98506", - "reference": "a79e641e661a20d3b8c264b0b3b9eb0d98f98506", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, "suggest": { "ext-pcntl": "*" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -440,7 +436,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/main" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.1" }, "funding": [ { @@ -448,33 +444,32 @@ "type": "github" } ], - "time": "2025-01-16T08:05:12+00:00" + "time": "2024-07-03T05:07:44+00:00" }, { "name": "phpunit/php-text-template", - "version": "dev-main", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "0199874fd3f2ae19aa9813bdfcb68e67671eee64" + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0199874fd3f2ae19aa9813bdfcb68e67671eee64", - "reference": "0199874fd3f2ae19aa9813bdfcb68e67671eee64", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -501,7 +496,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/main" + "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.1" }, "funding": [ { @@ -509,33 +504,32 @@ "type": "github" } ], - "time": "2025-01-16T08:08:04+00:00" + "time": "2024-07-03T05:08:43+00:00" }, { "name": "phpunit/php-timer", - "version": "dev-main", + "version": "7.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "aa0f95babbd87f096f1c20364204f195dd4b4608" + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/aa0f95babbd87f096f1c20364204f195dd4b4608", - "reference": "aa0f95babbd87f096f1c20364204f195dd4b4608", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "8.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -562,7 +556,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", "security": "https://github.com/sebastianbergmann/php-timer/security/policy", - "source": "https://github.com/sebastianbergmann/php-timer/tree/main" + "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.1" }, "funding": [ { @@ -570,20 +564,20 @@ "type": "github" } ], - "time": "2025-01-16T08:10:48+00:00" + "time": "2024-07-03T05:09:35+00:00" }, { "name": "phpunit/phpunit", - "version": "dev-main", + "version": "11.5.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "9f2ebaf18f7741a5ee587f80a42632edaa42d424" + "reference": "3c3ae14c90f244cdda95028c3e469028e8d1c02c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9f2ebaf18f7741a5ee587f80a42632edaa42d424", - "reference": "9f2ebaf18f7741a5ee587f80a42632edaa42d424", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3c3ae14c90f244cdda95028c3e469028e8d1c02c", + "reference": "3c3ae14c90f244cdda95028c3e469028e8d1c02c", "shasum": "" }, "require": { @@ -596,31 +590,34 @@ "myclabs/deep-copy": "^1.12.1", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", - "php": ">=8.3", - "phpunit/php-code-coverage": "^12.0-dev", - "phpunit/php-file-iterator": "^6.0-dev", - "phpunit/php-invoker": "^6.0-dev", - "phpunit/php-text-template": "^5.0-dev", - "phpunit/php-timer": "^8.0-dev", - "sebastian/cli-parser": "^4.0-dev", - "sebastian/comparator": "^7.0-dev", - "sebastian/diff": "^7.0-dev", - "sebastian/environment": "^8.0-dev", - "sebastian/exporter": "^7.0-dev", - "sebastian/global-state": "^8.0-dev", - "sebastian/object-enumerator": "^7.0-dev", - "sebastian/type": "^6.0-dev", - "sebastian/version": "^6.0-dev", + "php": ">=8.2", + "phpunit/php-code-coverage": "^11.0.8", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-invoker": "^5.0.1", + "phpunit/php-text-template": "^4.0.1", + "phpunit/php-timer": "^7.0.1", + "sebastian/cli-parser": "^3.0.2", + "sebastian/code-unit": "^3.0.2", + "sebastian/comparator": "^6.3.0", + "sebastian/diff": "^6.0.2", + "sebastian/environment": "^7.2.0", + "sebastian/exporter": "^6.3.0", + "sebastian/global-state": "^7.0.2", + "sebastian/object-enumerator": "^6.0.1", + "sebastian/type": "^5.1.0", + "sebastian/version": "^5.0.2", "staabm/side-effects-detector": "^1.0.5" }, - "default-branch": true, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files" + }, "bin": [ "phpunit" ], "type": "library", "extra": { "branch-alias": { - "dev-main": "12.0-dev" + "dev-main": "11.5-dev" } }, "autoload": { @@ -652,7 +649,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/main" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.6" }, "funding": [ { @@ -668,33 +665,32 @@ "type": "tidelift" } ], - "time": "2025-01-31T07:29:09+00:00" + "time": "2025-01-31T07:03:30+00:00" }, { "name": "sebastian/cli-parser", - "version": "dev-main", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "7f79d38ab02a0cb4089f31207ca11b74f49c7848" + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/7f79d38ab02a0cb4089f31207ca11b74f49c7848", - "reference": "7f79d38ab02a0cb4089f31207ca11b74f49c7848", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -718,7 +714,120 @@ "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/main" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:41:36+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca", + "reference": "ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "security": "https://github.com/sebastianbergmann/code-unit/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-12-12T09:59:06+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.1" }, "funding": [ { @@ -726,40 +835,39 @@ "type": "github" } ], - "time": "2025-01-16T08:13:26+00:00" + "time": "2024-07-03T04:45:54+00:00" }, { "name": "sebastian/comparator", - "version": "dev-main", + "version": "6.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "07f683f544931bc816c47faf894e387f2216a1e9" + "reference": "d4e47a769525c4dd38cea90e5dcd435ddbbc7115" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/07f683f544931bc816c47faf894e387f2216a1e9", - "reference": "07f683f544931bc816c47faf894e387f2216a1e9", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/d4e47a769525c4dd38cea90e5dcd435ddbbc7115", + "reference": "d4e47a769525c4dd38cea90e5dcd435ddbbc7115", "shasum": "" }, "require": { "ext-dom": "*", "ext-mbstring": "*", - "php": ">=8.3", - "sebastian/diff": "^7.0", - "sebastian/exporter": "^7.0" + "php": ">=8.2", + "sebastian/diff": "^6.0", + "sebastian/exporter": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.4" }, "suggest": { "ext-bcmath": "For comparing BcMath\\Number objects" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.2-dev" } }, "autoload": { @@ -799,7 +907,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/main" + "source": "https://github.com/sebastianbergmann/comparator/tree/6.3.0" }, "funding": [ { @@ -807,34 +915,33 @@ "type": "github" } ], - "time": "2025-01-16T09:21:21+00:00" + "time": "2025-01-06T10:28:19+00:00" }, { "name": "sebastian/complexity", - "version": "dev-main", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "eec688b04904c5ecfa3b94f59bc60485209805a9" + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/eec688b04904c5ecfa3b94f59bc60485209805a9", - "reference": "eec688b04904c5ecfa3b94f59bc60485209805a9", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0", "shasum": "" }, "require": { "nikic/php-parser": "^5.0", - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -858,7 +965,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/main" + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1" }, "funding": [ { @@ -866,34 +973,33 @@ "type": "github" } ], - "time": "2025-01-16T08:20:43+00:00" + "time": "2024-07-03T04:49:50+00:00" }, { "name": "sebastian/diff", - "version": "dev-main", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "87a9594e6994ba8ee9010836903305a64c895083" + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/87a9594e6994ba8ee9010836903305a64c895083", - "reference": "87a9594e6994ba8ee9010836903305a64c895083", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev", + "phpunit/phpunit": "^11.0", "symfony/process": "^4.2 || ^5" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -926,7 +1032,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/main" + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" }, "funding": [ { @@ -934,36 +1040,35 @@ "type": "github" } ], - "time": "2025-01-16T09:04:01+00:00" + "time": "2024-07-03T04:53:05+00:00" }, { "name": "sebastian/environment", - "version": "dev-main", + "version": "7.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "92b1a897b49e191a8fbca823d75bc0e157ff7cdb" + "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/92b1a897b49e191a8fbca823d75bc0e157ff7cdb", - "reference": "92b1a897b49e191a8fbca823d75bc0e157ff7cdb", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", + "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, "suggest": { "ext-posix": "*" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "8.0-dev" + "dev-main": "7.2-dev" } }, "autoload": { @@ -991,7 +1096,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/main" + "source": "https://github.com/sebastianbergmann/environment/tree/7.2.0" }, "funding": [ { @@ -999,35 +1104,34 @@ "type": "github" } ], - "time": "2025-01-16T08:28:42+00:00" + "time": "2024-07-03T04:54:44+00:00" }, { "name": "sebastian/exporter", - "version": "dev-main", + "version": "6.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "17e38c7a602c690c6f097b6aeaf47d0771ace9ca" + "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/17e38c7a602c690c6f097b6aeaf47d0771ace9ca", - "reference": "17e38c7a602c690c6f097b6aeaf47d0771ace9ca", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/3473f61172093b2da7de1fb5782e1f24cc036dc3", + "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": ">=8.3", - "sebastian/recursion-context": "^7.0-dev" + "php": ">=8.2", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.3" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.1-dev" } }, "autoload": { @@ -1070,7 +1174,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/main" + "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.0" }, "funding": [ { @@ -1078,36 +1182,35 @@ "type": "github" } ], - "time": "2025-01-16T08:54:00+00:00" + "time": "2024-12-05T09:17:50+00:00" }, { "name": "sebastian/global-state", - "version": "dev-main", + "version": "7.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "8a089e5a2a118a6725b603a47be1d1a9da1b9a68" + "reference": "3be331570a721f9a4b5917f4209773de17f747d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/8a089e5a2a118a6725b603a47be1d1a9da1b9a68", - "reference": "8a089e5a2a118a6725b603a47be1d1a9da1b9a68", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7", "shasum": "" }, "require": { - "php": ">=8.3", - "sebastian/object-reflector": "^5.0", - "sebastian/recursion-context": "^7.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "8.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -1133,7 +1236,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", "security": "https://github.com/sebastianbergmann/global-state/security/policy", - "source": "https://github.com/sebastianbergmann/global-state/tree/main" + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2" }, "funding": [ { @@ -1141,34 +1244,33 @@ "type": "github" } ], - "time": "2025-01-16T09:14:38+00:00" + "time": "2024-07-03T04:57:36+00:00" }, { "name": "sebastian/lines-of-code", - "version": "dev-main", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "fe8070ab1160c447839048ab240c07c448caa2b2" + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/fe8070ab1160c447839048ab240c07c448caa2b2", - "reference": "fe8070ab1160c447839048ab240c07c448caa2b2", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a", "shasum": "" }, "require": { "nikic/php-parser": "^5.0", - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1192,7 +1294,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/main" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1" }, "funding": [ { @@ -1200,35 +1302,34 @@ "type": "github" } ], - "time": "2025-01-16T08:36:53+00:00" + "time": "2024-07-03T04:58:38+00:00" }, { "name": "sebastian/object-enumerator", - "version": "dev-main", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "250d806a14baca8c4b37823426277dbcb8d4440d" + "reference": "f5b498e631a74204185071eb41f33f38d64608aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/250d806a14baca8c4b37823426277dbcb8d4440d", - "reference": "250d806a14baca8c4b37823426277dbcb8d4440d", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa", "shasum": "" }, "require": { - "php": ">=8.3", - "sebastian/object-reflector": "^5.0", - "sebastian/recursion-context": "^7.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1251,7 +1352,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/main" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1" }, "funding": [ { @@ -1259,33 +1360,32 @@ "type": "github" } ], - "time": "2025-01-16T08:38:51+00:00" + "time": "2024-07-03T05:00:13+00:00" }, { "name": "sebastian/object-reflector", - "version": "dev-main", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "7dddd66b56ba05cb474de46b2b623e92b42bff3a" + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/7dddd66b56ba05cb474de46b2b623e92b42bff3a", - "reference": "7dddd66b56ba05cb474de46b2b623e92b42bff3a", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1308,7 +1408,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/main" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.1" }, "funding": [ { @@ -1316,33 +1416,32 @@ "type": "github" } ], - "time": "2025-01-16T08:40:54+00:00" + "time": "2024-07-03T05:01:32+00:00" }, { "name": "sebastian/recursion-context", - "version": "dev-main", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "c9442e27dc9965ad453397725830d8ecb5497410" + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/c9442e27dc9965ad453397725830d8ecb5497410", - "reference": "c9442e27dc9965ad453397725830d8ecb5497410", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/694d156164372abbd149a4b85ccda2e4670c0e16", + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1373,7 +1472,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/main" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.2" }, "funding": [ { @@ -1381,33 +1480,32 @@ "type": "github" } ], - "time": "2025-01-16T08:53:18+00:00" + "time": "2024-07-03T05:10:34+00:00" }, { "name": "sebastian/type", - "version": "dev-main", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b07de32ccc63961cfcf87c4531816388dbaf264f" + "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b07de32ccc63961cfcf87c4531816388dbaf264f", - "reference": "b07de32ccc63961cfcf87c4531816388dbaf264f", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/461b9c5da241511a2a0e8f240814fb23ce5c0aac", + "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.3" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -1431,7 +1529,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/type/issues", "security": "https://github.com/sebastianbergmann/type/security/policy", - "source": "https://github.com/sebastianbergmann/type/tree/main" + "source": "https://github.com/sebastianbergmann/type/tree/5.1.0" }, "funding": [ { @@ -1439,30 +1537,29 @@ "type": "github" } ], - "time": "2025-01-16T08:45:13+00:00" + "time": "2024-09-17T13:12:04+00:00" }, { "name": "sebastian/version", - "version": "dev-main", + "version": "5.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "3e8786f0e004140c3be066577af51e7ea0446e54" + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/3e8786f0e004140c3be066577af51e7ea0446e54", - "reference": "3e8786f0e004140c3be066577af51e7ea0446e54", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1486,7 +1583,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/version/issues", "security": "https://github.com/sebastianbergmann/version/security/policy", - "source": "https://github.com/sebastianbergmann/version/tree/main" + "source": "https://github.com/sebastianbergmann/version/tree/5.0.2" }, "funding": [ { @@ -1494,7 +1591,7 @@ "type": "github" } ], - "time": "2025-01-16T08:47:17+00:00" + "time": "2024-10-09T05:16:32+00:00" }, { "name": "staabm/side-effects-detector", @@ -1600,7 +1697,7 @@ } ], "aliases": [], - "minimum-stability": "dev", + "minimum-stability": "stable", "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, diff --git a/sources/classes/ObjectArray.php b/sources/classes/ObjectArray.php index ff34cb5..0c027a4 100644 --- a/sources/classes/ObjectArray.php +++ b/sources/classes/ObjectArray.php @@ -57,4 +57,30 @@ final class ObjectArray implements ArrayAccess, IteratorAggregate, Countable, IS { return $this->Container; } + + /** + * Очищает массив объектов, хранящийся в данном классе. + * + * @return void + */ + public function Clear (): void + { + // Очищаем массив + unset($this->Container); + + // Создаем новый массив + $this->Container = []; + } + + /** + * Объединяет массив объектов, хранящийся в данном классе, с массивом объектов, переданным в качестве параметра. + * + * @param array $objects Массив объектов, который будет объединен с массивом объектов, хранящимся в данном классе. + * + * @return void + */ + public function Merge (array $objects): void + { + $this->Container = array_merge($this->Container, $objects); + } } \ No newline at end of file diff --git a/tests/classes/ObjectArrayTest.php b/tests/classes/ObjectArrayTest.php index 8d8ac0f..b0fc351 100644 --- a/tests/classes/ObjectArrayTest.php +++ b/tests/classes/ObjectArrayTest.php @@ -122,46 +122,194 @@ class ObjectArrayTest extends TestCase public function testDelete () { + $this->PrepareForTest(); + $array = [ + new A("a", 3, true), + new A("c", 2, false), + new A("b", 1, true), + ]; + + $a_Array = new ObjectArray($array); + + $a_Array->Delete(fn (A $a): bool => $a->b == 3); + + $cnt = $a_Array->Count(); + $this->assertEquals(2, $cnt); + } + + public function testClear () + { + $this->PrepareForTest(); + + $array = [ + new A("a", 3, true), + new A("c", 2, false), + new A("b", 1, true), + ]; + + $a_Array = new ObjectArray($array); + + $a_Array->Clear(); + + $cnt = $a_Array->Count(); + $this->assertEquals(0, $cnt); + } + + public function testMerge () + { + $this->PrepareForTest(); + + $array = [ + new A("a", 3, true), + new A("c", 2, false), + new A("b", 1, true), + ]; + + $array2 = [ + new A("d", 4, true), + new A("e", 5, false), + new A("f", 6, true), + ]; + + $a_Array = new ObjectArray($array); + + $a_Array->Merge($array2); + + $cnt = $a_Array->Count(); + $this->assertEquals(6, $cnt); + + $sr = $a_Array->Search('a', 'f'); + + $this->assertEquals(6, $sr->b); } public function testMaxBy () { + $this->PrepareForTest(); + $array = [ + new A("a", 3, true), + new A("c", 2, false), + new A("b", 1, true), + ]; + + $a_Array = new ObjectArray($array); + + $sr = $a_Array->MaxBy(fn (A $a) => $a->b); + + $this->assertEquals("a", $sr->a); } public function testGetColumn () { + $this->PrepareForTest(); + $array = [ + new A("a", 3, true), + new A("c", 2, false), + new A("b", 1, true), + ]; + + $a_Array = new ObjectArray($array); + + $sr = $a_Array->GetColumn('a', fn (A $a): bool => $a->b < 3); + + $this->assertIsArray($sr); + $this->assertSame(['c', 'b'], $sr); } public function testToArray () { + $this->PrepareForTest(); + + $array = [ + new A("a", 3, true), + new A("c", 2, false), + new A("b", 1, true), + ]; + + $a_Array = new ObjectArray($array); + + $sr = $a_Array->ToArray(); + + $this->assertIsArray($sr); + $this->assertSame($array, $sr); } public function testMinBy () { + $this->PrepareForTest(); + $array = [ + new A("a", 3, true), + new A("c", 2, false), + new A("b", 1, true), + ]; + + $a_Array = new ObjectArray($array); + + $sr = $a_Array->MinBy(fn (A $a) => $a->b); + + $this->assertEquals("b", $sr->a); } public function testIsExist () { + $this->PrepareForTest(); - } + $array = [ + new A("a", 3, true), + new A("c", 2, false), + new A("b", 1, true), + ]; - public function testSortCallback () - { + $a_Array = new ObjectArray($array); + $srTrue = $a_Array->IsExist(fn (A $a) => $a->b == 1); + $srFalse = $a_Array->IsExist(fn (A $a) => $a->b == 5); + + $this->assertTrue($srTrue); + $this->assertFalse($srFalse); } public function testUpdate () { + $this->PrepareForTest(); + $array = [ + new A("a", 3, true), + new A("c", 2, false), + new A("b", 1, true), + ]; + + $a_Array = new ObjectArray($array); + + $a_Array->Update([new A("d", 3, true)], fn (A $a) => $a->a == "a"); + + $sr = $a_Array->Search("a", "d"); + + $this->assertEquals("3", $sr->b); + $this->assertTrue($sr->c); } public function testGetRow () { + $this->PrepareForTest(); + $array = [ + new A("a", 3, true), + new A("c", 2, false), + new A("b", 1, true), + ]; + + $a_Array = new ObjectArray($array); + + $sr = $a_Array->GetRow(fn (A $a): bool => $a->b == 3); + + $this->assertInstanceOf(A::class, $sr); + $this->assertEquals('a', $sr->a); + $this->assertTrue($sr->c); } } \ No newline at end of file diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php index 51e734a..6d29bff 100644 --- a/vendor/composer/InstalledVersions.php +++ b/vendor/composer/InstalledVersions.php @@ -32,6 +32,11 @@ class InstalledVersions */ private static $installed; + /** + * @var bool + */ + private static $installedIsLocalDir; + /** * @var bool|null */ @@ -309,6 +314,12 @@ class InstalledVersions { self::$installed = $data; self::$installedByVendor = array(); + + // when using reload, we disable the duplicate protection to ensure that self::$installed data is + // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, + // so we have to assume it does not, and that may result in duplicate data being returned when listing + // all installed packages for example + self::$installedIsLocalDir = false; } /** @@ -322,19 +333,27 @@ class InstalledVersions } $installed = array(); + $copiedLocalDir = false; if (self::$canGetVendors) { + $selfDir = strtr(__DIR__, '\\', '/'); foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { + $vendorDir = strtr($vendorDir, '\\', '/'); if (isset(self::$installedByVendor[$vendorDir])) { $installed[] = self::$installedByVendor[$vendorDir]; } elseif (is_file($vendorDir.'/composer/installed.php')) { /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ $required = require $vendorDir.'/composer/installed.php'; - $installed[] = self::$installedByVendor[$vendorDir] = $required; - if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { - self::$installed = $installed[count($installed) - 1]; + self::$installedByVendor[$vendorDir] = $required; + $installed[] = $required; + if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { + self::$installed = $required; + self::$installedIsLocalDir = true; } } + if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { + $copiedLocalDir = true; + } } } @@ -350,7 +369,7 @@ class InstalledVersions } } - if (self::$installed !== array()) { + if (self::$installed !== array() && !$copiedLocalDir) { $installed[] = self::$installed; } diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 5fafdeb..6a99eed 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -7,32 +7,6 @@ $baseDir = dirname($vendorDir); return array( 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', - 'DeepCopy\\DeepCopy' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/DeepCopy.php', - 'DeepCopy\\Exception\\CloneException' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php', - 'DeepCopy\\Exception\\PropertyException' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Exception/PropertyException.php', - 'DeepCopy\\Filter\\ChainableFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/ChainableFilter.php', - 'DeepCopy\\Filter\\Doctrine\\DoctrineCollectionFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php', - 'DeepCopy\\Filter\\Doctrine\\DoctrineEmptyCollectionFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php', - 'DeepCopy\\Filter\\Doctrine\\DoctrineProxyFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php', - 'DeepCopy\\Filter\\Filter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php', - 'DeepCopy\\Filter\\KeepFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/KeepFilter.php', - 'DeepCopy\\Filter\\ReplaceFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/ReplaceFilter.php', - 'DeepCopy\\Filter\\SetNullFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php', - 'DeepCopy\\Matcher\\Doctrine\\DoctrineProxyMatcher' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php', - 'DeepCopy\\Matcher\\Matcher' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php', - 'DeepCopy\\Matcher\\PropertyMatcher' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyMatcher.php', - 'DeepCopy\\Matcher\\PropertyNameMatcher' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php', - 'DeepCopy\\Matcher\\PropertyTypeMatcher' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php', - 'DeepCopy\\Reflection\\ReflectionHelper' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php', - 'DeepCopy\\TypeFilter\\Date\\DateIntervalFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php', - 'DeepCopy\\TypeFilter\\Date\\DatePeriodFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DatePeriodFilter.php', - 'DeepCopy\\TypeFilter\\ReplaceFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php', - 'DeepCopy\\TypeFilter\\ShallowCopyFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php', - 'DeepCopy\\TypeFilter\\Spl\\ArrayObjectFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/ArrayObjectFilter.php', - 'DeepCopy\\TypeFilter\\Spl\\SplDoublyLinkedList' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php', - 'DeepCopy\\TypeFilter\\Spl\\SplDoublyLinkedListFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedListFilter.php', - 'DeepCopy\\TypeFilter\\TypeFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php', - 'DeepCopy\\TypeMatcher\\TypeMatcher' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeMatcher/TypeMatcher.php', 'PHPUnit\\Event\\Application\\Finished' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Application/Finished.php', 'PHPUnit\\Event\\Application\\FinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Application/FinishedSubscriber.php', 'PHPUnit\\Event\\Application\\Started' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Application/Started.php', @@ -90,10 +64,11 @@ return array( 'PHPUnit\\Event\\Telemetry\\Info' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/Info.php', 'PHPUnit\\Event\\Telemetry\\MemoryMeter' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/MemoryMeter.php', 'PHPUnit\\Event\\Telemetry\\MemoryUsage' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/MemoryUsage.php', + 'PHPUnit\\Event\\Telemetry\\Php81GarbageCollectorStatusProvider' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/Php81GarbageCollectorStatusProvider.php', + 'PHPUnit\\Event\\Telemetry\\Php83GarbageCollectorStatusProvider' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/Php83GarbageCollectorStatusProvider.php', 'PHPUnit\\Event\\Telemetry\\Snapshot' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/Snapshot.php', 'PHPUnit\\Event\\Telemetry\\StopWatch' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/StopWatch.php', 'PHPUnit\\Event\\Telemetry\\System' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/System.php', - 'PHPUnit\\Event\\Telemetry\\SystemGarbageCollectorStatusProvider' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/SystemGarbageCollectorStatusProvider.php', 'PHPUnit\\Event\\Telemetry\\SystemMemoryMeter' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/SystemMemoryMeter.php', 'PHPUnit\\Event\\Telemetry\\SystemStopWatch' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatch.php', 'PHPUnit\\Event\\Telemetry\\SystemStopWatchWithOffset' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatchWithOffset.php', @@ -200,8 +175,14 @@ return array( 'PHPUnit\\Event\\Test\\MarkedIncompleteSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Outcome/MarkedIncompleteSubscriber.php', 'PHPUnit\\Event\\Test\\MockObjectCreated' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectCreated.php', 'PHPUnit\\Event\\Test\\MockObjectCreatedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectCreatedSubscriber.php', + 'PHPUnit\\Event\\Test\\MockObjectForAbstractClassCreated' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForAbstractClassCreated.php', + 'PHPUnit\\Event\\Test\\MockObjectForAbstractClassCreatedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForAbstractClassCreatedSubscriber.php', 'PHPUnit\\Event\\Test\\MockObjectForIntersectionOfInterfacesCreated' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForIntersectionOfInterfacesCreated.php', 'PHPUnit\\Event\\Test\\MockObjectForIntersectionOfInterfacesCreatedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForIntersectionOfInterfacesCreatedSubscriber.php', + 'PHPUnit\\Event\\Test\\MockObjectForTraitCreated' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForTraitCreated.php', + 'PHPUnit\\Event\\Test\\MockObjectForTraitCreatedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForTraitCreatedSubscriber.php', + 'PHPUnit\\Event\\Test\\MockObjectFromWsdlCreated' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectFromWsdlCreated.php', + 'PHPUnit\\Event\\Test\\MockObjectFromWsdlCreatedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectFromWsdlCreatedSubscriber.php', 'PHPUnit\\Event\\Test\\NoComparisonFailureException' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/NoComparisonFailureException.php', 'PHPUnit\\Event\\Test\\NoticeTriggered' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/NoticeTriggered.php', 'PHPUnit\\Event\\Test\\NoticeTriggeredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Issue/NoticeTriggeredSubscriber.php', @@ -243,6 +224,8 @@ return array( 'PHPUnit\\Event\\Test\\PrintedUnexpectedOutputSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/PrintedUnexpectedOutputSubscriber.php', 'PHPUnit\\Event\\Test\\Skipped' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Outcome/Skipped.php', 'PHPUnit\\Event\\Test\\SkippedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Outcome/SkippedSubscriber.php', + 'PHPUnit\\Event\\Test\\TestProxyCreated' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestProxyCreated.php', + 'PHPUnit\\Event\\Test\\TestProxyCreatedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestProxyCreatedSubscriber.php', 'PHPUnit\\Event\\Test\\TestStubCreated' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubCreated.php', 'PHPUnit\\Event\\Test\\TestStubCreatedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubCreatedSubscriber.php', 'PHPUnit\\Event\\Test\\TestStubForIntersectionOfInterfacesCreated' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubForIntersectionOfInterfacesCreated.php', @@ -266,11 +249,8 @@ return array( 'PHPUnit\\Framework\\Attributes\\Before' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/Before.php', 'PHPUnit\\Framework\\Attributes\\BeforeClass' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/BeforeClass.php', 'PHPUnit\\Framework\\Attributes\\CoversClass' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversClass.php', - 'PHPUnit\\Framework\\Attributes\\CoversClassesThatExtendClass' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversClassesThatExtendClass.php', - 'PHPUnit\\Framework\\Attributes\\CoversClassesThatImplementInterface' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversClassesThatImplementInterface.php', 'PHPUnit\\Framework\\Attributes\\CoversFunction' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversFunction.php', 'PHPUnit\\Framework\\Attributes\\CoversMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversMethod.php', - 'PHPUnit\\Framework\\Attributes\\CoversNamespace' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversNamespace.php', 'PHPUnit\\Framework\\Attributes\\CoversNothing' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversNothing.php', 'PHPUnit\\Framework\\Attributes\\CoversTrait' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversTrait.php', 'PHPUnit\\Framework\\Attributes\\DataProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/DataProvider.php', @@ -296,7 +276,6 @@ return array( 'PHPUnit\\Framework\\Attributes\\PostCondition' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/PostCondition.php', 'PHPUnit\\Framework\\Attributes\\PreCondition' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/PreCondition.php', 'PHPUnit\\Framework\\Attributes\\PreserveGlobalState' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/PreserveGlobalState.php', - 'PHPUnit\\Framework\\Attributes\\RequiresEnvironmentVariable' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/RequiresEnvironmentVariable.php', 'PHPUnit\\Framework\\Attributes\\RequiresFunction' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/RequiresFunction.php', 'PHPUnit\\Framework\\Attributes\\RequiresMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/RequiresMethod.php', 'PHPUnit\\Framework\\Attributes\\RequiresOperatingSystem' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/RequiresOperatingSystem.php', @@ -316,11 +295,8 @@ return array( 'PHPUnit\\Framework\\Attributes\\TestWithJson' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/TestWithJson.php', 'PHPUnit\\Framework\\Attributes\\Ticket' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/Ticket.php', 'PHPUnit\\Framework\\Attributes\\UsesClass' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/UsesClass.php', - 'PHPUnit\\Framework\\Attributes\\UsesClassesThatExtendClass' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/UsesClassesThatExtendClass.php', - 'PHPUnit\\Framework\\Attributes\\UsesClassesThatImplementInterface' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/UsesClassesThatImplementInterface.php', 'PHPUnit\\Framework\\Attributes\\UsesFunction' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/UsesFunction.php', 'PHPUnit\\Framework\\Attributes\\UsesMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/UsesMethod.php', - 'PHPUnit\\Framework\\Attributes\\UsesNamespace' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/UsesNamespace.php', 'PHPUnit\\Framework\\Attributes\\UsesTrait' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/UsesTrait.php', 'PHPUnit\\Framework\\Attributes\\WithoutErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/WithoutErrorHandler.php', 'PHPUnit\\Framework\\CodeCoverageException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/CodeCoverageException.php', @@ -402,26 +378,36 @@ return array( 'PHPUnit\\Framework\\MockObject\\Builder\\MethodNameMatch' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Builder/MethodNameMatch.php', 'PHPUnit\\Framework\\MockObject\\Builder\\ParametersMatch' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Builder/ParametersMatch.php', 'PHPUnit\\Framework\\MockObject\\Builder\\Stub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Builder/Stub.php', + 'PHPUnit\\Framework\\MockObject\\CannotCloneTestDoubleForReadonlyClassException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/CannotCloneTestDoubleForReadonlyClassException.php', 'PHPUnit\\Framework\\MockObject\\CannotUseOnlyMethodsException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseOnlyMethodsException.php', 'PHPUnit\\Framework\\MockObject\\ConfigurableMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php', 'PHPUnit\\Framework\\MockObject\\DoubledCloneMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/DoubledCloneMethod.php', + 'PHPUnit\\Framework\\MockObject\\ErrorCloneMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/ErrorCloneMethod.php', 'PHPUnit\\Framework\\MockObject\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php', + 'PHPUnit\\Framework\\MockObject\\GeneratedAsMockObject' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/GeneratedAsMockObject.php', + 'PHPUnit\\Framework\\MockObject\\GeneratedAsTestStub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/GeneratedAsTestStub.php', + 'PHPUnit\\Framework\\MockObject\\Generator\\CannotUseAddMethodsException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/CannotUseAddMethodsException.php', 'PHPUnit\\Framework\\MockObject\\Generator\\ClassIsEnumerationException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsEnumerationException.php', 'PHPUnit\\Framework\\MockObject\\Generator\\ClassIsFinalException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsFinalException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\DoubledClass' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\DoubledMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledMethod.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\DoubledMethodSet' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledMethodSet.php', 'PHPUnit\\Framework\\MockObject\\Generator\\DuplicateMethodException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/DuplicateMethodException.php', 'PHPUnit\\Framework\\MockObject\\Generator\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/Exception.php', 'PHPUnit\\Framework\\MockObject\\Generator\\Generator' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Generator.php', 'PHPUnit\\Framework\\MockObject\\Generator\\HookedProperty' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/HookedProperty.php', 'PHPUnit\\Framework\\MockObject\\Generator\\HookedPropertyGenerator' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/HookedPropertyGenerator.php', 'PHPUnit\\Framework\\MockObject\\Generator\\InvalidMethodNameException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/InvalidMethodNameException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\MethodNamedMethodException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/MethodNamedMethodException.php', + 'PHPUnit\\Framework\\MockObject\\Generator\\MockClass' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/MockClass.php', + 'PHPUnit\\Framework\\MockObject\\Generator\\MockMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/MockMethod.php', + 'PHPUnit\\Framework\\MockObject\\Generator\\MockMethodSet' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/MockMethodSet.php', + 'PHPUnit\\Framework\\MockObject\\Generator\\MockTrait' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/MockTrait.php', + 'PHPUnit\\Framework\\MockObject\\Generator\\MockType' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/MockType.php', 'PHPUnit\\Framework\\MockObject\\Generator\\NameAlreadyInUseException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/NameAlreadyInUseException.php', + 'PHPUnit\\Framework\\MockObject\\Generator\\OriginalConstructorInvocationRequiredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/OriginalConstructorInvocationRequiredException.php', 'PHPUnit\\Framework\\MockObject\\Generator\\ReflectionException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ReflectionException.php', 'PHPUnit\\Framework\\MockObject\\Generator\\RuntimeException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/RuntimeException.php', + 'PHPUnit\\Framework\\MockObject\\Generator\\SoapExtensionNotAvailableException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/SoapExtensionNotAvailableException.php', 'PHPUnit\\Framework\\MockObject\\Generator\\TemplateLoader' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/TemplateLoader.php', + 'PHPUnit\\Framework\\MockObject\\Generator\\UnknownClassException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownClassException.php', + 'PHPUnit\\Framework\\MockObject\\Generator\\UnknownTraitException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownTraitException.php', 'PHPUnit\\Framework\\MockObject\\Generator\\UnknownTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownTypeException.php', 'PHPUnit\\Framework\\MockObject\\IncompatibleReturnValueException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php', 'PHPUnit\\Framework\\MockObject\\Invocation' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Invocation.php', @@ -439,6 +425,7 @@ return array( 'PHPUnit\\Framework\\MockObject\\MockObject' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/MockObject.php', 'PHPUnit\\Framework\\MockObject\\MockObjectApi' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/MockObjectApi.php', 'PHPUnit\\Framework\\MockObject\\MockObjectInternal' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/MockObjectInternal.php', + 'PHPUnit\\Framework\\MockObject\\MutableStubApi' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/MutableStubApi.php', 'PHPUnit\\Framework\\MockObject\\NeverReturningMethodException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/NeverReturningMethodException.php', 'PHPUnit\\Framework\\MockObject\\NoMoreReturnValuesConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/NoMoreReturnValuesConfiguredException.php', 'PHPUnit\\Framework\\MockObject\\ProxiedCloneMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/ProxiedCloneMethod.php', @@ -506,7 +493,7 @@ return array( 'PHPUnit\\Framework\\TestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite.php', 'PHPUnit\\Framework\\TestSuiteIterator' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuiteIterator.php', 'PHPUnit\\Framework\\UnknownClassOrInterfaceException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/UnknownClassOrInterfaceException.php', - 'PHPUnit\\Framework\\UnknownNativeTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/UnknownNativeTypeException.php', + 'PHPUnit\\Framework\\UnknownTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/UnknownTypeException.php', 'PHPUnit\\Logging\\EventLogger' => $vendorDir . '/phpunit/phpunit/src/Logging/EventLogger.php', 'PHPUnit\\Logging\\JUnit\\JunitXmlLogger' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/JunitXmlLogger.php', 'PHPUnit\\Logging\\JUnit\\Subscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/Subscriber.php', @@ -563,6 +550,9 @@ return array( 'PHPUnit\\Logging\\TestDox\\TestTriggeredWarningSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredWarningSubscriber.php', 'PHPUnit\\Metadata\\After' => $vendorDir . '/phpunit/phpunit/src/Metadata/After.php', 'PHPUnit\\Metadata\\AfterClass' => $vendorDir . '/phpunit/phpunit/src/Metadata/AfterClass.php', + 'PHPUnit\\Metadata\\Annotation\\Parser\\DocBlock' => $vendorDir . '/phpunit/phpunit/src/Metadata/Parser/Annotation/DocBlock.php', + 'PHPUnit\\Metadata\\Annotation\\Parser\\Registry' => $vendorDir . '/phpunit/phpunit/src/Metadata/Parser/Annotation/Registry.php', + 'PHPUnit\\Metadata\\AnnotationsAreNotSupportedForInternalClassesException' => $vendorDir . '/phpunit/phpunit/src/Metadata/Exception/AnnotationsAreNotSupportedForInternalClassesException.php', 'PHPUnit\\Metadata\\Api\\CodeCoverage' => $vendorDir . '/phpunit/phpunit/src/Metadata/Api/CodeCoverage.php', 'PHPUnit\\Metadata\\Api\\DataProvider' => $vendorDir . '/phpunit/phpunit/src/Metadata/Api/DataProvider.php', 'PHPUnit\\Metadata\\Api\\Dependencies' => $vendorDir . '/phpunit/phpunit/src/Metadata/Api/Dependencies.php', @@ -573,12 +563,11 @@ return array( 'PHPUnit\\Metadata\\BackupStaticProperties' => $vendorDir . '/phpunit/phpunit/src/Metadata/BackupStaticProperties.php', 'PHPUnit\\Metadata\\Before' => $vendorDir . '/phpunit/phpunit/src/Metadata/Before.php', 'PHPUnit\\Metadata\\BeforeClass' => $vendorDir . '/phpunit/phpunit/src/Metadata/BeforeClass.php', + 'PHPUnit\\Metadata\\Covers' => $vendorDir . '/phpunit/phpunit/src/Metadata/Covers.php', 'PHPUnit\\Metadata\\CoversClass' => $vendorDir . '/phpunit/phpunit/src/Metadata/CoversClass.php', - 'PHPUnit\\Metadata\\CoversClassesThatExtendClass' => $vendorDir . '/phpunit/phpunit/src/Metadata/CoversClassesThatExtendClass.php', - 'PHPUnit\\Metadata\\CoversClassesThatImplementInterface' => $vendorDir . '/phpunit/phpunit/src/Metadata/CoversClassesThatImplementInterface.php', + 'PHPUnit\\Metadata\\CoversDefaultClass' => $vendorDir . '/phpunit/phpunit/src/Metadata/CoversDefaultClass.php', 'PHPUnit\\Metadata\\CoversFunction' => $vendorDir . '/phpunit/phpunit/src/Metadata/CoversFunction.php', 'PHPUnit\\Metadata\\CoversMethod' => $vendorDir . '/phpunit/phpunit/src/Metadata/CoversMethod.php', - 'PHPUnit\\Metadata\\CoversNamespace' => $vendorDir . '/phpunit/phpunit/src/Metadata/CoversNamespace.php', 'PHPUnit\\Metadata\\CoversNothing' => $vendorDir . '/phpunit/phpunit/src/Metadata/CoversNothing.php', 'PHPUnit\\Metadata\\CoversTrait' => $vendorDir . '/phpunit/phpunit/src/Metadata/CoversTrait.php', 'PHPUnit\\Metadata\\DataProvider' => $vendorDir . '/phpunit/phpunit/src/Metadata/DataProvider.php', @@ -597,14 +586,16 @@ return array( 'PHPUnit\\Metadata\\MetadataCollection' => $vendorDir . '/phpunit/phpunit/src/Metadata/MetadataCollection.php', 'PHPUnit\\Metadata\\MetadataCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/Metadata/MetadataCollectionIterator.php', 'PHPUnit\\Metadata\\NoVersionRequirementException' => $vendorDir . '/phpunit/phpunit/src/Metadata/Exception/NoVersionRequirementException.php', + 'PHPUnit\\Metadata\\Parser\\AnnotationParser' => $vendorDir . '/phpunit/phpunit/src/Metadata/Parser/AnnotationParser.php', 'PHPUnit\\Metadata\\Parser\\AttributeParser' => $vendorDir . '/phpunit/phpunit/src/Metadata/Parser/AttributeParser.php', 'PHPUnit\\Metadata\\Parser\\CachingParser' => $vendorDir . '/phpunit/phpunit/src/Metadata/Parser/CachingParser.php', 'PHPUnit\\Metadata\\Parser\\Parser' => $vendorDir . '/phpunit/phpunit/src/Metadata/Parser/Parser.php', + 'PHPUnit\\Metadata\\Parser\\ParserChain' => $vendorDir . '/phpunit/phpunit/src/Metadata/Parser/ParserChain.php', 'PHPUnit\\Metadata\\Parser\\Registry' => $vendorDir . '/phpunit/phpunit/src/Metadata/Parser/Registry.php', 'PHPUnit\\Metadata\\PostCondition' => $vendorDir . '/phpunit/phpunit/src/Metadata/PostCondition.php', 'PHPUnit\\Metadata\\PreCondition' => $vendorDir . '/phpunit/phpunit/src/Metadata/PreCondition.php', 'PHPUnit\\Metadata\\PreserveGlobalState' => $vendorDir . '/phpunit/phpunit/src/Metadata/PreserveGlobalState.php', - 'PHPUnit\\Metadata\\RequiresEnvironmentVariable' => $vendorDir . '/phpunit/phpunit/src/Metadata/RequiresEnvironmentVariable.php', + 'PHPUnit\\Metadata\\ReflectionException' => $vendorDir . '/phpunit/phpunit/src/Metadata/Exception/ReflectionException.php', 'PHPUnit\\Metadata\\RequiresFunction' => $vendorDir . '/phpunit/phpunit/src/Metadata/RequiresFunction.php', 'PHPUnit\\Metadata\\RequiresMethod' => $vendorDir . '/phpunit/phpunit/src/Metadata/RequiresMethod.php', 'PHPUnit\\Metadata\\RequiresOperatingSystem' => $vendorDir . '/phpunit/phpunit/src/Metadata/RequiresOperatingSystem.php', @@ -620,12 +611,11 @@ return array( 'PHPUnit\\Metadata\\Test' => $vendorDir . '/phpunit/phpunit/src/Metadata/Test.php', 'PHPUnit\\Metadata\\TestDox' => $vendorDir . '/phpunit/phpunit/src/Metadata/TestDox.php', 'PHPUnit\\Metadata\\TestWith' => $vendorDir . '/phpunit/phpunit/src/Metadata/TestWith.php', + 'PHPUnit\\Metadata\\Uses' => $vendorDir . '/phpunit/phpunit/src/Metadata/Uses.php', 'PHPUnit\\Metadata\\UsesClass' => $vendorDir . '/phpunit/phpunit/src/Metadata/UsesClass.php', - 'PHPUnit\\Metadata\\UsesClassesThatExtendClass' => $vendorDir . '/phpunit/phpunit/src/Metadata/UsesClassesThatExtendClass.php', - 'PHPUnit\\Metadata\\UsesClassesThatImplementInterface' => $vendorDir . '/phpunit/phpunit/src/Metadata/UsesClassesThatImplementInterface.php', + 'PHPUnit\\Metadata\\UsesDefaultClass' => $vendorDir . '/phpunit/phpunit/src/Metadata/UsesDefaultClass.php', 'PHPUnit\\Metadata\\UsesFunction' => $vendorDir . '/phpunit/phpunit/src/Metadata/UsesFunction.php', 'PHPUnit\\Metadata\\UsesMethod' => $vendorDir . '/phpunit/phpunit/src/Metadata/UsesMethod.php', - 'PHPUnit\\Metadata\\UsesNamespace' => $vendorDir . '/phpunit/phpunit/src/Metadata/UsesNamespace.php', 'PHPUnit\\Metadata\\UsesTrait' => $vendorDir . '/phpunit/phpunit/src/Metadata/UsesTrait.php', 'PHPUnit\\Metadata\\Version\\ComparisonRequirement' => $vendorDir . '/phpunit/phpunit/src/Metadata/Version/ComparisonRequirement.php', 'PHPUnit\\Metadata\\Version\\ConstraintRequirement' => $vendorDir . '/phpunit/phpunit/src/Metadata/Version/ConstraintRequirement.php', @@ -923,6 +913,7 @@ return array( 'PHPUnit\\TextUI\\XmlConfiguration\\UpdateSchemaLocation' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/UpdateSchemaLocation.php', 'PHPUnit\\TextUI\\XmlConfiguration\\ValidationResult' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Validator/ValidationResult.php', 'PHPUnit\\TextUI\\XmlConfiguration\\Validator' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Validator/Validator.php', + 'PHPUnit\\Util\\Cloner' => $vendorDir . '/phpunit/phpunit/src/Util/Cloner.php', 'PHPUnit\\Util\\Color' => $vendorDir . '/phpunit/phpunit/src/Util/Color.php', 'PHPUnit\\Util\\Exception' => $vendorDir . '/phpunit/phpunit/src/Util/Exception/Exception.php', 'PHPUnit\\Util\\ExcludeList' => $vendorDir . '/phpunit/phpunit/src/Util/ExcludeList.php', @@ -1021,270 +1012,6 @@ return array( 'PharIo\\Version\\VersionConstraintParser' => $vendorDir . '/phar-io/version/src/VersionConstraintParser.php', 'PharIo\\Version\\VersionConstraintValue' => $vendorDir . '/phar-io/version/src/VersionConstraintValue.php', 'PharIo\\Version\\VersionNumber' => $vendorDir . '/phar-io/version/src/VersionNumber.php', - 'PhpParser\\Builder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder.php', - 'PhpParser\\BuilderFactory' => $vendorDir . '/nikic/php-parser/lib/PhpParser/BuilderFactory.php', - 'PhpParser\\BuilderHelpers' => $vendorDir . '/nikic/php-parser/lib/PhpParser/BuilderHelpers.php', - 'PhpParser\\Builder\\ClassConst' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php', - 'PhpParser\\Builder\\Class_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Class_.php', - 'PhpParser\\Builder\\Declaration' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Declaration.php', - 'PhpParser\\Builder\\EnumCase' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php', - 'PhpParser\\Builder\\Enum_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Enum_.php', - 'PhpParser\\Builder\\FunctionLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php', - 'PhpParser\\Builder\\Function_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Function_.php', - 'PhpParser\\Builder\\Interface_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Interface_.php', - 'PhpParser\\Builder\\Method' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Method.php', - 'PhpParser\\Builder\\Namespace_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php', - 'PhpParser\\Builder\\Param' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Param.php', - 'PhpParser\\Builder\\Property' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Property.php', - 'PhpParser\\Builder\\TraitUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php', - 'PhpParser\\Builder\\TraitUseAdaptation' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php', - 'PhpParser\\Builder\\Trait_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Trait_.php', - 'PhpParser\\Builder\\Use_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Use_.php', - 'PhpParser\\Comment' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Comment.php', - 'PhpParser\\Comment\\Doc' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Comment/Doc.php', - 'PhpParser\\ConstExprEvaluationException' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php', - 'PhpParser\\ConstExprEvaluator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php', - 'PhpParser\\Error' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Error.php', - 'PhpParser\\ErrorHandler' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ErrorHandler.php', - 'PhpParser\\ErrorHandler\\Collecting' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php', - 'PhpParser\\ErrorHandler\\Throwing' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php', - 'PhpParser\\Internal\\DiffElem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php', - 'PhpParser\\Internal\\Differ' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/Differ.php', - 'PhpParser\\Internal\\PrintableNewAnonClassNode' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php', - 'PhpParser\\Internal\\TokenPolyfill' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php', - 'PhpParser\\Internal\\TokenStream' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php', - 'PhpParser\\JsonDecoder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/JsonDecoder.php', - 'PhpParser\\Lexer' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer.php', - 'PhpParser\\Lexer\\Emulative' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php', - 'PhpParser\\Lexer\\TokenEmulator\\AsymmetricVisibilityTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\AttributeEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\EnumTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\ExplicitOctalEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\KeywordEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\MatchTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\NullsafeTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\PropertyTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\ReadonlyFunctionTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\ReadonlyTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\ReverseEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\TokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php', - 'PhpParser\\Modifiers' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Modifiers.php', - 'PhpParser\\NameContext' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NameContext.php', - 'PhpParser\\Node' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node.php', - 'PhpParser\\NodeAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeAbstract.php', - 'PhpParser\\NodeDumper' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeDumper.php', - 'PhpParser\\NodeFinder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeFinder.php', - 'PhpParser\\NodeTraverser' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeTraverser.php', - 'PhpParser\\NodeTraverserInterface' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php', - 'PhpParser\\NodeVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor.php', - 'PhpParser\\NodeVisitorAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php', - 'PhpParser\\NodeVisitor\\CloningVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php', - 'PhpParser\\NodeVisitor\\CommentAnnotatingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php', - 'PhpParser\\NodeVisitor\\FindingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php', - 'PhpParser\\NodeVisitor\\FirstFindingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php', - 'PhpParser\\NodeVisitor\\NameResolver' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php', - 'PhpParser\\NodeVisitor\\NodeConnectingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php', - 'PhpParser\\NodeVisitor\\ParentConnectingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php', - 'PhpParser\\Node\\Arg' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Arg.php', - 'PhpParser\\Node\\ArrayItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php', - 'PhpParser\\Node\\Attribute' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Attribute.php', - 'PhpParser\\Node\\AttributeGroup' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php', - 'PhpParser\\Node\\ClosureUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php', - 'PhpParser\\Node\\ComplexType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/ComplexType.php', - 'PhpParser\\Node\\Const_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Const_.php', - 'PhpParser\\Node\\DeclareItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php', - 'PhpParser\\Node\\Expr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr.php', - 'PhpParser\\Node\\Expr\\ArrayDimFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php', - 'PhpParser\\Node\\Expr\\ArrayItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php', - 'PhpParser\\Node\\Expr\\Array_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php', - 'PhpParser\\Node\\Expr\\ArrowFunction' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php', - 'PhpParser\\Node\\Expr\\Assign' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php', - 'PhpParser\\Node\\Expr\\AssignOp' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php', - 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php', - 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php', - 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseXor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Coalesce' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Concat' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Div' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Minus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Mod' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Mul' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Plus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Pow' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php', - 'PhpParser\\Node\\Expr\\AssignOp\\ShiftLeft' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php', - 'PhpParser\\Node\\Expr\\AssignOp\\ShiftRight' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php', - 'PhpParser\\Node\\Expr\\AssignRef' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php', - 'PhpParser\\Node\\Expr\\BinaryOp' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseXor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\BooleanAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\BooleanOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Coalesce' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Concat' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Div' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Equal' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Greater' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\GreaterOrEqual' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Identical' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalXor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Minus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Mod' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Mul' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\NotEqual' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\NotIdentical' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Plus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Pow' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\ShiftLeft' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\ShiftRight' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Smaller' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\SmallerOrEqual' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Spaceship' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php', - 'PhpParser\\Node\\Expr\\BitwiseNot' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php', - 'PhpParser\\Node\\Expr\\BooleanNot' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php', - 'PhpParser\\Node\\Expr\\CallLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php', - 'PhpParser\\Node\\Expr\\Cast' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php', - 'PhpParser\\Node\\Expr\\Cast\\Array_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php', - 'PhpParser\\Node\\Expr\\Cast\\Bool_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php', - 'PhpParser\\Node\\Expr\\Cast\\Double' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php', - 'PhpParser\\Node\\Expr\\Cast\\Int_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php', - 'PhpParser\\Node\\Expr\\Cast\\Object_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php', - 'PhpParser\\Node\\Expr\\Cast\\String_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php', - 'PhpParser\\Node\\Expr\\Cast\\Unset_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php', - 'PhpParser\\Node\\Expr\\ClassConstFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php', - 'PhpParser\\Node\\Expr\\Clone_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php', - 'PhpParser\\Node\\Expr\\Closure' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php', - 'PhpParser\\Node\\Expr\\ClosureUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php', - 'PhpParser\\Node\\Expr\\ConstFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php', - 'PhpParser\\Node\\Expr\\Empty_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php', - 'PhpParser\\Node\\Expr\\Error' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php', - 'PhpParser\\Node\\Expr\\ErrorSuppress' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php', - 'PhpParser\\Node\\Expr\\Eval_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php', - 'PhpParser\\Node\\Expr\\Exit_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php', - 'PhpParser\\Node\\Expr\\FuncCall' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php', - 'PhpParser\\Node\\Expr\\Include_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php', - 'PhpParser\\Node\\Expr\\Instanceof_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php', - 'PhpParser\\Node\\Expr\\Isset_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php', - 'PhpParser\\Node\\Expr\\List_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php', - 'PhpParser\\Node\\Expr\\Match_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php', - 'PhpParser\\Node\\Expr\\MethodCall' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php', - 'PhpParser\\Node\\Expr\\New_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php', - 'PhpParser\\Node\\Expr\\NullsafeMethodCall' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php', - 'PhpParser\\Node\\Expr\\NullsafePropertyFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php', - 'PhpParser\\Node\\Expr\\PostDec' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php', - 'PhpParser\\Node\\Expr\\PostInc' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php', - 'PhpParser\\Node\\Expr\\PreDec' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php', - 'PhpParser\\Node\\Expr\\PreInc' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php', - 'PhpParser\\Node\\Expr\\Print_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php', - 'PhpParser\\Node\\Expr\\PropertyFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php', - 'PhpParser\\Node\\Expr\\ShellExec' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php', - 'PhpParser\\Node\\Expr\\StaticCall' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php', - 'PhpParser\\Node\\Expr\\StaticPropertyFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php', - 'PhpParser\\Node\\Expr\\Ternary' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php', - 'PhpParser\\Node\\Expr\\Throw_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php', - 'PhpParser\\Node\\Expr\\UnaryMinus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php', - 'PhpParser\\Node\\Expr\\UnaryPlus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php', - 'PhpParser\\Node\\Expr\\Variable' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php', - 'PhpParser\\Node\\Expr\\YieldFrom' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php', - 'PhpParser\\Node\\Expr\\Yield_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php', - 'PhpParser\\Node\\FunctionLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php', - 'PhpParser\\Node\\Identifier' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Identifier.php', - 'PhpParser\\Node\\InterpolatedStringPart' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php', - 'PhpParser\\Node\\IntersectionType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php', - 'PhpParser\\Node\\MatchArm' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/MatchArm.php', - 'PhpParser\\Node\\Name' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name.php', - 'PhpParser\\Node\\Name\\FullyQualified' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php', - 'PhpParser\\Node\\Name\\Relative' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php', - 'PhpParser\\Node\\NullableType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/NullableType.php', - 'PhpParser\\Node\\Param' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Param.php', - 'PhpParser\\Node\\PropertyHook' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php', - 'PhpParser\\Node\\PropertyItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php', - 'PhpParser\\Node\\Scalar' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar.php', - 'PhpParser\\Node\\Scalar\\DNumber' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php', - 'PhpParser\\Node\\Scalar\\Encapsed' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php', - 'PhpParser\\Node\\Scalar\\EncapsedStringPart' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php', - 'PhpParser\\Node\\Scalar\\Float_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php', - 'PhpParser\\Node\\Scalar\\Int_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php', - 'PhpParser\\Node\\Scalar\\InterpolatedString' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php', - 'PhpParser\\Node\\Scalar\\LNumber' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php', - 'PhpParser\\Node\\Scalar\\MagicConst' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Class_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Dir' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\File' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Function_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Line' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Method' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Namespace_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Property' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Property.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Trait_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php', - 'PhpParser\\Node\\Scalar\\String_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php', - 'PhpParser\\Node\\StaticVar' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/StaticVar.php', - 'PhpParser\\Node\\Stmt' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt.php', - 'PhpParser\\Node\\Stmt\\Block' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php', - 'PhpParser\\Node\\Stmt\\Break_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php', - 'PhpParser\\Node\\Stmt\\Case_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php', - 'PhpParser\\Node\\Stmt\\Catch_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php', - 'PhpParser\\Node\\Stmt\\ClassConst' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php', - 'PhpParser\\Node\\Stmt\\ClassLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php', - 'PhpParser\\Node\\Stmt\\ClassMethod' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php', - 'PhpParser\\Node\\Stmt\\Class_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php', - 'PhpParser\\Node\\Stmt\\Const_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php', - 'PhpParser\\Node\\Stmt\\Continue_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php', - 'PhpParser\\Node\\Stmt\\DeclareDeclare' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php', - 'PhpParser\\Node\\Stmt\\Declare_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php', - 'PhpParser\\Node\\Stmt\\Do_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php', - 'PhpParser\\Node\\Stmt\\Echo_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php', - 'PhpParser\\Node\\Stmt\\ElseIf_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php', - 'PhpParser\\Node\\Stmt\\Else_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php', - 'PhpParser\\Node\\Stmt\\EnumCase' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php', - 'PhpParser\\Node\\Stmt\\Enum_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php', - 'PhpParser\\Node\\Stmt\\Expression' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php', - 'PhpParser\\Node\\Stmt\\Finally_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php', - 'PhpParser\\Node\\Stmt\\For_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php', - 'PhpParser\\Node\\Stmt\\Foreach_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php', - 'PhpParser\\Node\\Stmt\\Function_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php', - 'PhpParser\\Node\\Stmt\\Global_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php', - 'PhpParser\\Node\\Stmt\\Goto_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php', - 'PhpParser\\Node\\Stmt\\GroupUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php', - 'PhpParser\\Node\\Stmt\\HaltCompiler' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php', - 'PhpParser\\Node\\Stmt\\If_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php', - 'PhpParser\\Node\\Stmt\\InlineHTML' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php', - 'PhpParser\\Node\\Stmt\\Interface_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php', - 'PhpParser\\Node\\Stmt\\Label' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php', - 'PhpParser\\Node\\Stmt\\Namespace_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php', - 'PhpParser\\Node\\Stmt\\Nop' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php', - 'PhpParser\\Node\\Stmt\\Property' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php', - 'PhpParser\\Node\\Stmt\\PropertyProperty' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php', - 'PhpParser\\Node\\Stmt\\Return_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php', - 'PhpParser\\Node\\Stmt\\StaticVar' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php', - 'PhpParser\\Node\\Stmt\\Static_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php', - 'PhpParser\\Node\\Stmt\\Switch_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php', - 'PhpParser\\Node\\Stmt\\TraitUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php', - 'PhpParser\\Node\\Stmt\\TraitUseAdaptation' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php', - 'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Alias' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php', - 'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Precedence' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php', - 'PhpParser\\Node\\Stmt\\Trait_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php', - 'PhpParser\\Node\\Stmt\\TryCatch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php', - 'PhpParser\\Node\\Stmt\\Unset_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php', - 'PhpParser\\Node\\Stmt\\UseUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php', - 'PhpParser\\Node\\Stmt\\Use_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php', - 'PhpParser\\Node\\Stmt\\While_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php', - 'PhpParser\\Node\\UnionType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/UnionType.php', - 'PhpParser\\Node\\UseItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/UseItem.php', - 'PhpParser\\Node\\VarLikeIdentifier' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php', - 'PhpParser\\Node\\VariadicPlaceholder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php', - 'PhpParser\\Parser' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser.php', - 'PhpParser\\ParserAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ParserAbstract.php', - 'PhpParser\\ParserFactory' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ParserFactory.php', - 'PhpParser\\Parser\\Php7' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Php7.php', - 'PhpParser\\Parser\\Php8' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Php8.php', - 'PhpParser\\PhpVersion' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PhpVersion.php', - 'PhpParser\\PrettyPrinter' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinter.php', - 'PhpParser\\PrettyPrinterAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php', - 'PhpParser\\PrettyPrinter\\Standard' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php', - 'PhpParser\\Token' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Token.php', 'SebastianBergmann\\CliParser\\AmbiguousOptionException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php', 'SebastianBergmann\\CliParser\\Exception' => $vendorDir . '/sebastian/cli-parser/src/exceptions/Exception.php', 'SebastianBergmann\\CliParser\\OptionDoesNotAllowArgumentException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/OptionDoesNotAllowArgumentException.php', @@ -1295,6 +1022,7 @@ return array( 'SebastianBergmann\\CodeCoverage\\CodeCoverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage.php', 'SebastianBergmann\\CodeCoverage\\Data\\ProcessedCodeCoverageData' => $vendorDir . '/phpunit/php-code-coverage/src/Data/ProcessedCodeCoverageData.php', 'SebastianBergmann\\CodeCoverage\\Data\\RawCodeCoverageData' => $vendorDir . '/phpunit/php-code-coverage/src/Data/RawCodeCoverageData.php', + 'SebastianBergmann\\CodeCoverage\\DeadCodeDetectionNotSupportedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/DeadCodeDetectionNotSupportedException.php', 'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Driver.php', 'SebastianBergmann\\CodeCoverage\\Driver\\PathExistsButIsNotDirectoryException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/PathExistsButIsNotDirectoryException.php', 'SebastianBergmann\\CodeCoverage\\Driver\\PcovDriver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/PcovDriver.php', @@ -1304,7 +1032,6 @@ return array( 'SebastianBergmann\\CodeCoverage\\Driver\\XdebugDriver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/XdebugDriver.php', 'SebastianBergmann\\CodeCoverage\\Driver\\XdebugNotAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/XdebugNotAvailableException.php', 'SebastianBergmann\\CodeCoverage\\Driver\\XdebugNotEnabledException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/XdebugNotEnabledException.php', - 'SebastianBergmann\\CodeCoverage\\Driver\\XdebugVersionNotSupportedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/XdebugVersionNotSupportedException.php', 'SebastianBergmann\\CodeCoverage\\Exception' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/Exception.php', 'SebastianBergmann\\CodeCoverage\\FileCouldNotBeWrittenException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/FileCouldNotBeWrittenException.php', 'SebastianBergmann\\CodeCoverage\\Filter' => $vendorDir . '/phpunit/php-code-coverage/src/Filter.php', @@ -1349,36 +1076,12 @@ return array( 'SebastianBergmann\\CodeCoverage\\StaticAnalysisCacheNotConfiguredException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/StaticAnalysisCacheNotConfiguredException.php', 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CacheWarmer' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/CacheWarmer.php', 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CachingFileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Class_' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Class_.php', 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CodeUnitFindingVisitor' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/CodeUnitFindingVisitor.php', 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ExecutableLinesFindingVisitor' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/ExecutableLinesFindingVisitor.php', 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\FileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/FileAnalyser.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Function_' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Function_.php', 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\IgnoredLinesFindingVisitor' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/IgnoredLinesFindingVisitor.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Interface_' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Interface_.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\LinesOfCode' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/LinesOfCode.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Method' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Method.php', 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ParsingFileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/ParsingFileAnalyser.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Trait_' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Trait_.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Visibility' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Visibility.php', 'SebastianBergmann\\CodeCoverage\\TestIdMissingException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/TestIdMissingException.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Class_' => $vendorDir . '/phpunit/php-code-coverage/src/Target/Class_.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\ClassesThatExtendClass' => $vendorDir . '/phpunit/php-code-coverage/src/Target/ClassesThatExtendClass.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\ClassesThatImplementInterface' => $vendorDir . '/phpunit/php-code-coverage/src/Target/ClassesThatImplementInterface.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Function_' => $vendorDir . '/phpunit/php-code-coverage/src/Target/Function_.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\InvalidCodeCoverageTargetException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/InvalidCodeCoverageTargetException.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\MapBuilder' => $vendorDir . '/phpunit/php-code-coverage/src/Target/MapBuilder.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Mapper' => $vendorDir . '/phpunit/php-code-coverage/src/Target/Mapper.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Method' => $vendorDir . '/phpunit/php-code-coverage/src/Target/Method.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Namespace_' => $vendorDir . '/phpunit/php-code-coverage/src/Target/Namespace_.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Target' => $vendorDir . '/phpunit/php-code-coverage/src/Target/Target.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\TargetCollection' => $vendorDir . '/phpunit/php-code-coverage/src/Target/TargetCollection.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\TargetCollectionIterator' => $vendorDir . '/phpunit/php-code-coverage/src/Target/TargetCollectionIterator.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\TargetCollectionValidator' => $vendorDir . '/phpunit/php-code-coverage/src/Target/TargetCollectionValidator.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Trait_' => $vendorDir . '/phpunit/php-code-coverage/src/Target/Trait_.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\ValidationFailure' => $vendorDir . '/phpunit/php-code-coverage/src/Target/ValidationFailure.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\ValidationResult' => $vendorDir . '/phpunit/php-code-coverage/src/Target/ValidationResult.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\ValidationSuccess' => $vendorDir . '/phpunit/php-code-coverage/src/Target/ValidationSuccess.php', 'SebastianBergmann\\CodeCoverage\\Test\\TestSize\\Known' => $vendorDir . '/phpunit/php-code-coverage/src/TestSize/Known.php', 'SebastianBergmann\\CodeCoverage\\Test\\TestSize\\Large' => $vendorDir . '/phpunit/php-code-coverage/src/TestSize/Large.php', 'SebastianBergmann\\CodeCoverage\\Test\\TestSize\\Medium' => $vendorDir . '/phpunit/php-code-coverage/src/TestSize/Medium.php', @@ -1396,6 +1099,23 @@ return array( 'SebastianBergmann\\CodeCoverage\\Util\\Percentage' => $vendorDir . '/phpunit/php-code-coverage/src/Util/Percentage.php', 'SebastianBergmann\\CodeCoverage\\Version' => $vendorDir . '/phpunit/php-code-coverage/src/Version.php', 'SebastianBergmann\\CodeCoverage\\XmlException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/XmlException.php', + 'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => $vendorDir . '/sebastian/code-unit-reverse-lookup/src/Wizard.php', + 'SebastianBergmann\\CodeUnit\\ClassMethodUnit' => $vendorDir . '/sebastian/code-unit/src/ClassMethodUnit.php', + 'SebastianBergmann\\CodeUnit\\ClassUnit' => $vendorDir . '/sebastian/code-unit/src/ClassUnit.php', + 'SebastianBergmann\\CodeUnit\\CodeUnit' => $vendorDir . '/sebastian/code-unit/src/CodeUnit.php', + 'SebastianBergmann\\CodeUnit\\CodeUnitCollection' => $vendorDir . '/sebastian/code-unit/src/CodeUnitCollection.php', + 'SebastianBergmann\\CodeUnit\\CodeUnitCollectionIterator' => $vendorDir . '/sebastian/code-unit/src/CodeUnitCollectionIterator.php', + 'SebastianBergmann\\CodeUnit\\Exception' => $vendorDir . '/sebastian/code-unit/src/exceptions/Exception.php', + 'SebastianBergmann\\CodeUnit\\FileUnit' => $vendorDir . '/sebastian/code-unit/src/FileUnit.php', + 'SebastianBergmann\\CodeUnit\\FunctionUnit' => $vendorDir . '/sebastian/code-unit/src/FunctionUnit.php', + 'SebastianBergmann\\CodeUnit\\InterfaceMethodUnit' => $vendorDir . '/sebastian/code-unit/src/InterfaceMethodUnit.php', + 'SebastianBergmann\\CodeUnit\\InterfaceUnit' => $vendorDir . '/sebastian/code-unit/src/InterfaceUnit.php', + 'SebastianBergmann\\CodeUnit\\InvalidCodeUnitException' => $vendorDir . '/sebastian/code-unit/src/exceptions/InvalidCodeUnitException.php', + 'SebastianBergmann\\CodeUnit\\Mapper' => $vendorDir . '/sebastian/code-unit/src/Mapper.php', + 'SebastianBergmann\\CodeUnit\\NoTraitException' => $vendorDir . '/sebastian/code-unit/src/exceptions/NoTraitException.php', + 'SebastianBergmann\\CodeUnit\\ReflectionException' => $vendorDir . '/sebastian/code-unit/src/exceptions/ReflectionException.php', + 'SebastianBergmann\\CodeUnit\\TraitMethodUnit' => $vendorDir . '/sebastian/code-unit/src/TraitMethodUnit.php', + 'SebastianBergmann\\CodeUnit\\TraitUnit' => $vendorDir . '/sebastian/code-unit/src/TraitUnit.php', 'SebastianBergmann\\Comparator\\ArrayComparator' => $vendorDir . '/sebastian/comparator/src/ArrayComparator.php', 'SebastianBergmann\\Comparator\\Comparator' => $vendorDir . '/sebastian/comparator/src/Comparator.php', 'SebastianBergmann\\Comparator\\ComparisonFailure' => $vendorDir . '/sebastian/comparator/src/ComparisonFailure.php', @@ -1460,6 +1180,7 @@ return array( 'SebastianBergmann\\LinesOfCode\\IllogicalValuesException' => $vendorDir . '/sebastian/lines-of-code/src/Exception/IllogicalValuesException.php', 'SebastianBergmann\\LinesOfCode\\LineCountingVisitor' => $vendorDir . '/sebastian/lines-of-code/src/LineCountingVisitor.php', 'SebastianBergmann\\LinesOfCode\\LinesOfCode' => $vendorDir . '/sebastian/lines-of-code/src/LinesOfCode.php', + 'SebastianBergmann\\LinesOfCode\\NegativeValueException' => $vendorDir . '/sebastian/lines-of-code/src/Exception/NegativeValueException.php', 'SebastianBergmann\\LinesOfCode\\RuntimeException' => $vendorDir . '/sebastian/lines-of-code/src/Exception/RuntimeException.php', 'SebastianBergmann\\ObjectEnumerator\\Enumerator' => $vendorDir . '/sebastian/object-enumerator/src/Enumerator.php', 'SebastianBergmann\\ObjectReflector\\ObjectReflector' => $vendorDir . '/sebastian/object-reflector/src/ObjectReflector.php', @@ -1504,16 +1225,6 @@ return array( 'TheSeer\\Tokenizer\\TokenCollectionException' => $vendorDir . '/theseer/tokenizer/src/TokenCollectionException.php', 'TheSeer\\Tokenizer\\Tokenizer' => $vendorDir . '/theseer/tokenizer/src/Tokenizer.php', 'TheSeer\\Tokenizer\\XMLSerializer' => $vendorDir . '/theseer/tokenizer/src/XMLSerializer.php', - 'goodboyalex\\php_components_pack\\classes\\ActionState' => $baseDir . '/sources/classes/ActionState.php', - 'goodboyalex\\php_components_pack\\classes\\ClassMapper' => $baseDir . '/sources/classes/ClassMapper.php', - 'goodboyalex\\php_components_pack\\enums\\MessageType' => $baseDir . '/sources/enums/MessageType.php', - 'goodboyalex\\php_components_pack\\extensions\\ArrayExtension' => $baseDir . '/sources/extensions/ArrayExtension.php', - 'goodboyalex\\php_components_pack\\extensions\\GUIDExtension' => $baseDir . '/sources/extensions/GUIDExtension.php', - 'goodboyalex\\php_components_pack\\extensions\\StringExtension' => $baseDir . '/sources/extensions/StringExtension.php', - 'goodboyalex\\php_components_pack\\interfaces\\ISerializable' => $baseDir . '/sources/interfaces/ISerializable.php', - 'goodboyalex\\php_components_pack\\models\\ActionStateMessageModel' => $baseDir . '/sources/models/ActionStateMessageModel.php', - 'goodboyalex\\php_components_pack\\tests\\GUIDExtensionTest' => $baseDir . '/tests/GUIDExtensionTest.php', - 'goodboyalex\\php_components_pack\\traits\\EnumExtensionsTrait' => $baseDir . '/sources/traits/EnumExtensionsTrait.php', 'staabm\\SideEffectsDetector\\SideEffect' => $vendorDir . '/staabm/side-effects-detector/lib/SideEffect.php', 'staabm\\SideEffectsDetector\\SideEffectsDetector' => $vendorDir . '/staabm/side-effects-detector/lib/SideEffectsDetector.php', ); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 5733925..03d6231 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -12,6 +12,7 @@ return array( 'goodboyalex\\php_components_pack\\interfaces\\' => array($baseDir . '/sources/interfaces'), 'goodboyalex\\php_components_pack\\extensions\\' => array($baseDir . '/sources/extensions'), 'goodboyalex\\php_components_pack\\enums\\' => array($baseDir . '/sources/enums'), + 'goodboyalex\\php_components_pack\\classes\\' => array($baseDir . '/sources/classes'), 'goodboyalex\\php_components_pack\\' => array($baseDir . '/sources'), 'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'), 'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'), diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 5ad742f..3fc1a40 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -20,6 +20,7 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'goodboyalex\\php_components_pack\\interfaces\\' => 43, 'goodboyalex\\php_components_pack\\extensions\\' => 43, 'goodboyalex\\php_components_pack\\enums\\' => 38, + 'goodboyalex\\php_components_pack\\classes\\' => 40, 'goodboyalex\\php_components_pack\\' => 32, ), 'P' => @@ -57,6 +58,10 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 array ( 0 => __DIR__ . '/../..' . '/sources/enums', ), + 'goodboyalex\\php_components_pack\\classes\\' => + array ( + 0 => __DIR__ . '/../..' . '/sources/classes', + ), 'goodboyalex\\php_components_pack\\' => array ( 0 => __DIR__ . '/../..' . '/sources', @@ -73,32 +78,6 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 public static $classMap = array ( 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', - 'DeepCopy\\DeepCopy' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/DeepCopy.php', - 'DeepCopy\\Exception\\CloneException' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php', - 'DeepCopy\\Exception\\PropertyException' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Exception/PropertyException.php', - 'DeepCopy\\Filter\\ChainableFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/ChainableFilter.php', - 'DeepCopy\\Filter\\Doctrine\\DoctrineCollectionFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php', - 'DeepCopy\\Filter\\Doctrine\\DoctrineEmptyCollectionFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php', - 'DeepCopy\\Filter\\Doctrine\\DoctrineProxyFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php', - 'DeepCopy\\Filter\\Filter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php', - 'DeepCopy\\Filter\\KeepFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/KeepFilter.php', - 'DeepCopy\\Filter\\ReplaceFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/ReplaceFilter.php', - 'DeepCopy\\Filter\\SetNullFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php', - 'DeepCopy\\Matcher\\Doctrine\\DoctrineProxyMatcher' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php', - 'DeepCopy\\Matcher\\Matcher' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php', - 'DeepCopy\\Matcher\\PropertyMatcher' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyMatcher.php', - 'DeepCopy\\Matcher\\PropertyNameMatcher' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php', - 'DeepCopy\\Matcher\\PropertyTypeMatcher' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php', - 'DeepCopy\\Reflection\\ReflectionHelper' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php', - 'DeepCopy\\TypeFilter\\Date\\DateIntervalFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php', - 'DeepCopy\\TypeFilter\\Date\\DatePeriodFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DatePeriodFilter.php', - 'DeepCopy\\TypeFilter\\ReplaceFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php', - 'DeepCopy\\TypeFilter\\ShallowCopyFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php', - 'DeepCopy\\TypeFilter\\Spl\\ArrayObjectFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/ArrayObjectFilter.php', - 'DeepCopy\\TypeFilter\\Spl\\SplDoublyLinkedList' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php', - 'DeepCopy\\TypeFilter\\Spl\\SplDoublyLinkedListFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedListFilter.php', - 'DeepCopy\\TypeFilter\\TypeFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php', - 'DeepCopy\\TypeMatcher\\TypeMatcher' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeMatcher/TypeMatcher.php', 'PHPUnit\\Event\\Application\\Finished' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Application/Finished.php', 'PHPUnit\\Event\\Application\\FinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Application/FinishedSubscriber.php', 'PHPUnit\\Event\\Application\\Started' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Application/Started.php', @@ -156,10 +135,11 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'PHPUnit\\Event\\Telemetry\\Info' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/Info.php', 'PHPUnit\\Event\\Telemetry\\MemoryMeter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/MemoryMeter.php', 'PHPUnit\\Event\\Telemetry\\MemoryUsage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/MemoryUsage.php', + 'PHPUnit\\Event\\Telemetry\\Php81GarbageCollectorStatusProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/Php81GarbageCollectorStatusProvider.php', + 'PHPUnit\\Event\\Telemetry\\Php83GarbageCollectorStatusProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/Php83GarbageCollectorStatusProvider.php', 'PHPUnit\\Event\\Telemetry\\Snapshot' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/Snapshot.php', 'PHPUnit\\Event\\Telemetry\\StopWatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/StopWatch.php', 'PHPUnit\\Event\\Telemetry\\System' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/System.php', - 'PHPUnit\\Event\\Telemetry\\SystemGarbageCollectorStatusProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/SystemGarbageCollectorStatusProvider.php', 'PHPUnit\\Event\\Telemetry\\SystemMemoryMeter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/SystemMemoryMeter.php', 'PHPUnit\\Event\\Telemetry\\SystemStopWatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatch.php', 'PHPUnit\\Event\\Telemetry\\SystemStopWatchWithOffset' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatchWithOffset.php', @@ -266,8 +246,14 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'PHPUnit\\Event\\Test\\MarkedIncompleteSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Outcome/MarkedIncompleteSubscriber.php', 'PHPUnit\\Event\\Test\\MockObjectCreated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectCreated.php', 'PHPUnit\\Event\\Test\\MockObjectCreatedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectCreatedSubscriber.php', + 'PHPUnit\\Event\\Test\\MockObjectForAbstractClassCreated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForAbstractClassCreated.php', + 'PHPUnit\\Event\\Test\\MockObjectForAbstractClassCreatedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForAbstractClassCreatedSubscriber.php', 'PHPUnit\\Event\\Test\\MockObjectForIntersectionOfInterfacesCreated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForIntersectionOfInterfacesCreated.php', 'PHPUnit\\Event\\Test\\MockObjectForIntersectionOfInterfacesCreatedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForIntersectionOfInterfacesCreatedSubscriber.php', + 'PHPUnit\\Event\\Test\\MockObjectForTraitCreated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForTraitCreated.php', + 'PHPUnit\\Event\\Test\\MockObjectForTraitCreatedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForTraitCreatedSubscriber.php', + 'PHPUnit\\Event\\Test\\MockObjectFromWsdlCreated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectFromWsdlCreated.php', + 'PHPUnit\\Event\\Test\\MockObjectFromWsdlCreatedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectFromWsdlCreatedSubscriber.php', 'PHPUnit\\Event\\Test\\NoComparisonFailureException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/NoComparisonFailureException.php', 'PHPUnit\\Event\\Test\\NoticeTriggered' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/NoticeTriggered.php', 'PHPUnit\\Event\\Test\\NoticeTriggeredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Issue/NoticeTriggeredSubscriber.php', @@ -309,6 +295,8 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'PHPUnit\\Event\\Test\\PrintedUnexpectedOutputSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/PrintedUnexpectedOutputSubscriber.php', 'PHPUnit\\Event\\Test\\Skipped' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Outcome/Skipped.php', 'PHPUnit\\Event\\Test\\SkippedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Outcome/SkippedSubscriber.php', + 'PHPUnit\\Event\\Test\\TestProxyCreated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestProxyCreated.php', + 'PHPUnit\\Event\\Test\\TestProxyCreatedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestProxyCreatedSubscriber.php', 'PHPUnit\\Event\\Test\\TestStubCreated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubCreated.php', 'PHPUnit\\Event\\Test\\TestStubCreatedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubCreatedSubscriber.php', 'PHPUnit\\Event\\Test\\TestStubForIntersectionOfInterfacesCreated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestStubForIntersectionOfInterfacesCreated.php', @@ -332,11 +320,8 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'PHPUnit\\Framework\\Attributes\\Before' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/Before.php', 'PHPUnit\\Framework\\Attributes\\BeforeClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/BeforeClass.php', 'PHPUnit\\Framework\\Attributes\\CoversClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversClass.php', - 'PHPUnit\\Framework\\Attributes\\CoversClassesThatExtendClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversClassesThatExtendClass.php', - 'PHPUnit\\Framework\\Attributes\\CoversClassesThatImplementInterface' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversClassesThatImplementInterface.php', 'PHPUnit\\Framework\\Attributes\\CoversFunction' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversFunction.php', 'PHPUnit\\Framework\\Attributes\\CoversMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversMethod.php', - 'PHPUnit\\Framework\\Attributes\\CoversNamespace' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversNamespace.php', 'PHPUnit\\Framework\\Attributes\\CoversNothing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversNothing.php', 'PHPUnit\\Framework\\Attributes\\CoversTrait' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversTrait.php', 'PHPUnit\\Framework\\Attributes\\DataProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/DataProvider.php', @@ -362,7 +347,6 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'PHPUnit\\Framework\\Attributes\\PostCondition' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/PostCondition.php', 'PHPUnit\\Framework\\Attributes\\PreCondition' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/PreCondition.php', 'PHPUnit\\Framework\\Attributes\\PreserveGlobalState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/PreserveGlobalState.php', - 'PHPUnit\\Framework\\Attributes\\RequiresEnvironmentVariable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/RequiresEnvironmentVariable.php', 'PHPUnit\\Framework\\Attributes\\RequiresFunction' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/RequiresFunction.php', 'PHPUnit\\Framework\\Attributes\\RequiresMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/RequiresMethod.php', 'PHPUnit\\Framework\\Attributes\\RequiresOperatingSystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/RequiresOperatingSystem.php', @@ -382,11 +366,8 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'PHPUnit\\Framework\\Attributes\\TestWithJson' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/TestWithJson.php', 'PHPUnit\\Framework\\Attributes\\Ticket' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/Ticket.php', 'PHPUnit\\Framework\\Attributes\\UsesClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/UsesClass.php', - 'PHPUnit\\Framework\\Attributes\\UsesClassesThatExtendClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/UsesClassesThatExtendClass.php', - 'PHPUnit\\Framework\\Attributes\\UsesClassesThatImplementInterface' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/UsesClassesThatImplementInterface.php', 'PHPUnit\\Framework\\Attributes\\UsesFunction' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/UsesFunction.php', 'PHPUnit\\Framework\\Attributes\\UsesMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/UsesMethod.php', - 'PHPUnit\\Framework\\Attributes\\UsesNamespace' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/UsesNamespace.php', 'PHPUnit\\Framework\\Attributes\\UsesTrait' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/UsesTrait.php', 'PHPUnit\\Framework\\Attributes\\WithoutErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/WithoutErrorHandler.php', 'PHPUnit\\Framework\\CodeCoverageException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/CodeCoverageException.php', @@ -468,26 +449,36 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'PHPUnit\\Framework\\MockObject\\Builder\\MethodNameMatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Builder/MethodNameMatch.php', 'PHPUnit\\Framework\\MockObject\\Builder\\ParametersMatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Builder/ParametersMatch.php', 'PHPUnit\\Framework\\MockObject\\Builder\\Stub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Builder/Stub.php', + 'PHPUnit\\Framework\\MockObject\\CannotCloneTestDoubleForReadonlyClassException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/CannotCloneTestDoubleForReadonlyClassException.php', 'PHPUnit\\Framework\\MockObject\\CannotUseOnlyMethodsException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseOnlyMethodsException.php', 'PHPUnit\\Framework\\MockObject\\ConfigurableMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php', 'PHPUnit\\Framework\\MockObject\\DoubledCloneMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/DoubledCloneMethod.php', + 'PHPUnit\\Framework\\MockObject\\ErrorCloneMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/ErrorCloneMethod.php', 'PHPUnit\\Framework\\MockObject\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php', + 'PHPUnit\\Framework\\MockObject\\GeneratedAsMockObject' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/GeneratedAsMockObject.php', + 'PHPUnit\\Framework\\MockObject\\GeneratedAsTestStub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/GeneratedAsTestStub.php', + 'PHPUnit\\Framework\\MockObject\\Generator\\CannotUseAddMethodsException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/CannotUseAddMethodsException.php', 'PHPUnit\\Framework\\MockObject\\Generator\\ClassIsEnumerationException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsEnumerationException.php', 'PHPUnit\\Framework\\MockObject\\Generator\\ClassIsFinalException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsFinalException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\DoubledClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\DoubledMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledMethod.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\DoubledMethodSet' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledMethodSet.php', 'PHPUnit\\Framework\\MockObject\\Generator\\DuplicateMethodException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/DuplicateMethodException.php', 'PHPUnit\\Framework\\MockObject\\Generator\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/Exception.php', 'PHPUnit\\Framework\\MockObject\\Generator\\Generator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Generator.php', 'PHPUnit\\Framework\\MockObject\\Generator\\HookedProperty' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/HookedProperty.php', 'PHPUnit\\Framework\\MockObject\\Generator\\HookedPropertyGenerator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/HookedPropertyGenerator.php', 'PHPUnit\\Framework\\MockObject\\Generator\\InvalidMethodNameException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/InvalidMethodNameException.php', - 'PHPUnit\\Framework\\MockObject\\Generator\\MethodNamedMethodException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/MethodNamedMethodException.php', + 'PHPUnit\\Framework\\MockObject\\Generator\\MockClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/MockClass.php', + 'PHPUnit\\Framework\\MockObject\\Generator\\MockMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/MockMethod.php', + 'PHPUnit\\Framework\\MockObject\\Generator\\MockMethodSet' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/MockMethodSet.php', + 'PHPUnit\\Framework\\MockObject\\Generator\\MockTrait' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/MockTrait.php', + 'PHPUnit\\Framework\\MockObject\\Generator\\MockType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/MockType.php', 'PHPUnit\\Framework\\MockObject\\Generator\\NameAlreadyInUseException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/NameAlreadyInUseException.php', + 'PHPUnit\\Framework\\MockObject\\Generator\\OriginalConstructorInvocationRequiredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/OriginalConstructorInvocationRequiredException.php', 'PHPUnit\\Framework\\MockObject\\Generator\\ReflectionException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ReflectionException.php', 'PHPUnit\\Framework\\MockObject\\Generator\\RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/RuntimeException.php', + 'PHPUnit\\Framework\\MockObject\\Generator\\SoapExtensionNotAvailableException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/SoapExtensionNotAvailableException.php', 'PHPUnit\\Framework\\MockObject\\Generator\\TemplateLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/TemplateLoader.php', + 'PHPUnit\\Framework\\MockObject\\Generator\\UnknownClassException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownClassException.php', + 'PHPUnit\\Framework\\MockObject\\Generator\\UnknownTraitException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownTraitException.php', 'PHPUnit\\Framework\\MockObject\\Generator\\UnknownTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownTypeException.php', 'PHPUnit\\Framework\\MockObject\\IncompatibleReturnValueException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php', 'PHPUnit\\Framework\\MockObject\\Invocation' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Invocation.php', @@ -505,6 +496,7 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'PHPUnit\\Framework\\MockObject\\MockObject' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/MockObject.php', 'PHPUnit\\Framework\\MockObject\\MockObjectApi' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/MockObjectApi.php', 'PHPUnit\\Framework\\MockObject\\MockObjectInternal' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/MockObjectInternal.php', + 'PHPUnit\\Framework\\MockObject\\MutableStubApi' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/MutableStubApi.php', 'PHPUnit\\Framework\\MockObject\\NeverReturningMethodException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/NeverReturningMethodException.php', 'PHPUnit\\Framework\\MockObject\\NoMoreReturnValuesConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/NoMoreReturnValuesConfiguredException.php', 'PHPUnit\\Framework\\MockObject\\ProxiedCloneMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/ProxiedCloneMethod.php', @@ -572,7 +564,7 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'PHPUnit\\Framework\\TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite.php', 'PHPUnit\\Framework\\TestSuiteIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuiteIterator.php', 'PHPUnit\\Framework\\UnknownClassOrInterfaceException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/UnknownClassOrInterfaceException.php', - 'PHPUnit\\Framework\\UnknownNativeTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/UnknownNativeTypeException.php', + 'PHPUnit\\Framework\\UnknownTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/UnknownTypeException.php', 'PHPUnit\\Logging\\EventLogger' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/EventLogger.php', 'PHPUnit\\Logging\\JUnit\\JunitXmlLogger' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/JunitXmlLogger.php', 'PHPUnit\\Logging\\JUnit\\Subscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/Subscriber.php', @@ -629,6 +621,9 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'PHPUnit\\Logging\\TestDox\\TestTriggeredWarningSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredWarningSubscriber.php', 'PHPUnit\\Metadata\\After' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/After.php', 'PHPUnit\\Metadata\\AfterClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/AfterClass.php', + 'PHPUnit\\Metadata\\Annotation\\Parser\\DocBlock' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Parser/Annotation/DocBlock.php', + 'PHPUnit\\Metadata\\Annotation\\Parser\\Registry' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Parser/Annotation/Registry.php', + 'PHPUnit\\Metadata\\AnnotationsAreNotSupportedForInternalClassesException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Exception/AnnotationsAreNotSupportedForInternalClassesException.php', 'PHPUnit\\Metadata\\Api\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Api/CodeCoverage.php', 'PHPUnit\\Metadata\\Api\\DataProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Api/DataProvider.php', 'PHPUnit\\Metadata\\Api\\Dependencies' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Api/Dependencies.php', @@ -639,12 +634,11 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'PHPUnit\\Metadata\\BackupStaticProperties' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/BackupStaticProperties.php', 'PHPUnit\\Metadata\\Before' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Before.php', 'PHPUnit\\Metadata\\BeforeClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/BeforeClass.php', + 'PHPUnit\\Metadata\\Covers' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Covers.php', 'PHPUnit\\Metadata\\CoversClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/CoversClass.php', - 'PHPUnit\\Metadata\\CoversClassesThatExtendClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/CoversClassesThatExtendClass.php', - 'PHPUnit\\Metadata\\CoversClassesThatImplementInterface' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/CoversClassesThatImplementInterface.php', + 'PHPUnit\\Metadata\\CoversDefaultClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/CoversDefaultClass.php', 'PHPUnit\\Metadata\\CoversFunction' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/CoversFunction.php', 'PHPUnit\\Metadata\\CoversMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/CoversMethod.php', - 'PHPUnit\\Metadata\\CoversNamespace' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/CoversNamespace.php', 'PHPUnit\\Metadata\\CoversNothing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/CoversNothing.php', 'PHPUnit\\Metadata\\CoversTrait' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/CoversTrait.php', 'PHPUnit\\Metadata\\DataProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/DataProvider.php', @@ -663,14 +657,16 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'PHPUnit\\Metadata\\MetadataCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/MetadataCollection.php', 'PHPUnit\\Metadata\\MetadataCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/MetadataCollectionIterator.php', 'PHPUnit\\Metadata\\NoVersionRequirementException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Exception/NoVersionRequirementException.php', + 'PHPUnit\\Metadata\\Parser\\AnnotationParser' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Parser/AnnotationParser.php', 'PHPUnit\\Metadata\\Parser\\AttributeParser' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Parser/AttributeParser.php', 'PHPUnit\\Metadata\\Parser\\CachingParser' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Parser/CachingParser.php', 'PHPUnit\\Metadata\\Parser\\Parser' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Parser/Parser.php', + 'PHPUnit\\Metadata\\Parser\\ParserChain' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Parser/ParserChain.php', 'PHPUnit\\Metadata\\Parser\\Registry' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Parser/Registry.php', 'PHPUnit\\Metadata\\PostCondition' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/PostCondition.php', 'PHPUnit\\Metadata\\PreCondition' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/PreCondition.php', 'PHPUnit\\Metadata\\PreserveGlobalState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/PreserveGlobalState.php', - 'PHPUnit\\Metadata\\RequiresEnvironmentVariable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/RequiresEnvironmentVariable.php', + 'PHPUnit\\Metadata\\ReflectionException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Exception/ReflectionException.php', 'PHPUnit\\Metadata\\RequiresFunction' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/RequiresFunction.php', 'PHPUnit\\Metadata\\RequiresMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/RequiresMethod.php', 'PHPUnit\\Metadata\\RequiresOperatingSystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/RequiresOperatingSystem.php', @@ -686,12 +682,11 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'PHPUnit\\Metadata\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Test.php', 'PHPUnit\\Metadata\\TestDox' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/TestDox.php', 'PHPUnit\\Metadata\\TestWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/TestWith.php', + 'PHPUnit\\Metadata\\Uses' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Uses.php', 'PHPUnit\\Metadata\\UsesClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/UsesClass.php', - 'PHPUnit\\Metadata\\UsesClassesThatExtendClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/UsesClassesThatExtendClass.php', - 'PHPUnit\\Metadata\\UsesClassesThatImplementInterface' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/UsesClassesThatImplementInterface.php', + 'PHPUnit\\Metadata\\UsesDefaultClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/UsesDefaultClass.php', 'PHPUnit\\Metadata\\UsesFunction' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/UsesFunction.php', 'PHPUnit\\Metadata\\UsesMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/UsesMethod.php', - 'PHPUnit\\Metadata\\UsesNamespace' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/UsesNamespace.php', 'PHPUnit\\Metadata\\UsesTrait' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/UsesTrait.php', 'PHPUnit\\Metadata\\Version\\ComparisonRequirement' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Version/ComparisonRequirement.php', 'PHPUnit\\Metadata\\Version\\ConstraintRequirement' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Version/ConstraintRequirement.php', @@ -989,6 +984,7 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'PHPUnit\\TextUI\\XmlConfiguration\\UpdateSchemaLocation' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/UpdateSchemaLocation.php', 'PHPUnit\\TextUI\\XmlConfiguration\\ValidationResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Validator/ValidationResult.php', 'PHPUnit\\TextUI\\XmlConfiguration\\Validator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Validator/Validator.php', + 'PHPUnit\\Util\\Cloner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Cloner.php', 'PHPUnit\\Util\\Color' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Color.php', 'PHPUnit\\Util\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Exception/Exception.php', 'PHPUnit\\Util\\ExcludeList' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ExcludeList.php', @@ -1087,270 +1083,6 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'PharIo\\Version\\VersionConstraintParser' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintParser.php', 'PharIo\\Version\\VersionConstraintValue' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintValue.php', 'PharIo\\Version\\VersionNumber' => __DIR__ . '/..' . '/phar-io/version/src/VersionNumber.php', - 'PhpParser\\Builder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder.php', - 'PhpParser\\BuilderFactory' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/BuilderFactory.php', - 'PhpParser\\BuilderHelpers' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/BuilderHelpers.php', - 'PhpParser\\Builder\\ClassConst' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php', - 'PhpParser\\Builder\\Class_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Class_.php', - 'PhpParser\\Builder\\Declaration' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Declaration.php', - 'PhpParser\\Builder\\EnumCase' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php', - 'PhpParser\\Builder\\Enum_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Enum_.php', - 'PhpParser\\Builder\\FunctionLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php', - 'PhpParser\\Builder\\Function_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Function_.php', - 'PhpParser\\Builder\\Interface_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Interface_.php', - 'PhpParser\\Builder\\Method' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Method.php', - 'PhpParser\\Builder\\Namespace_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php', - 'PhpParser\\Builder\\Param' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Param.php', - 'PhpParser\\Builder\\Property' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Property.php', - 'PhpParser\\Builder\\TraitUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php', - 'PhpParser\\Builder\\TraitUseAdaptation' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php', - 'PhpParser\\Builder\\Trait_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Trait_.php', - 'PhpParser\\Builder\\Use_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Use_.php', - 'PhpParser\\Comment' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Comment.php', - 'PhpParser\\Comment\\Doc' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Comment/Doc.php', - 'PhpParser\\ConstExprEvaluationException' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php', - 'PhpParser\\ConstExprEvaluator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php', - 'PhpParser\\Error' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Error.php', - 'PhpParser\\ErrorHandler' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ErrorHandler.php', - 'PhpParser\\ErrorHandler\\Collecting' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php', - 'PhpParser\\ErrorHandler\\Throwing' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php', - 'PhpParser\\Internal\\DiffElem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php', - 'PhpParser\\Internal\\Differ' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/Differ.php', - 'PhpParser\\Internal\\PrintableNewAnonClassNode' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php', - 'PhpParser\\Internal\\TokenPolyfill' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php', - 'PhpParser\\Internal\\TokenStream' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php', - 'PhpParser\\JsonDecoder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/JsonDecoder.php', - 'PhpParser\\Lexer' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer.php', - 'PhpParser\\Lexer\\Emulative' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php', - 'PhpParser\\Lexer\\TokenEmulator\\AsymmetricVisibilityTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\AttributeEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\EnumTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\ExplicitOctalEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\KeywordEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\MatchTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\NullsafeTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\PropertyTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\ReadonlyFunctionTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\ReadonlyTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\ReverseEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\TokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php', - 'PhpParser\\Modifiers' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Modifiers.php', - 'PhpParser\\NameContext' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NameContext.php', - 'PhpParser\\Node' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node.php', - 'PhpParser\\NodeAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeAbstract.php', - 'PhpParser\\NodeDumper' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeDumper.php', - 'PhpParser\\NodeFinder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeFinder.php', - 'PhpParser\\NodeTraverser' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeTraverser.php', - 'PhpParser\\NodeTraverserInterface' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php', - 'PhpParser\\NodeVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor.php', - 'PhpParser\\NodeVisitorAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php', - 'PhpParser\\NodeVisitor\\CloningVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php', - 'PhpParser\\NodeVisitor\\CommentAnnotatingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php', - 'PhpParser\\NodeVisitor\\FindingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php', - 'PhpParser\\NodeVisitor\\FirstFindingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php', - 'PhpParser\\NodeVisitor\\NameResolver' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php', - 'PhpParser\\NodeVisitor\\NodeConnectingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php', - 'PhpParser\\NodeVisitor\\ParentConnectingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php', - 'PhpParser\\Node\\Arg' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Arg.php', - 'PhpParser\\Node\\ArrayItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php', - 'PhpParser\\Node\\Attribute' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Attribute.php', - 'PhpParser\\Node\\AttributeGroup' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php', - 'PhpParser\\Node\\ClosureUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php', - 'PhpParser\\Node\\ComplexType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/ComplexType.php', - 'PhpParser\\Node\\Const_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Const_.php', - 'PhpParser\\Node\\DeclareItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php', - 'PhpParser\\Node\\Expr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr.php', - 'PhpParser\\Node\\Expr\\ArrayDimFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php', - 'PhpParser\\Node\\Expr\\ArrayItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php', - 'PhpParser\\Node\\Expr\\Array_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php', - 'PhpParser\\Node\\Expr\\ArrowFunction' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php', - 'PhpParser\\Node\\Expr\\Assign' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php', - 'PhpParser\\Node\\Expr\\AssignOp' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php', - 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php', - 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php', - 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseXor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Coalesce' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Concat' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Div' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Minus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Mod' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Mul' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Plus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php', - 'PhpParser\\Node\\Expr\\AssignOp\\Pow' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php', - 'PhpParser\\Node\\Expr\\AssignOp\\ShiftLeft' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php', - 'PhpParser\\Node\\Expr\\AssignOp\\ShiftRight' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php', - 'PhpParser\\Node\\Expr\\AssignRef' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php', - 'PhpParser\\Node\\Expr\\BinaryOp' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseXor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\BooleanAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\BooleanOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Coalesce' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Concat' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Div' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Equal' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Greater' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\GreaterOrEqual' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Identical' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalXor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Minus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Mod' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Mul' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\NotEqual' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\NotIdentical' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Plus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Pow' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\ShiftLeft' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\ShiftRight' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Smaller' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\SmallerOrEqual' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php', - 'PhpParser\\Node\\Expr\\BinaryOp\\Spaceship' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php', - 'PhpParser\\Node\\Expr\\BitwiseNot' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php', - 'PhpParser\\Node\\Expr\\BooleanNot' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php', - 'PhpParser\\Node\\Expr\\CallLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php', - 'PhpParser\\Node\\Expr\\Cast' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php', - 'PhpParser\\Node\\Expr\\Cast\\Array_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php', - 'PhpParser\\Node\\Expr\\Cast\\Bool_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php', - 'PhpParser\\Node\\Expr\\Cast\\Double' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php', - 'PhpParser\\Node\\Expr\\Cast\\Int_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php', - 'PhpParser\\Node\\Expr\\Cast\\Object_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php', - 'PhpParser\\Node\\Expr\\Cast\\String_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php', - 'PhpParser\\Node\\Expr\\Cast\\Unset_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php', - 'PhpParser\\Node\\Expr\\ClassConstFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php', - 'PhpParser\\Node\\Expr\\Clone_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php', - 'PhpParser\\Node\\Expr\\Closure' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php', - 'PhpParser\\Node\\Expr\\ClosureUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php', - 'PhpParser\\Node\\Expr\\ConstFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php', - 'PhpParser\\Node\\Expr\\Empty_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php', - 'PhpParser\\Node\\Expr\\Error' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php', - 'PhpParser\\Node\\Expr\\ErrorSuppress' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php', - 'PhpParser\\Node\\Expr\\Eval_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php', - 'PhpParser\\Node\\Expr\\Exit_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php', - 'PhpParser\\Node\\Expr\\FuncCall' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php', - 'PhpParser\\Node\\Expr\\Include_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php', - 'PhpParser\\Node\\Expr\\Instanceof_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php', - 'PhpParser\\Node\\Expr\\Isset_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php', - 'PhpParser\\Node\\Expr\\List_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php', - 'PhpParser\\Node\\Expr\\Match_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php', - 'PhpParser\\Node\\Expr\\MethodCall' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php', - 'PhpParser\\Node\\Expr\\New_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php', - 'PhpParser\\Node\\Expr\\NullsafeMethodCall' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php', - 'PhpParser\\Node\\Expr\\NullsafePropertyFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php', - 'PhpParser\\Node\\Expr\\PostDec' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php', - 'PhpParser\\Node\\Expr\\PostInc' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php', - 'PhpParser\\Node\\Expr\\PreDec' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php', - 'PhpParser\\Node\\Expr\\PreInc' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php', - 'PhpParser\\Node\\Expr\\Print_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php', - 'PhpParser\\Node\\Expr\\PropertyFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php', - 'PhpParser\\Node\\Expr\\ShellExec' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php', - 'PhpParser\\Node\\Expr\\StaticCall' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php', - 'PhpParser\\Node\\Expr\\StaticPropertyFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php', - 'PhpParser\\Node\\Expr\\Ternary' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php', - 'PhpParser\\Node\\Expr\\Throw_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php', - 'PhpParser\\Node\\Expr\\UnaryMinus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php', - 'PhpParser\\Node\\Expr\\UnaryPlus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php', - 'PhpParser\\Node\\Expr\\Variable' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php', - 'PhpParser\\Node\\Expr\\YieldFrom' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php', - 'PhpParser\\Node\\Expr\\Yield_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php', - 'PhpParser\\Node\\FunctionLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php', - 'PhpParser\\Node\\Identifier' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Identifier.php', - 'PhpParser\\Node\\InterpolatedStringPart' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php', - 'PhpParser\\Node\\IntersectionType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php', - 'PhpParser\\Node\\MatchArm' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/MatchArm.php', - 'PhpParser\\Node\\Name' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name.php', - 'PhpParser\\Node\\Name\\FullyQualified' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php', - 'PhpParser\\Node\\Name\\Relative' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php', - 'PhpParser\\Node\\NullableType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/NullableType.php', - 'PhpParser\\Node\\Param' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Param.php', - 'PhpParser\\Node\\PropertyHook' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php', - 'PhpParser\\Node\\PropertyItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php', - 'PhpParser\\Node\\Scalar' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar.php', - 'PhpParser\\Node\\Scalar\\DNumber' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php', - 'PhpParser\\Node\\Scalar\\Encapsed' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php', - 'PhpParser\\Node\\Scalar\\EncapsedStringPart' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php', - 'PhpParser\\Node\\Scalar\\Float_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php', - 'PhpParser\\Node\\Scalar\\Int_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php', - 'PhpParser\\Node\\Scalar\\InterpolatedString' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php', - 'PhpParser\\Node\\Scalar\\LNumber' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php', - 'PhpParser\\Node\\Scalar\\MagicConst' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Class_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Dir' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\File' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Function_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Line' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Method' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Namespace_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Property' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Property.php', - 'PhpParser\\Node\\Scalar\\MagicConst\\Trait_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php', - 'PhpParser\\Node\\Scalar\\String_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php', - 'PhpParser\\Node\\StaticVar' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/StaticVar.php', - 'PhpParser\\Node\\Stmt' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt.php', - 'PhpParser\\Node\\Stmt\\Block' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php', - 'PhpParser\\Node\\Stmt\\Break_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php', - 'PhpParser\\Node\\Stmt\\Case_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php', - 'PhpParser\\Node\\Stmt\\Catch_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php', - 'PhpParser\\Node\\Stmt\\ClassConst' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php', - 'PhpParser\\Node\\Stmt\\ClassLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php', - 'PhpParser\\Node\\Stmt\\ClassMethod' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php', - 'PhpParser\\Node\\Stmt\\Class_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php', - 'PhpParser\\Node\\Stmt\\Const_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php', - 'PhpParser\\Node\\Stmt\\Continue_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php', - 'PhpParser\\Node\\Stmt\\DeclareDeclare' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php', - 'PhpParser\\Node\\Stmt\\Declare_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php', - 'PhpParser\\Node\\Stmt\\Do_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php', - 'PhpParser\\Node\\Stmt\\Echo_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php', - 'PhpParser\\Node\\Stmt\\ElseIf_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php', - 'PhpParser\\Node\\Stmt\\Else_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php', - 'PhpParser\\Node\\Stmt\\EnumCase' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php', - 'PhpParser\\Node\\Stmt\\Enum_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php', - 'PhpParser\\Node\\Stmt\\Expression' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php', - 'PhpParser\\Node\\Stmt\\Finally_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php', - 'PhpParser\\Node\\Stmt\\For_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php', - 'PhpParser\\Node\\Stmt\\Foreach_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php', - 'PhpParser\\Node\\Stmt\\Function_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php', - 'PhpParser\\Node\\Stmt\\Global_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php', - 'PhpParser\\Node\\Stmt\\Goto_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php', - 'PhpParser\\Node\\Stmt\\GroupUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php', - 'PhpParser\\Node\\Stmt\\HaltCompiler' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php', - 'PhpParser\\Node\\Stmt\\If_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php', - 'PhpParser\\Node\\Stmt\\InlineHTML' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php', - 'PhpParser\\Node\\Stmt\\Interface_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php', - 'PhpParser\\Node\\Stmt\\Label' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php', - 'PhpParser\\Node\\Stmt\\Namespace_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php', - 'PhpParser\\Node\\Stmt\\Nop' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php', - 'PhpParser\\Node\\Stmt\\Property' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php', - 'PhpParser\\Node\\Stmt\\PropertyProperty' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php', - 'PhpParser\\Node\\Stmt\\Return_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php', - 'PhpParser\\Node\\Stmt\\StaticVar' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php', - 'PhpParser\\Node\\Stmt\\Static_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php', - 'PhpParser\\Node\\Stmt\\Switch_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php', - 'PhpParser\\Node\\Stmt\\TraitUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php', - 'PhpParser\\Node\\Stmt\\TraitUseAdaptation' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php', - 'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Alias' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php', - 'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Precedence' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php', - 'PhpParser\\Node\\Stmt\\Trait_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php', - 'PhpParser\\Node\\Stmt\\TryCatch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php', - 'PhpParser\\Node\\Stmt\\Unset_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php', - 'PhpParser\\Node\\Stmt\\UseUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php', - 'PhpParser\\Node\\Stmt\\Use_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php', - 'PhpParser\\Node\\Stmt\\While_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php', - 'PhpParser\\Node\\UnionType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/UnionType.php', - 'PhpParser\\Node\\UseItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/UseItem.php', - 'PhpParser\\Node\\VarLikeIdentifier' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php', - 'PhpParser\\Node\\VariadicPlaceholder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php', - 'PhpParser\\Parser' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser.php', - 'PhpParser\\ParserAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ParserAbstract.php', - 'PhpParser\\ParserFactory' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ParserFactory.php', - 'PhpParser\\Parser\\Php7' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Php7.php', - 'PhpParser\\Parser\\Php8' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Php8.php', - 'PhpParser\\PhpVersion' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PhpVersion.php', - 'PhpParser\\PrettyPrinter' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinter.php', - 'PhpParser\\PrettyPrinterAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php', - 'PhpParser\\PrettyPrinter\\Standard' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php', - 'PhpParser\\Token' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Token.php', 'SebastianBergmann\\CliParser\\AmbiguousOptionException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php', 'SebastianBergmann\\CliParser\\Exception' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/Exception.php', 'SebastianBergmann\\CliParser\\OptionDoesNotAllowArgumentException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/OptionDoesNotAllowArgumentException.php', @@ -1361,6 +1093,7 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'SebastianBergmann\\CodeCoverage\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage.php', 'SebastianBergmann\\CodeCoverage\\Data\\ProcessedCodeCoverageData' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Data/ProcessedCodeCoverageData.php', 'SebastianBergmann\\CodeCoverage\\Data\\RawCodeCoverageData' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Data/RawCodeCoverageData.php', + 'SebastianBergmann\\CodeCoverage\\DeadCodeDetectionNotSupportedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/DeadCodeDetectionNotSupportedException.php', 'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Driver.php', 'SebastianBergmann\\CodeCoverage\\Driver\\PathExistsButIsNotDirectoryException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/PathExistsButIsNotDirectoryException.php', 'SebastianBergmann\\CodeCoverage\\Driver\\PcovDriver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/PcovDriver.php', @@ -1370,7 +1103,6 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'SebastianBergmann\\CodeCoverage\\Driver\\XdebugDriver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/XdebugDriver.php', 'SebastianBergmann\\CodeCoverage\\Driver\\XdebugNotAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/XdebugNotAvailableException.php', 'SebastianBergmann\\CodeCoverage\\Driver\\XdebugNotEnabledException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/XdebugNotEnabledException.php', - 'SebastianBergmann\\CodeCoverage\\Driver\\XdebugVersionNotSupportedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/XdebugVersionNotSupportedException.php', 'SebastianBergmann\\CodeCoverage\\Exception' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/Exception.php', 'SebastianBergmann\\CodeCoverage\\FileCouldNotBeWrittenException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/FileCouldNotBeWrittenException.php', 'SebastianBergmann\\CodeCoverage\\Filter' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Filter.php', @@ -1415,36 +1147,12 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'SebastianBergmann\\CodeCoverage\\StaticAnalysisCacheNotConfiguredException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/StaticAnalysisCacheNotConfiguredException.php', 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CacheWarmer' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/CacheWarmer.php', 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CachingFileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Class_' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Class_.php', 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CodeUnitFindingVisitor' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/CodeUnitFindingVisitor.php', 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ExecutableLinesFindingVisitor' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/ExecutableLinesFindingVisitor.php', 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\FileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/FileAnalyser.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Function_' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Function_.php', 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\IgnoredLinesFindingVisitor' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/IgnoredLinesFindingVisitor.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Interface_' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Interface_.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\LinesOfCode' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/LinesOfCode.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Method' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Method.php', 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ParsingFileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/ParsingFileAnalyser.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Trait_' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Trait_.php', - 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\Visibility' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/Value/Visibility.php', 'SebastianBergmann\\CodeCoverage\\TestIdMissingException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/TestIdMissingException.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Class_' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/Class_.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\ClassesThatExtendClass' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/ClassesThatExtendClass.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\ClassesThatImplementInterface' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/ClassesThatImplementInterface.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Function_' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/Function_.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\InvalidCodeCoverageTargetException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/InvalidCodeCoverageTargetException.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\MapBuilder' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/MapBuilder.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Mapper' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/Mapper.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Method' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/Method.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Namespace_' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/Namespace_.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Target' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/Target.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\TargetCollection' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/TargetCollection.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\TargetCollectionIterator' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/TargetCollectionIterator.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\TargetCollectionValidator' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/TargetCollectionValidator.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\Trait_' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/Trait_.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\ValidationFailure' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/ValidationFailure.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\ValidationResult' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/ValidationResult.php', - 'SebastianBergmann\\CodeCoverage\\Test\\Target\\ValidationSuccess' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Target/ValidationSuccess.php', 'SebastianBergmann\\CodeCoverage\\Test\\TestSize\\Known' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/TestSize/Known.php', 'SebastianBergmann\\CodeCoverage\\Test\\TestSize\\Large' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/TestSize/Large.php', 'SebastianBergmann\\CodeCoverage\\Test\\TestSize\\Medium' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/TestSize/Medium.php', @@ -1462,6 +1170,23 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'SebastianBergmann\\CodeCoverage\\Util\\Percentage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Util/Percentage.php', 'SebastianBergmann\\CodeCoverage\\Version' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Version.php', 'SebastianBergmann\\CodeCoverage\\XmlException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/XmlException.php', + 'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => __DIR__ . '/..' . '/sebastian/code-unit-reverse-lookup/src/Wizard.php', + 'SebastianBergmann\\CodeUnit\\ClassMethodUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/ClassMethodUnit.php', + 'SebastianBergmann\\CodeUnit\\ClassUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/ClassUnit.php', + 'SebastianBergmann\\CodeUnit\\CodeUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/CodeUnit.php', + 'SebastianBergmann\\CodeUnit\\CodeUnitCollection' => __DIR__ . '/..' . '/sebastian/code-unit/src/CodeUnitCollection.php', + 'SebastianBergmann\\CodeUnit\\CodeUnitCollectionIterator' => __DIR__ . '/..' . '/sebastian/code-unit/src/CodeUnitCollectionIterator.php', + 'SebastianBergmann\\CodeUnit\\Exception' => __DIR__ . '/..' . '/sebastian/code-unit/src/exceptions/Exception.php', + 'SebastianBergmann\\CodeUnit\\FileUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/FileUnit.php', + 'SebastianBergmann\\CodeUnit\\FunctionUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/FunctionUnit.php', + 'SebastianBergmann\\CodeUnit\\InterfaceMethodUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/InterfaceMethodUnit.php', + 'SebastianBergmann\\CodeUnit\\InterfaceUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/InterfaceUnit.php', + 'SebastianBergmann\\CodeUnit\\InvalidCodeUnitException' => __DIR__ . '/..' . '/sebastian/code-unit/src/exceptions/InvalidCodeUnitException.php', + 'SebastianBergmann\\CodeUnit\\Mapper' => __DIR__ . '/..' . '/sebastian/code-unit/src/Mapper.php', + 'SebastianBergmann\\CodeUnit\\NoTraitException' => __DIR__ . '/..' . '/sebastian/code-unit/src/exceptions/NoTraitException.php', + 'SebastianBergmann\\CodeUnit\\ReflectionException' => __DIR__ . '/..' . '/sebastian/code-unit/src/exceptions/ReflectionException.php', + 'SebastianBergmann\\CodeUnit\\TraitMethodUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/TraitMethodUnit.php', + 'SebastianBergmann\\CodeUnit\\TraitUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/TraitUnit.php', 'SebastianBergmann\\Comparator\\ArrayComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ArrayComparator.php', 'SebastianBergmann\\Comparator\\Comparator' => __DIR__ . '/..' . '/sebastian/comparator/src/Comparator.php', 'SebastianBergmann\\Comparator\\ComparisonFailure' => __DIR__ . '/..' . '/sebastian/comparator/src/ComparisonFailure.php', @@ -1526,6 +1251,7 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'SebastianBergmann\\LinesOfCode\\IllogicalValuesException' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Exception/IllogicalValuesException.php', 'SebastianBergmann\\LinesOfCode\\LineCountingVisitor' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/LineCountingVisitor.php', 'SebastianBergmann\\LinesOfCode\\LinesOfCode' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/LinesOfCode.php', + 'SebastianBergmann\\LinesOfCode\\NegativeValueException' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Exception/NegativeValueException.php', 'SebastianBergmann\\LinesOfCode\\RuntimeException' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Exception/RuntimeException.php', 'SebastianBergmann\\ObjectEnumerator\\Enumerator' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/Enumerator.php', 'SebastianBergmann\\ObjectReflector\\ObjectReflector' => __DIR__ . '/..' . '/sebastian/object-reflector/src/ObjectReflector.php', @@ -1570,16 +1296,6 @@ class ComposerStaticInitc00e5b601adae61bbbc3f6be4864ef55 'TheSeer\\Tokenizer\\TokenCollectionException' => __DIR__ . '/..' . '/theseer/tokenizer/src/TokenCollectionException.php', 'TheSeer\\Tokenizer\\Tokenizer' => __DIR__ . '/..' . '/theseer/tokenizer/src/Tokenizer.php', 'TheSeer\\Tokenizer\\XMLSerializer' => __DIR__ . '/..' . '/theseer/tokenizer/src/XMLSerializer.php', - 'goodboyalex\\php_components_pack\\classes\\ActionState' => __DIR__ . '/../..' . '/sources/classes/ActionState.php', - 'goodboyalex\\php_components_pack\\classes\\ClassMapper' => __DIR__ . '/../..' . '/sources/classes/ClassMapper.php', - 'goodboyalex\\php_components_pack\\enums\\MessageType' => __DIR__ . '/../..' . '/sources/enums/MessageType.php', - 'goodboyalex\\php_components_pack\\extensions\\ArrayExtension' => __DIR__ . '/../..' . '/sources/extensions/ArrayExtension.php', - 'goodboyalex\\php_components_pack\\extensions\\GUIDExtension' => __DIR__ . '/../..' . '/sources/extensions/GUIDExtension.php', - 'goodboyalex\\php_components_pack\\extensions\\StringExtension' => __DIR__ . '/../..' . '/sources/extensions/StringExtension.php', - 'goodboyalex\\php_components_pack\\interfaces\\ISerializable' => __DIR__ . '/../..' . '/sources/interfaces/ISerializable.php', - 'goodboyalex\\php_components_pack\\models\\ActionStateMessageModel' => __DIR__ . '/../..' . '/sources/models/ActionStateMessageModel.php', - 'goodboyalex\\php_components_pack\\tests\\GUIDExtensionTest' => __DIR__ . '/../..' . '/tests/GUIDExtensionTest.php', - 'goodboyalex\\php_components_pack\\traits\\EnumExtensionsTrait' => __DIR__ . '/../..' . '/sources/traits/EnumExtensionsTrait.php', 'staabm\\SideEffectsDetector\\SideEffect' => __DIR__ . '/..' . '/staabm/side-effects-detector/lib/SideEffect.php', 'staabm\\SideEffectsDetector\\SideEffectsDetector' => __DIR__ . '/..' . '/staabm/side-effects-detector/lib/SideEffectsDetector.php', ); diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 2bb36d4..3bff9b3 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -2,17 +2,17 @@ "packages": [ { "name": "myclabs/deep-copy", - "version": "1.x-dev", - "version_normalized": "1.9999999.9999999.9999999-dev", + "version": "1.12.1", + "version_normalized": "1.12.1.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "4764e040f8743e92b86c36f488f32d0265dd1dae" + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/4764e040f8743e92b86c36f488f32d0265dd1dae", - "reference": "4764e040f8743e92b86c36f488f32d0265dd1dae", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", "shasum": "" }, "require": { @@ -28,8 +28,7 @@ "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, - "time": "2024-11-26T13:04:49+00:00", - "default-branch": true, + "time": "2024-11-08T17:47:46+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -54,7 +53,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.x" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" }, "funding": [ { @@ -127,8 +126,8 @@ }, { "name": "phar-io/manifest", - "version": "dev-master", - "version_normalized": "dev-master", + "version": "2.0.4", + "version_normalized": "2.0.4.0", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", @@ -149,7 +148,6 @@ "php": "^7.2 || ^8.0" }, "time": "2024-03-03T12:33:53+00:00", - "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -252,46 +250,46 @@ }, { "name": "phpunit/php-code-coverage", - "version": "dev-main", - "version_normalized": "dev-main", + "version": "11.0.8", + "version_normalized": "11.0.8.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "30b614244b02907cf0b2edc559fd5e24bd05ea57" + "reference": "418c59fd080954f8c4aa5631d9502ecda2387118" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/30b614244b02907cf0b2edc559fd5e24bd05ea57", - "reference": "30b614244b02907cf0b2edc559fd5e24bd05ea57", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/418c59fd080954f8c4aa5631d9502ecda2387118", + "reference": "418c59fd080954f8c4aa5631d9502ecda2387118", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^5.4.0", - "php": ">=8.3", - "phpunit/php-file-iterator": "^6.0-dev", - "phpunit/php-text-template": "^5.0-dev", - "sebastian/complexity": "^5.0-dev", - "sebastian/environment": "^8.0-dev", - "sebastian/lines-of-code": "^4.0-dev", - "sebastian/version": "^6.0-dev", + "nikic/php-parser": "^5.3.1", + "php": ">=8.2", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-text-template": "^4.0.1", + "sebastian/code-unit-reverse-lookup": "^4.0.1", + "sebastian/complexity": "^4.0.1", + "sebastian/environment": "^7.2.0", + "sebastian/lines-of-code": "^3.0.1", + "sebastian/version": "^5.0.2", "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.5.0" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, - "time": "2025-01-28T10:09:07+00:00", - "default-branch": true, + "time": "2024-12-11T12:34:27+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "12.0.x-dev" + "dev-main": "11.0.x-dev" } }, "installation-source": "dist", @@ -321,7 +319,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/main" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.8" }, "funding": [ { @@ -333,31 +331,30 @@ }, { "name": "phpunit/php-file-iterator", - "version": "dev-main", - "version_normalized": "dev-main", + "version": "5.1.0", + "version_normalized": "5.1.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "a1339a60b2206324e440c4a3806bbd873fda0860" + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a1339a60b2206324e440c4a3806bbd873fda0860", - "reference": "a1339a60b2206324e440c4a3806bbd873fda0860", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/118cfaaa8bc5aef3287bf315b6060b1174754af6", + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^11.0" }, - "time": "2025-01-15T13:41:39+00:00", - "default-branch": true, + "time": "2024-08-27T05:02:59+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "5.0-dev" } }, "installation-source": "dist", @@ -386,7 +383,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/main" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.0" }, "funding": [ { @@ -398,35 +395,34 @@ }, { "name": "phpunit/php-invoker", - "version": "dev-main", - "version_normalized": "dev-main", + "version": "5.0.1", + "version_normalized": "5.0.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "a79e641e661a20d3b8c264b0b3b9eb0d98f98506" + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/a79e641e661a20d3b8c264b0b3b9eb0d98f98506", - "reference": "a79e641e661a20d3b8c264b0b3b9eb0d98f98506", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, "suggest": { "ext-pcntl": "*" }, - "time": "2025-01-16T08:05:12+00:00", - "default-branch": true, + "time": "2024-07-03T05:07:44+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "5.0-dev" } }, "installation-source": "dist", @@ -454,7 +450,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/main" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.1" }, "funding": [ { @@ -466,31 +462,30 @@ }, { "name": "phpunit/php-text-template", - "version": "dev-main", - "version_normalized": "dev-main", + "version": "4.0.1", + "version_normalized": "4.0.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "0199874fd3f2ae19aa9813bdfcb68e67671eee64" + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0199874fd3f2ae19aa9813bdfcb68e67671eee64", - "reference": "0199874fd3f2ae19aa9813bdfcb68e67671eee64", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "time": "2025-01-16T08:08:04+00:00", - "default-branch": true, + "time": "2024-07-03T05:08:43+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "4.0-dev" } }, "installation-source": "dist", @@ -518,7 +513,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/main" + "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.1" }, "funding": [ { @@ -530,31 +525,30 @@ }, { "name": "phpunit/php-timer", - "version": "dev-main", - "version_normalized": "dev-main", + "version": "7.0.1", + "version_normalized": "7.0.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "aa0f95babbd87f096f1c20364204f195dd4b4608" + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/aa0f95babbd87f096f1c20364204f195dd4b4608", - "reference": "aa0f95babbd87f096f1c20364204f195dd4b4608", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "time": "2025-01-16T08:10:48+00:00", - "default-branch": true, + "time": "2024-07-03T05:09:35+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "8.0-dev" + "dev-main": "7.0-dev" } }, "installation-source": "dist", @@ -582,7 +576,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", "security": "https://github.com/sebastianbergmann/php-timer/security/policy", - "source": "https://github.com/sebastianbergmann/php-timer/tree/main" + "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.1" }, "funding": [ { @@ -594,17 +588,17 @@ }, { "name": "phpunit/phpunit", - "version": "dev-main", - "version_normalized": "dev-main", + "version": "11.5.6", + "version_normalized": "11.5.6.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "9f2ebaf18f7741a5ee587f80a42632edaa42d424" + "reference": "3c3ae14c90f244cdda95028c3e469028e8d1c02c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9f2ebaf18f7741a5ee587f80a42632edaa42d424", - "reference": "9f2ebaf18f7741a5ee587f80a42632edaa42d424", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3c3ae14c90f244cdda95028c3e469028e8d1c02c", + "reference": "3c3ae14c90f244cdda95028c3e469028e8d1c02c", "shasum": "" }, "require": { @@ -617,32 +611,35 @@ "myclabs/deep-copy": "^1.12.1", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", - "php": ">=8.3", - "phpunit/php-code-coverage": "^12.0-dev", - "phpunit/php-file-iterator": "^6.0-dev", - "phpunit/php-invoker": "^6.0-dev", - "phpunit/php-text-template": "^5.0-dev", - "phpunit/php-timer": "^8.0-dev", - "sebastian/cli-parser": "^4.0-dev", - "sebastian/comparator": "^7.0-dev", - "sebastian/diff": "^7.0-dev", - "sebastian/environment": "^8.0-dev", - "sebastian/exporter": "^7.0-dev", - "sebastian/global-state": "^8.0-dev", - "sebastian/object-enumerator": "^7.0-dev", - "sebastian/type": "^6.0-dev", - "sebastian/version": "^6.0-dev", + "php": ">=8.2", + "phpunit/php-code-coverage": "^11.0.8", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-invoker": "^5.0.1", + "phpunit/php-text-template": "^4.0.1", + "phpunit/php-timer": "^7.0.1", + "sebastian/cli-parser": "^3.0.2", + "sebastian/code-unit": "^3.0.2", + "sebastian/comparator": "^6.3.0", + "sebastian/diff": "^6.0.2", + "sebastian/environment": "^7.2.0", + "sebastian/exporter": "^6.3.0", + "sebastian/global-state": "^7.0.2", + "sebastian/object-enumerator": "^6.0.1", + "sebastian/type": "^5.1.0", + "sebastian/version": "^5.0.2", "staabm/side-effects-detector": "^1.0.5" }, - "time": "2025-01-31T07:29:09+00:00", - "default-branch": true, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files" + }, + "time": "2025-01-31T07:03:30+00:00", "bin": [ "phpunit" ], "type": "library", "extra": { "branch-alias": { - "dev-main": "12.0-dev" + "dev-main": "11.5-dev" } }, "installation-source": "dist", @@ -675,7 +672,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/main" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.6" }, "funding": [ { @@ -695,31 +692,30 @@ }, { "name": "sebastian/cli-parser", - "version": "dev-main", - "version_normalized": "dev-main", + "version": "3.0.2", + "version_normalized": "3.0.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "7f79d38ab02a0cb4089f31207ca11b74f49c7848" + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/7f79d38ab02a0cb4089f31207ca11b74f49c7848", - "reference": "7f79d38ab02a0cb4089f31207ca11b74f49c7848", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "time": "2025-01-16T08:13:26+00:00", - "default-branch": true, + "time": "2024-07-03T04:41:36+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "3.0-dev" } }, "installation-source": "dist", @@ -744,7 +740,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/main" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2" }, "funding": [ { @@ -755,39 +751,157 @@ "install-path": "../sebastian/cli-parser" }, { - "name": "sebastian/comparator", - "version": "dev-main", - "version_normalized": "dev-main", + "name": "sebastian/code-unit", + "version": "3.0.2", + "version_normalized": "3.0.2.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "07f683f544931bc816c47faf894e387f2216a1e9" + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/07f683f544931bc816c47faf894e387f2216a1e9", - "reference": "07f683f544931bc816c47faf894e387f2216a1e9", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca", + "reference": "ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.5" + }, + "time": "2024-12-12T09:59:06+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "security": "https://github.com/sebastianbergmann/code-unit/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "install-path": "../sebastian/code-unit" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "4.0.1", + "version_normalized": "4.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "time": "2024-07-03T04:45:54+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "install-path": "../sebastian/code-unit-reverse-lookup" + }, + { + "name": "sebastian/comparator", + "version": "6.3.0", + "version_normalized": "6.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "d4e47a769525c4dd38cea90e5dcd435ddbbc7115" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/d4e47a769525c4dd38cea90e5dcd435ddbbc7115", + "reference": "d4e47a769525c4dd38cea90e5dcd435ddbbc7115", "shasum": "" }, "require": { "ext-dom": "*", "ext-mbstring": "*", - "php": ">=8.3", - "sebastian/diff": "^7.0", - "sebastian/exporter": "^7.0" + "php": ">=8.2", + "sebastian/diff": "^6.0", + "sebastian/exporter": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.4" }, "suggest": { "ext-bcmath": "For comparing BcMath\\Number objects" }, - "time": "2025-01-16T09:21:21+00:00", - "default-branch": true, + "time": "2025-01-06T10:28:19+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.2-dev" } }, "installation-source": "dist", @@ -828,7 +942,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/main" + "source": "https://github.com/sebastianbergmann/comparator/tree/6.3.0" }, "funding": [ { @@ -840,32 +954,31 @@ }, { "name": "sebastian/complexity", - "version": "dev-main", - "version_normalized": "dev-main", + "version": "4.0.1", + "version_normalized": "4.0.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "eec688b04904c5ecfa3b94f59bc60485209805a9" + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/eec688b04904c5ecfa3b94f59bc60485209805a9", - "reference": "eec688b04904c5ecfa3b94f59bc60485209805a9", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0", "shasum": "" }, "require": { "nikic/php-parser": "^5.0", - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "time": "2025-01-16T08:20:43+00:00", - "default-branch": true, + "time": "2024-07-03T04:49:50+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "4.0-dev" } }, "installation-source": "dist", @@ -890,7 +1003,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/main" + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1" }, "funding": [ { @@ -902,32 +1015,31 @@ }, { "name": "sebastian/diff", - "version": "dev-main", - "version_normalized": "dev-main", + "version": "6.0.2", + "version_normalized": "6.0.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "87a9594e6994ba8ee9010836903305a64c895083" + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/87a9594e6994ba8ee9010836903305a64c895083", - "reference": "87a9594e6994ba8ee9010836903305a64c895083", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev", + "phpunit/phpunit": "^11.0", "symfony/process": "^4.2 || ^5" }, - "time": "2025-01-16T09:04:01+00:00", - "default-branch": true, + "time": "2024-07-03T04:53:05+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.0-dev" } }, "installation-source": "dist", @@ -961,7 +1073,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/main" + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" }, "funding": [ { @@ -973,34 +1085,33 @@ }, { "name": "sebastian/environment", - "version": "dev-main", - "version_normalized": "dev-main", + "version": "7.2.0", + "version_normalized": "7.2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "92b1a897b49e191a8fbca823d75bc0e157ff7cdb" + "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/92b1a897b49e191a8fbca823d75bc0e157ff7cdb", - "reference": "92b1a897b49e191a8fbca823d75bc0e157ff7cdb", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", + "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, "suggest": { "ext-posix": "*" }, - "time": "2025-01-16T08:28:42+00:00", - "default-branch": true, + "time": "2024-07-03T04:54:44+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "8.0-dev" + "dev-main": "7.2-dev" } }, "installation-source": "dist", @@ -1029,7 +1140,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/main" + "source": "https://github.com/sebastianbergmann/environment/tree/7.2.0" }, "funding": [ { @@ -1041,33 +1152,32 @@ }, { "name": "sebastian/exporter", - "version": "dev-main", - "version_normalized": "dev-main", + "version": "6.3.0", + "version_normalized": "6.3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "17e38c7a602c690c6f097b6aeaf47d0771ace9ca" + "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/17e38c7a602c690c6f097b6aeaf47d0771ace9ca", - "reference": "17e38c7a602c690c6f097b6aeaf47d0771ace9ca", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/3473f61172093b2da7de1fb5782e1f24cc036dc3", + "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": ">=8.3", - "sebastian/recursion-context": "^7.0-dev" + "php": ">=8.2", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.3" }, - "time": "2025-01-16T08:54:00+00:00", - "default-branch": true, + "time": "2024-12-05T09:17:50+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.1-dev" } }, "installation-source": "dist", @@ -1111,7 +1221,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/main" + "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.0" }, "funding": [ { @@ -1123,34 +1233,33 @@ }, { "name": "sebastian/global-state", - "version": "dev-main", - "version_normalized": "dev-main", + "version": "7.0.2", + "version_normalized": "7.0.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "8a089e5a2a118a6725b603a47be1d1a9da1b9a68" + "reference": "3be331570a721f9a4b5917f4209773de17f747d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/8a089e5a2a118a6725b603a47be1d1a9da1b9a68", - "reference": "8a089e5a2a118a6725b603a47be1d1a9da1b9a68", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7", "shasum": "" }, "require": { - "php": ">=8.3", - "sebastian/object-reflector": "^5.0", - "sebastian/recursion-context": "^7.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "time": "2025-01-16T09:14:38+00:00", - "default-branch": true, + "time": "2024-07-03T04:57:36+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "8.0-dev" + "dev-main": "7.0-dev" } }, "installation-source": "dist", @@ -1177,7 +1286,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", "security": "https://github.com/sebastianbergmann/global-state/security/policy", - "source": "https://github.com/sebastianbergmann/global-state/tree/main" + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2" }, "funding": [ { @@ -1189,32 +1298,31 @@ }, { "name": "sebastian/lines-of-code", - "version": "dev-main", - "version_normalized": "dev-main", + "version": "3.0.1", + "version_normalized": "3.0.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "fe8070ab1160c447839048ab240c07c448caa2b2" + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/fe8070ab1160c447839048ab240c07c448caa2b2", - "reference": "fe8070ab1160c447839048ab240c07c448caa2b2", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a", "shasum": "" }, "require": { "nikic/php-parser": "^5.0", - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "time": "2025-01-16T08:36:53+00:00", - "default-branch": true, + "time": "2024-07-03T04:58:38+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "3.0-dev" } }, "installation-source": "dist", @@ -1239,7 +1347,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/main" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1" }, "funding": [ { @@ -1251,33 +1359,32 @@ }, { "name": "sebastian/object-enumerator", - "version": "dev-main", - "version_normalized": "dev-main", + "version": "6.0.1", + "version_normalized": "6.0.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "250d806a14baca8c4b37823426277dbcb8d4440d" + "reference": "f5b498e631a74204185071eb41f33f38d64608aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/250d806a14baca8c4b37823426277dbcb8d4440d", - "reference": "250d806a14baca8c4b37823426277dbcb8d4440d", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa", "shasum": "" }, "require": { - "php": ">=8.3", - "sebastian/object-reflector": "^5.0", - "sebastian/recursion-context": "^7.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "time": "2025-01-16T08:38:51+00:00", - "default-branch": true, + "time": "2024-07-03T05:00:13+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.0-dev" } }, "installation-source": "dist", @@ -1301,7 +1408,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/main" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1" }, "funding": [ { @@ -1313,31 +1420,30 @@ }, { "name": "sebastian/object-reflector", - "version": "dev-main", - "version_normalized": "dev-main", + "version": "4.0.1", + "version_normalized": "4.0.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "7dddd66b56ba05cb474de46b2b623e92b42bff3a" + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/7dddd66b56ba05cb474de46b2b623e92b42bff3a", - "reference": "7dddd66b56ba05cb474de46b2b623e92b42bff3a", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "time": "2025-01-16T08:40:54+00:00", - "default-branch": true, + "time": "2024-07-03T05:01:32+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "4.0-dev" } }, "installation-source": "dist", @@ -1361,7 +1467,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/main" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.1" }, "funding": [ { @@ -1373,31 +1479,30 @@ }, { "name": "sebastian/recursion-context", - "version": "dev-main", - "version_normalized": "dev-main", + "version": "6.0.2", + "version_normalized": "6.0.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "c9442e27dc9965ad453397725830d8ecb5497410" + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/c9442e27dc9965ad453397725830d8ecb5497410", - "reference": "c9442e27dc9965ad453397725830d8ecb5497410", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/694d156164372abbd149a4b85ccda2e4670c0e16", + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "time": "2025-01-16T08:53:18+00:00", - "default-branch": true, + "time": "2024-07-03T05:10:34+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.0-dev" } }, "installation-source": "dist", @@ -1429,7 +1534,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/main" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.2" }, "funding": [ { @@ -1441,31 +1546,30 @@ }, { "name": "sebastian/type", - "version": "dev-main", - "version_normalized": "dev-main", + "version": "5.1.0", + "version_normalized": "5.1.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b07de32ccc63961cfcf87c4531816388dbaf264f" + "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b07de32ccc63961cfcf87c4531816388dbaf264f", - "reference": "b07de32ccc63961cfcf87c4531816388dbaf264f", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/461b9c5da241511a2a0e8f240814fb23ce5c0aac", + "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.3" }, - "time": "2025-01-16T08:45:13+00:00", - "default-branch": true, + "time": "2024-09-17T13:12:04+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "5.1-dev" } }, "installation-source": "dist", @@ -1490,7 +1594,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/type/issues", "security": "https://github.com/sebastianbergmann/type/security/policy", - "source": "https://github.com/sebastianbergmann/type/tree/main" + "source": "https://github.com/sebastianbergmann/type/tree/5.1.0" }, "funding": [ { @@ -1502,28 +1606,27 @@ }, { "name": "sebastian/version", - "version": "dev-main", - "version_normalized": "dev-main", + "version": "5.0.2", + "version_normalized": "5.0.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "3e8786f0e004140c3be066577af51e7ea0446e54" + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/3e8786f0e004140c3be066577af51e7ea0446e54", - "reference": "3e8786f0e004140c3be066577af51e7ea0446e54", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, - "time": "2025-01-16T08:47:17+00:00", - "default-branch": true, + "time": "2024-10-09T05:16:32+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "5.0-dev" } }, "installation-source": "dist", @@ -1548,7 +1651,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/version/issues", "security": "https://github.com/sebastianbergmann/version/security/policy", - "source": "https://github.com/sebastianbergmann/version/tree/main" + "source": "https://github.com/sebastianbergmann/version/tree/5.0.2" }, "funding": [ { @@ -1680,6 +1783,8 @@ "phpunit/php-timer", "phpunit/phpunit", "sebastian/cli-parser", + "sebastian/code-unit", + "sebastian/code-unit-reverse-lookup", "sebastian/comparator", "sebastian/complexity", "sebastian/diff", diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 61493ff..c16a6b2 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'goodboyalex/php_components_pack', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'f1a79d66ec29418af66448e6eca584eddfe31d4d', + 'reference' => '4bcb4c60dd4219bbb7ff6c9887884541010bcdbc', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -13,16 +13,16 @@ 'goodboyalex/php_components_pack' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'f1a79d66ec29418af66448e6eca584eddfe31d4d', + 'reference' => '4bcb4c60dd4219bbb7ff6c9887884541010bcdbc', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false, ), 'myclabs/deep-copy' => array( - 'pretty_version' => '1.x-dev', - 'version' => '1.9999999.9999999.9999999-dev', - 'reference' => '4764e040f8743e92b86c36f488f32d0265dd1dae', + 'pretty_version' => '1.12.1', + 'version' => '1.12.1.0', + 'reference' => '123267b2c49fbf30d78a7b2d333f6be754b94845', 'type' => 'library', 'install_path' => __DIR__ . '/../myclabs/deep-copy', 'aliases' => array(), @@ -38,14 +38,12 @@ 'dev_requirement' => true, ), 'phar-io/manifest' => array( - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', + 'pretty_version' => '2.0.4', + 'version' => '2.0.4.0', 'reference' => '54750ef60c58e43759730615a392c31c80e23176', 'type' => 'library', 'install_path' => __DIR__ . '/../phar-io/manifest', - 'aliases' => array( - 0 => '2.0.x-dev', - ), + 'aliases' => array(), 'dev_requirement' => true, ), 'phar-io/version' => array( @@ -58,212 +56,192 @@ 'dev_requirement' => true, ), 'phpunit/php-code-coverage' => array( - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => '30b614244b02907cf0b2edc559fd5e24bd05ea57', + 'pretty_version' => '11.0.8', + 'version' => '11.0.8.0', + 'reference' => '418c59fd080954f8c4aa5631d9502ecda2387118', 'type' => 'library', 'install_path' => __DIR__ . '/../phpunit/php-code-coverage', - 'aliases' => array( - 0 => '12.0.x-dev', - ), + 'aliases' => array(), 'dev_requirement' => true, ), 'phpunit/php-file-iterator' => array( - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => 'a1339a60b2206324e440c4a3806bbd873fda0860', + 'pretty_version' => '5.1.0', + 'version' => '5.1.0.0', + 'reference' => '118cfaaa8bc5aef3287bf315b6060b1174754af6', 'type' => 'library', 'install_path' => __DIR__ . '/../phpunit/php-file-iterator', - 'aliases' => array( - 0 => '6.0.x-dev', - ), + 'aliases' => array(), 'dev_requirement' => true, ), 'phpunit/php-invoker' => array( - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => 'a79e641e661a20d3b8c264b0b3b9eb0d98f98506', + 'pretty_version' => '5.0.1', + 'version' => '5.0.1.0', + 'reference' => 'c1ca3814734c07492b3d4c5f794f4b0995333da2', 'type' => 'library', 'install_path' => __DIR__ . '/../phpunit/php-invoker', - 'aliases' => array( - 0 => '6.0.x-dev', - ), + 'aliases' => array(), 'dev_requirement' => true, ), 'phpunit/php-text-template' => array( - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => '0199874fd3f2ae19aa9813bdfcb68e67671eee64', + 'pretty_version' => '4.0.1', + 'version' => '4.0.1.0', + 'reference' => '3e0404dc6b300e6bf56415467ebcb3fe4f33e964', 'type' => 'library', 'install_path' => __DIR__ . '/../phpunit/php-text-template', - 'aliases' => array( - 0 => '5.0.x-dev', - ), + 'aliases' => array(), 'dev_requirement' => true, ), 'phpunit/php-timer' => array( - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => 'aa0f95babbd87f096f1c20364204f195dd4b4608', + 'pretty_version' => '7.0.1', + 'version' => '7.0.1.0', + 'reference' => '3b415def83fbcb41f991d9ebf16ae4ad8b7837b3', 'type' => 'library', 'install_path' => __DIR__ . '/../phpunit/php-timer', - 'aliases' => array( - 0 => '8.0.x-dev', - ), + 'aliases' => array(), 'dev_requirement' => true, ), 'phpunit/phpunit' => array( - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => '9f2ebaf18f7741a5ee587f80a42632edaa42d424', + 'pretty_version' => '11.5.6', + 'version' => '11.5.6.0', + 'reference' => '3c3ae14c90f244cdda95028c3e469028e8d1c02c', 'type' => 'library', 'install_path' => __DIR__ . '/../phpunit/phpunit', - 'aliases' => array( - 0 => '12.0.x-dev', - ), + 'aliases' => array(), 'dev_requirement' => true, ), 'sebastian/cli-parser' => array( - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => '7f79d38ab02a0cb4089f31207ca11b74f49c7848', + 'pretty_version' => '3.0.2', + 'version' => '3.0.2.0', + 'reference' => '15c5dd40dc4f38794d383bb95465193f5e0ae180', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/cli-parser', - 'aliases' => array( - 0 => '4.0.x-dev', - ), + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/code-unit' => array( + 'pretty_version' => '3.0.2', + 'version' => '3.0.2.0', + 'reference' => 'ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/code-unit', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/code-unit-reverse-lookup' => array( + 'pretty_version' => '4.0.1', + 'version' => '4.0.1.0', + 'reference' => '183a9b2632194febd219bb9246eee421dad8d45e', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/code-unit-reverse-lookup', + 'aliases' => array(), 'dev_requirement' => true, ), 'sebastian/comparator' => array( - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => '07f683f544931bc816c47faf894e387f2216a1e9', + 'pretty_version' => '6.3.0', + 'version' => '6.3.0.0', + 'reference' => 'd4e47a769525c4dd38cea90e5dcd435ddbbc7115', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/comparator', - 'aliases' => array( - 0 => '7.0.x-dev', - ), + 'aliases' => array(), 'dev_requirement' => true, ), 'sebastian/complexity' => array( - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => 'eec688b04904c5ecfa3b94f59bc60485209805a9', + 'pretty_version' => '4.0.1', + 'version' => '4.0.1.0', + 'reference' => 'ee41d384ab1906c68852636b6de493846e13e5a0', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/complexity', - 'aliases' => array( - 0 => '5.0.x-dev', - ), + 'aliases' => array(), 'dev_requirement' => true, ), 'sebastian/diff' => array( - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => '87a9594e6994ba8ee9010836903305a64c895083', + 'pretty_version' => '6.0.2', + 'version' => '6.0.2.0', + 'reference' => 'b4ccd857127db5d41a5b676f24b51371d76d8544', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', - 'aliases' => array( - 0 => '7.0.x-dev', - ), + 'aliases' => array(), 'dev_requirement' => true, ), 'sebastian/environment' => array( - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => '92b1a897b49e191a8fbca823d75bc0e157ff7cdb', + 'pretty_version' => '7.2.0', + 'version' => '7.2.0.0', + 'reference' => '855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/environment', - 'aliases' => array( - 0 => '8.0.x-dev', - ), + 'aliases' => array(), 'dev_requirement' => true, ), 'sebastian/exporter' => array( - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => '17e38c7a602c690c6f097b6aeaf47d0771ace9ca', + 'pretty_version' => '6.3.0', + 'version' => '6.3.0.0', + 'reference' => '3473f61172093b2da7de1fb5782e1f24cc036dc3', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/exporter', - 'aliases' => array( - 0 => '7.0.x-dev', - ), + 'aliases' => array(), 'dev_requirement' => true, ), 'sebastian/global-state' => array( - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => '8a089e5a2a118a6725b603a47be1d1a9da1b9a68', + 'pretty_version' => '7.0.2', + 'version' => '7.0.2.0', + 'reference' => '3be331570a721f9a4b5917f4209773de17f747d7', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/global-state', - 'aliases' => array( - 0 => '8.0.x-dev', - ), + 'aliases' => array(), 'dev_requirement' => true, ), 'sebastian/lines-of-code' => array( - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => 'fe8070ab1160c447839048ab240c07c448caa2b2', + 'pretty_version' => '3.0.1', + 'version' => '3.0.1.0', + 'reference' => 'd36ad0d782e5756913e42ad87cb2890f4ffe467a', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/lines-of-code', - 'aliases' => array( - 0 => '4.0.x-dev', - ), + 'aliases' => array(), 'dev_requirement' => true, ), 'sebastian/object-enumerator' => array( - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => '250d806a14baca8c4b37823426277dbcb8d4440d', + 'pretty_version' => '6.0.1', + 'version' => '6.0.1.0', + 'reference' => 'f5b498e631a74204185071eb41f33f38d64608aa', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/object-enumerator', - 'aliases' => array( - 0 => '7.0.x-dev', - ), + 'aliases' => array(), 'dev_requirement' => true, ), 'sebastian/object-reflector' => array( - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => '7dddd66b56ba05cb474de46b2b623e92b42bff3a', + 'pretty_version' => '4.0.1', + 'version' => '4.0.1.0', + 'reference' => '6e1a43b411b2ad34146dee7524cb13a068bb35f9', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/object-reflector', - 'aliases' => array( - 0 => '5.0.x-dev', - ), + 'aliases' => array(), 'dev_requirement' => true, ), 'sebastian/recursion-context' => array( - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => 'c9442e27dc9965ad453397725830d8ecb5497410', + 'pretty_version' => '6.0.2', + 'version' => '6.0.2.0', + 'reference' => '694d156164372abbd149a4b85ccda2e4670c0e16', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/recursion-context', - 'aliases' => array( - 0 => '7.0.x-dev', - ), + 'aliases' => array(), 'dev_requirement' => true, ), 'sebastian/type' => array( - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => 'b07de32ccc63961cfcf87c4531816388dbaf264f', + 'pretty_version' => '5.1.0', + 'version' => '5.1.0.0', + 'reference' => '461b9c5da241511a2a0e8f240814fb23ce5c0aac', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/type', - 'aliases' => array( - 0 => '6.0.x-dev', - ), + 'aliases' => array(), 'dev_requirement' => true, ), 'sebastian/version' => array( - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => '3e8786f0e004140c3be066577af51e7ea0446e54', + 'pretty_version' => '5.0.2', + 'version' => '5.0.2.0', + 'reference' => 'c687e3387b99f5b03b6caa64c74b63e2936ff874', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/version', - 'aliases' => array( - 0 => '6.0.x-dev', - ), + 'aliases' => array(), 'dev_requirement' => true, ), 'staabm/side-effects-detector' => array( diff --git a/vendor/phpunit/php-code-coverage/ChangeLog-11.0.md b/vendor/phpunit/php-code-coverage/ChangeLog-11.0.md new file mode 100644 index 0000000..a6afdf3 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/ChangeLog-11.0.md @@ -0,0 +1,74 @@ +# ChangeLog + +All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. + +## [11.0.8] - 2024-12-11 + +### Changed + +* [#1054](https://github.com/sebastianbergmann/php-code-coverage/pull/1054): Use click event for toggling "tests covering this line" popover in HTML report + +## [11.0.7] - 2024-10-09 + +### Changed + +* [#1037](https://github.com/sebastianbergmann/php-code-coverage/pull/1037): Upgrade Bootstrap to version 5.3.3 for HTML report +* [#1046](https://github.com/sebastianbergmann/php-code-coverage/pull/1046): CSS fixes for HTML report + +### Deprecated + +* The `SebastianBergmann\CodeCoverage\Filter::includeUncoveredFiles()`, `SebastianBergmann\CodeCoverage\Filter::excludeUncoveredFiles()`, and `SebastianBergmann\CodeCoverage\Filter::excludeFile()` methods have been deprecated + +## [11.0.6] - 2024-08-22 + +### Changed + +* Updated dependencies (so that users that install using Composer's `--prefer-lowest` CLI option also get recent versions) + +## [11.0.5] - 2024-07-03 + +### Changed + +* This project now uses PHPStan instead of Psalm for static analysis + +## [11.0.4] - 2024-06-29 + +### Fixed + +* [#967](https://github.com/sebastianbergmann/php-code-coverage/issues/967): Identification of executable lines for `match` expressions does not work correctly + +## [11.0.3] - 2024-03-12 + +### Fixed + +* [#1033](https://github.com/sebastianbergmann/php-code-coverage/issues/1033): `@codeCoverageIgnore` annotation does not work on `enum` + +## [11.0.2] - 2024-03-09 + +### Changed + +* [#1032](https://github.com/sebastianbergmann/php-code-coverage/pull/1032): Pad lines in code coverage report only when colors are shown + +## [11.0.1] - 2024-03-02 + +### Changed + +* Do not use implicitly nullable parameters + +## [11.0.0] - 2024-02-02 + +### Removed + +* The `SebastianBergmann\CodeCoverage\Filter::includeDirectory()`, `SebastianBergmann\CodeCoverage\Filter::excludeDirectory()`, and `SebastianBergmann\CodeCoverage\Filter::excludeFile()` methods have been removed +* This component now requires PHP-Parser 5 +* This component is no longer supported on PHP 8.1 + +[11.0.8]: https://github.com/sebastianbergmann/php-code-coverage/compare/11.0.7...11.0.8 +[11.0.7]: https://github.com/sebastianbergmann/php-code-coverage/compare/11.0.6...11.0.7 +[11.0.6]: https://github.com/sebastianbergmann/php-code-coverage/compare/11.0.5...11.0.6 +[11.0.5]: https://github.com/sebastianbergmann/php-code-coverage/compare/11.0.4...11.0.5 +[11.0.4]: https://github.com/sebastianbergmann/php-code-coverage/compare/11.0.3...11.0.4 +[11.0.3]: https://github.com/sebastianbergmann/php-code-coverage/compare/11.0.2...11.0.3 +[11.0.2]: https://github.com/sebastianbergmann/php-code-coverage/compare/11.0.1...11.0.2 +[11.0.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/11.0.0...11.0.1 +[11.0.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.1...11.0.0 diff --git a/vendor/phpunit/php-code-coverage/ChangeLog-12.0.md b/vendor/phpunit/php-code-coverage/ChangeLog-12.0.md deleted file mode 100644 index b432240..0000000 --- a/vendor/phpunit/php-code-coverage/ChangeLog-12.0.md +++ /dev/null @@ -1,19 +0,0 @@ -# ChangeLog - -All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [12.0.0] - 2025-02-07 - -### Changed - -* `CodeCoverage::stop()` and `CodeCoverage::append()` now expect arguments of type `TargetCollection` instead of `array` to configure code coverage targets - -### Removed - -* Methods `CodeCoverage::includeUncoveredFiles()` and `CodeCoverage::excludeUncoveredFiles()` -* Method `CodeCoverage::detectsDeadCode()` -* Optional argument `$linesToBeUsed` of `CodeCoverage::stop()` and `CodeCoverage::append()` methods -* This component is no longer supported on PHP 8.2 -* This component no longer supports Xdebug versions before Xdebug 3.1 - -[12.0.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/11.0...main diff --git a/vendor/phpunit/php-code-coverage/LICENSE b/vendor/phpunit/php-code-coverage/LICENSE index 017eb48..89f0530 100644 --- a/vendor/phpunit/php-code-coverage/LICENSE +++ b/vendor/phpunit/php-code-coverage/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2009-2025, Sebastian Bergmann +Copyright (c) 2009-2024, Sebastian Bergmann All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/phpunit/php-code-coverage/composer.json b/vendor/phpunit/php-code-coverage/composer.json index 506425d..a9d0076 100644 --- a/vendor/phpunit/php-code-coverage/composer.json +++ b/vendor/phpunit/php-code-coverage/composer.json @@ -22,29 +22,29 @@ }, "config": { "platform": { - "php": "8.3.0" + "php": "8.2.0" }, "optimize-autoloader": true, "sort-packages": true }, - "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.3", + "php": ">=8.2", "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^5.4.0", - "phpunit/php-file-iterator": "^6.0-dev", - "phpunit/php-text-template": "^5.0-dev", - "sebastian/complexity": "^5.0-dev", - "sebastian/environment": "^8.0-dev", - "sebastian/lines-of-code": "^4.0-dev", - "sebastian/version": "^6.0-dev", + "nikic/php-parser": "^5.3.1", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-text-template": "^4.0.1", + "sebastian/code-unit-reverse-lookup": "^4.0.1", + "sebastian/complexity": "^4.0.1", + "sebastian/environment": "^7.2.0", + "sebastian/lines-of-code": "^3.0.1", + "sebastian/version": "^5.0.2", "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.5.0" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -62,7 +62,7 @@ }, "extra": { "branch-alias": { - "dev-main": "12.0.x-dev" + "dev-main": "11.0.x-dev" } } } diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage.php index 168eede..736380f 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage.php @@ -14,9 +14,11 @@ use function array_diff_key; use function array_flip; use function array_keys; use function array_merge; +use function array_merge_recursive; use function array_unique; use function count; use function explode; +use function is_array; use function is_file; use function sort; use ReflectionClass; @@ -28,33 +30,37 @@ use SebastianBergmann\CodeCoverage\Node\Directory; use SebastianBergmann\CodeCoverage\StaticAnalysis\CachingFileAnalyser; use SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser; use SebastianBergmann\CodeCoverage\StaticAnalysis\ParsingFileAnalyser; -use SebastianBergmann\CodeCoverage\Test\Target\MapBuilder; -use SebastianBergmann\CodeCoverage\Test\Target\Mapper; -use SebastianBergmann\CodeCoverage\Test\Target\TargetCollection; -use SebastianBergmann\CodeCoverage\Test\Target\TargetCollectionValidator; -use SebastianBergmann\CodeCoverage\Test\Target\ValidationResult; use SebastianBergmann\CodeCoverage\Test\TestSize\TestSize; use SebastianBergmann\CodeCoverage\Test\TestStatus\TestStatus; +use SebastianBergmann\CodeUnitReverseLookup\Wizard; /** * Provides collection functionality for PHP code coverage information. * - * @phpstan-type TestType array{size: string, status: string} - * @phpstan-type TargetedLines array> + * @phpstan-type TestType = array{ + * size: string, + * status: string, + * } */ final class CodeCoverage { - private const string UNCOVERED_FILES = 'UNCOVERED_FILES'; + private const UNCOVERED_FILES = 'UNCOVERED_FILES'; private readonly Driver $driver; private readonly Filter $filter; - private ?Mapper $targetMapper = null; + private readonly Wizard $wizard; private bool $checkForUnintentionallyCoveredCode = false; + private bool $includeUncoveredFiles = true; private bool $ignoreDeprecatedCode = false; private ?string $currentId = null; private ?TestSize $currentSize = null; private ProcessedCodeCoverageData $data; private bool $useAnnotationsForIgnoringCode = true; + /** + * @var array> + */ + private array $linesToBeIgnored = []; + /** * @var array */ @@ -73,6 +79,7 @@ final class CodeCoverage $this->driver = $driver; $this->filter = $filter; $this->data = new ProcessedCodeCoverageData; + $this->wizard = new Wizard; } /** @@ -121,7 +128,9 @@ final class CodeCoverage public function getData(bool $raw = false): ProcessedCodeCoverageData { if (!$raw) { - $this->addUncoveredFilesFromFilter(); + if ($this->includeUncoveredFiles) { + $this->addUncoveredFilesFromFilter(); + } } return $this->data; @@ -165,11 +174,19 @@ final class CodeCoverage $this->cachedReport = null; } - public function stop(bool $append = true, ?TestStatus $status = null, null|false|TargetCollection $covers = null, ?TargetCollection $uses = null): RawCodeCoverageData + /** + * @param array> $linesToBeIgnored + */ + public function stop(bool $append = true, ?TestStatus $status = null, array|false $linesToBeCovered = [], array $linesToBeUsed = [], array $linesToBeIgnored = []): RawCodeCoverageData { $data = $this->driver->stop(); - $this->append($data, null, $append, $status, $covers, $uses); + $this->linesToBeIgnored = array_merge_recursive( + $this->linesToBeIgnored, + $linesToBeIgnored, + ); + + $this->append($data, null, $append, $status, $linesToBeCovered, $linesToBeUsed, $linesToBeIgnored); $this->currentId = null; $this->currentSize = null; @@ -179,11 +196,13 @@ final class CodeCoverage } /** + * @param array> $linesToBeIgnored + * * @throws ReflectionException * @throws TestIdMissingException * @throws UnintentionallyCoveredCodeException */ - public function append(RawCodeCoverageData $rawData, ?string $id = null, bool $append = true, ?TestStatus $status = null, null|false|TargetCollection $covers = null, ?TargetCollection $uses = null): void + public function append(RawCodeCoverageData $rawData, ?string $id = null, bool $append = true, ?TestStatus $status = null, array|false $linesToBeCovered = [], array $linesToBeUsed = [], array $linesToBeIgnored = []): void { if ($id === null) { $id = $this->currentId; @@ -193,32 +212,24 @@ final class CodeCoverage throw new TestIdMissingException; } + $this->cachedReport = null; + if ($status === null) { $status = TestStatus::unknown(); } - if ($covers === null) { - $covers = TargetCollection::fromArray([]); - } - - if ($uses === null) { - $uses = TargetCollection::fromArray([]); - } - $size = $this->currentSize; if ($size === null) { $size = TestSize::unknown(); } - $this->cachedReport = null; - $this->applyFilter($rawData); $this->applyExecutableLinesFilter($rawData); if ($this->useAnnotationsForIgnoringCode) { - $this->applyIgnoredLinesFilter($rawData); + $this->applyIgnoredLinesFilter($rawData, $linesToBeIgnored); } $this->data->initializeUnseenData($rawData); @@ -231,17 +242,6 @@ final class CodeCoverage return; } - $linesToBeCovered = false; - $linesToBeUsed = []; - - if ($covers !== false) { - $linesToBeCovered = $this->targetMapper()->mapTargets($covers); - } - - if ($linesToBeCovered !== false) { - $linesToBeUsed = $this->targetMapper()->mapTargets($uses); - } - $this->applyCoversAndUsesFilter( $rawData, $linesToBeCovered, @@ -287,6 +287,22 @@ final class CodeCoverage $this->checkForUnintentionallyCoveredCode = false; } + /** + * @deprecated + */ + public function includeUncoveredFiles(): void + { + $this->includeUncoveredFiles = true; + } + + /** + * @deprecated + */ + public function excludeUncoveredFiles(): void + { + $this->includeUncoveredFiles = false; + } + public function enableAnnotationsForIgnoringCode(): void { $this->useAnnotationsForIgnoringCode = true; @@ -362,15 +378,12 @@ final class CodeCoverage return $this->driver->collectsBranchAndPathCoverage(); } - public function validate(TargetCollection $targets): ValidationResult + public function detectsDeadCode(): bool { - return (new TargetCollectionValidator)->validate($this->targetMapper(), $targets); + return $this->driver->detectsDeadCode(); } /** - * @param false|TargetedLines $linesToBeCovered - * @param TargetedLines $linesToBeUsed - * * @throws ReflectionException * @throws UnintentionallyCoveredCodeException */ @@ -397,9 +410,11 @@ final class CodeCoverage $rawData->removeCoverageDataForFile($fileWithNoCoverage); } - foreach ($linesToBeCovered as $fileToBeCovered => $includedLines) { - $rawData->keepLineCoverageDataOnlyForLines($fileToBeCovered, $includedLines); - $rawData->keepFunctionCoverageDataOnlyForLines($fileToBeCovered, $includedLines); + if (is_array($linesToBeCovered)) { + foreach ($linesToBeCovered as $fileToBeCovered => $includedLines) { + $rawData->keepLineCoverageDataOnlyForLines($fileToBeCovered, $includedLines); + $rawData->keepFunctionCoverageDataOnlyForLines($fileToBeCovered, $includedLines); + } } } @@ -437,13 +452,23 @@ final class CodeCoverage } } - private function applyIgnoredLinesFilter(RawCodeCoverageData $data): void + /** + * @param array> $linesToBeIgnored + */ + private function applyIgnoredLinesFilter(RawCodeCoverageData $data, array $linesToBeIgnored): void { foreach (array_keys($data->lineCoverage()) as $filename) { if (!$this->filter->isFile($filename)) { continue; } + if (isset($linesToBeIgnored[$filename])) { + $data->removeCoverageDataForLines( + $filename, + $linesToBeIgnored[$filename], + ); + } + $data->removeCoverageDataForLines( $filename, $this->analyser()->ignoredLinesFor($filename), @@ -469,15 +494,13 @@ final class CodeCoverage $this->analyser(), ), self::UNCOVERED_FILES, + linesToBeIgnored: $this->linesToBeIgnored, ); } } } /** - * @param TargetedLines $linesToBeCovered - * @param TargetedLines $linesToBeUsed - * * @throws ReflectionException * @throws UnintentionallyCoveredCodeException */ @@ -493,7 +516,7 @@ final class CodeCoverage foreach ($data->lineCoverage() as $file => $_data) { foreach ($_data as $line => $flag) { if ($flag === 1 && !isset($allowedLines[$file][$line])) { - $unintentionallyCoveredUnits[] = $this->targetMapper->lookup($file, $line); + $unintentionallyCoveredUnits[] = $this->wizard->lookup($file, $line); } } } @@ -507,12 +530,6 @@ final class CodeCoverage } } - /** - * @param TargetedLines $linesToBeCovered - * @param TargetedLines $linesToBeUsed - * - * @return TargetedLines - */ private function getAllowedLines(array $linesToBeCovered, array $linesToBeUsed): array { $allowedLines = []; @@ -595,19 +612,6 @@ final class CodeCoverage return $processed; } - private function targetMapper(): Mapper - { - if ($this->targetMapper !== null) { - return $this->targetMapper; - } - - $this->targetMapper = new Mapper( - (new MapBuilder)->build($this->filter, $this->analyser()), - ); - - return $this->targetMapper; - } - private function analyser(): FileAnalyser { if ($this->analyser !== null) { diff --git a/vendor/phpunit/php-code-coverage/src/Data/ProcessedCodeCoverageData.php b/vendor/phpunit/php-code-coverage/src/Data/ProcessedCodeCoverageData.php index 57ccbb1..290a8cc 100644 --- a/vendor/phpunit/php-code-coverage/src/Data/ProcessedCodeCoverageData.php +++ b/vendor/phpunit/php-code-coverage/src/Data/ProcessedCodeCoverageData.php @@ -17,31 +17,13 @@ use function count; use function is_array; use function ksort; use SebastianBergmann\CodeCoverage\Driver\Driver; -use SebastianBergmann\CodeCoverage\Driver\XdebugDriver; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage * - * @phpstan-import-type XdebugFunctionCoverageType from XdebugDriver + * @phpstan-import-type XdebugFunctionCoverageType from \SebastianBergmann\CodeCoverage\Driver\XdebugDriver * - * @phpstan-type TestIdType string - * @phpstan-type FunctionCoverageDataType array{ - * branches: array, - * out: array, - * out_hit: array, - * }>, - * paths: array, - * hit: list, - * }>, - * hit: list - * } - * @phpstan-type FunctionCoverageType array> + * @phpstan-type TestIdType = string */ final class ProcessedCodeCoverageData { @@ -58,7 +40,22 @@ final class ProcessedCodeCoverageData * Maintains base format of raw data (@see https://xdebug.org/docs/code_coverage), but each 'hit' entry is an array * of testcase ids. * - * @var FunctionCoverageType + * @var array, + * out: array, + * out_hit: array, + * }>, + * paths: array, + * hit: list, + * }>, + * hit: list + * }>> */ private array $functionCoverage = []; @@ -219,8 +216,6 @@ final class ProcessedCodeCoverageData * 4 = the line has been tested * * During a merge, a higher number is better. - * - * @return 1|2|3|4 */ private function priorityForLine(array $data, int $line): int { @@ -242,7 +237,7 @@ final class ProcessedCodeCoverageData /** * For a function we have never seen before, copy all data over and simply init the 'hit' array. * - * @param FunctionCoverageDataType|XdebugFunctionCoverageType $functionData + * @param XdebugFunctionCoverageType $functionData */ private function initPreviouslyUnseenFunction(string $file, string $functionName, array $functionData): void { @@ -262,7 +257,7 @@ final class ProcessedCodeCoverageData * Techniques such as mocking and where the contents of a file are different vary during tests (e.g. compiling * containers) mean that the functions inside a file cannot be relied upon to be static. * - * @param FunctionCoverageDataType|XdebugFunctionCoverageType $functionData + * @param XdebugFunctionCoverageType $functionData */ private function initPreviouslySeenFunction(string $file, string $functionName, array $functionData): void { diff --git a/vendor/phpunit/php-code-coverage/src/Data/RawCodeCoverageData.php b/vendor/phpunit/php-code-coverage/src/Data/RawCodeCoverageData.php index 058ec19..444f410 100644 --- a/vendor/phpunit/php-code-coverage/src/Data/RawCodeCoverageData.php +++ b/vendor/phpunit/php-code-coverage/src/Data/RawCodeCoverageData.php @@ -14,7 +14,6 @@ use function array_diff_key; use function array_flip; use function array_intersect; use function array_intersect_key; -use function array_map; use function count; use function explode; use function file_get_contents; @@ -26,15 +25,14 @@ use function str_ends_with; use function str_starts_with; use function trim; use SebastianBergmann\CodeCoverage\Driver\Driver; -use SebastianBergmann\CodeCoverage\Driver\XdebugDriver; use SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage * - * @phpstan-import-type XdebugFunctionsCoverageType from XdebugDriver - * @phpstan-import-type XdebugCodeCoverageWithoutPathCoverageType from XdebugDriver - * @phpstan-import-type XdebugCodeCoverageWithPathCoverageType from XdebugDriver + * @phpstan-import-type XdebugFunctionsCoverageType from \SebastianBergmann\CodeCoverage\Driver\XdebugDriver + * @phpstan-import-type XdebugCodeCoverageWithoutPathCoverageType from \SebastianBergmann\CodeCoverage\Driver\XdebugDriver + * @phpstan-import-type XdebugCodeCoverageWithPathCoverageType from \SebastianBergmann\CodeCoverage\Driver\XdebugDriver */ final class RawCodeCoverageData { @@ -88,10 +86,11 @@ final class RawCodeCoverageData public static function fromUncoveredFile(string $filename, FileAnalyser $analyser): self { - $lineCoverage = array_map( - static fn (): int => Driver::LINE_NOT_EXECUTED, - $analyser->executableLinesIn($filename), - ); + $lineCoverage = []; + + foreach ($analyser->executableLinesIn($filename) as $line => $branch) { + $lineCoverage[$line] = Driver::LINE_NOT_EXECUTED; + } return new self([$filename => $lineCoverage], []); } @@ -261,9 +260,6 @@ final class RawCodeCoverageData } } - /** - * @return array - */ private function getEmptyLinesForFile(string $filename): array { if (!isset(self::$emptyLineCache[$filename])) { diff --git a/vendor/phpunit/php-code-coverage/src/Driver/Driver.php b/vendor/phpunit/php-code-coverage/src/Driver/Driver.php index 454983d..cfbed9c 100644 --- a/vendor/phpunit/php-code-coverage/src/Driver/Driver.php +++ b/vendor/phpunit/php-code-coverage/src/Driver/Driver.php @@ -12,6 +12,7 @@ namespace SebastianBergmann\CodeCoverage\Driver; use function sprintf; use SebastianBergmann\CodeCoverage\BranchAndPathCoverageNotSupportedException; use SebastianBergmann\CodeCoverage\Data\RawCodeCoverageData; +use SebastianBergmann\CodeCoverage\DeadCodeDetectionNotSupportedException; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage @@ -23,36 +24,37 @@ abstract class Driver * * @see http://xdebug.org/docs/code_coverage */ - public const int LINE_NOT_EXECUTABLE = -2; + public const LINE_NOT_EXECUTABLE = -2; /** * @var int * * @see http://xdebug.org/docs/code_coverage */ - public const int LINE_NOT_EXECUTED = -1; + public const LINE_NOT_EXECUTED = -1; /** * @var int * * @see http://xdebug.org/docs/code_coverage */ - public const int LINE_EXECUTED = 1; + public const LINE_EXECUTED = 1; /** * @var int * * @see http://xdebug.org/docs/code_coverage */ - public const int BRANCH_NOT_HIT = 0; + public const BRANCH_NOT_HIT = 0; /** * @var int * * @see http://xdebug.org/docs/code_coverage */ - public const int BRANCH_HIT = 1; + public const BRANCH_HIT = 1; private bool $collectBranchAndPathCoverage = false; + private bool $detectDeadCode = false; public function canCollectBranchAndPathCoverage(): bool { @@ -86,6 +88,38 @@ abstract class Driver $this->collectBranchAndPathCoverage = false; } + public function canDetectDeadCode(): bool + { + return false; + } + + public function detectsDeadCode(): bool + { + return $this->detectDeadCode; + } + + /** + * @throws DeadCodeDetectionNotSupportedException + */ + public function enableDeadCodeDetection(): void + { + if (!$this->canDetectDeadCode()) { + throw new DeadCodeDetectionNotSupportedException( + sprintf( + '%s does not support dead code detection', + $this->nameAndVersion(), + ), + ); + } + + $this->detectDeadCode = true; + } + + public function disableDeadCodeDetection(): void + { + $this->detectDeadCode = false; + } + abstract public function nameAndVersion(): string; abstract public function start(): void; diff --git a/vendor/phpunit/php-code-coverage/src/Driver/PcovDriver.php b/vendor/phpunit/php-code-coverage/src/Driver/PcovDriver.php index 9add4a6..cdb01e6 100644 --- a/vendor/phpunit/php-code-coverage/src/Driver/PcovDriver.php +++ b/vendor/phpunit/php-code-coverage/src/Driver/PcovDriver.php @@ -38,9 +38,6 @@ final class PcovDriver extends Driver $this->filter = $filter; } - /** - * @codeCoverageIgnore - */ public function start(): void { start(); @@ -50,7 +47,6 @@ final class PcovDriver extends Driver { stop(); - // @codeCoverageIgnoreStart $filesToCollectCoverageFor = waiting(); $collected = []; @@ -65,7 +61,6 @@ final class PcovDriver extends Driver } return RawCodeCoverageData::fromXdebugWithoutPathCoverage($collected); - // @codeCoverageIgnoreEnd } public function nameAndVersion(): string diff --git a/vendor/phpunit/php-code-coverage/src/Driver/Selector.php b/vendor/phpunit/php-code-coverage/src/Driver/Selector.php index 56ffbf8..f1ff32b 100644 --- a/vendor/phpunit/php-code-coverage/src/Driver/Selector.php +++ b/vendor/phpunit/php-code-coverage/src/Driver/Selector.php @@ -21,7 +21,6 @@ final class Selector * @throws PcovNotAvailableException * @throws XdebugNotAvailableException * @throws XdebugNotEnabledException - * @throws XdebugVersionNotSupportedException */ public function forLineCoverage(Filter $filter): Driver { @@ -32,7 +31,11 @@ final class Selector } if ($runtime->hasXdebug()) { - return new XdebugDriver($filter); + $driver = new XdebugDriver($filter); + + $driver->enableDeadCodeDetection(); + + return $driver; } throw new NoCodeCoverageDriverAvailableException; @@ -42,13 +45,13 @@ final class Selector * @throws NoCodeCoverageDriverWithPathCoverageSupportAvailableException * @throws XdebugNotAvailableException * @throws XdebugNotEnabledException - * @throws XdebugVersionNotSupportedException */ public function forLineAndPathCoverage(Filter $filter): Driver { if ((new Runtime)->hasXdebug()) { $driver = new XdebugDriver($filter); + $driver->enableDeadCodeDetection(); $driver->enableBranchAndPathCoverage(); return $driver; diff --git a/vendor/phpunit/php-code-coverage/src/Driver/XdebugDriver.php b/vendor/phpunit/php-code-coverage/src/Driver/XdebugDriver.php index 039df00..b57f737 100644 --- a/vendor/phpunit/php-code-coverage/src/Driver/XdebugDriver.php +++ b/vendor/phpunit/php-code-coverage/src/Driver/XdebugDriver.php @@ -14,8 +14,11 @@ use const XDEBUG_CC_DEAD_CODE; use const XDEBUG_CC_UNUSED; use const XDEBUG_FILTER_CODE_COVERAGE; use const XDEBUG_PATH_INCLUDE; +use function explode; use function extension_loaded; +use function getenv; use function in_array; +use function ini_get; use function phpversion; use function version_compare; use function xdebug_get_code_coverage; @@ -31,8 +34,8 @@ use SebastianBergmann\CodeCoverage\Filter; * * @see https://xdebug.org/docs/code_coverage#xdebug_get_code_coverage * - * @phpstan-type XdebugLinesCoverageType array - * @phpstan-type XdebugBranchCoverageType array{ + * @phpstan-type XdebugLinesCoverageType = array + * @phpstan-type XdebugBranchCoverageType = array{ * op_start: int, * op_end: int, * line_start: int, @@ -41,32 +44,32 @@ use SebastianBergmann\CodeCoverage\Filter; * out: array, * out_hit: array, * } - * @phpstan-type XdebugPathCoverageType array{ + * @phpstan-type XdebugPathCoverageType = array{ * path: array, * hit: int, * } - * @phpstan-type XdebugFunctionCoverageType array{ + * @phpstan-type XdebugFunctionCoverageType = array{ * branches: array, * paths: array, * } - * @phpstan-type XdebugFunctionsCoverageType array - * @phpstan-type XdebugPathAndBranchesCoverageType array{ + * @phpstan-type XdebugFunctionsCoverageType = array + * @phpstan-type XdebugPathAndBranchesCoverageType = array{ * lines: XdebugLinesCoverageType, * functions: XdebugFunctionsCoverageType, * } - * @phpstan-type XdebugCodeCoverageWithoutPathCoverageType array - * @phpstan-type XdebugCodeCoverageWithPathCoverageType array + * @phpstan-type XdebugCodeCoverageWithoutPathCoverageType = array + * @phpstan-type XdebugCodeCoverageWithPathCoverageType = array */ final class XdebugDriver extends Driver { /** * @throws XdebugNotAvailableException * @throws XdebugNotEnabledException - * @throws XdebugVersionNotSupportedException */ public function __construct(Filter $filter) { $this->ensureXdebugIsAvailable(); + $this->ensureXdebugCodeCoverageFeatureIsEnabled(); if (!$filter->isEmpty()) { xdebug_set_filter( @@ -82,9 +85,18 @@ final class XdebugDriver extends Driver return true; } + public function canDetectDeadCode(): bool + { + return true; + } + public function start(): void { - $flags = XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE; + $flags = XDEBUG_CC_UNUSED; + + if ($this->detectsDeadCode() || $this->collectsBranchAndPathCoverage()) { + $flags |= XDEBUG_CC_DEAD_CODE; + } if ($this->collectsBranchAndPathCoverage()) { $flags |= XDEBUG_CC_BRANCH_CHECK; @@ -115,20 +127,35 @@ final class XdebugDriver extends Driver /** * @throws XdebugNotAvailableException - * @throws XdebugNotEnabledException - * @throws XdebugVersionNotSupportedException */ private function ensureXdebugIsAvailable(): void { if (!extension_loaded('xdebug')) { throw new XdebugNotAvailableException; } + } - if (!version_compare(phpversion('xdebug'), '3.1', '>=')) { - throw new XdebugVersionNotSupportedException(phpversion('xdebug')); + /** + * @throws XdebugNotEnabledException + */ + private function ensureXdebugCodeCoverageFeatureIsEnabled(): void + { + if (version_compare(phpversion('xdebug'), '3.1', '>=')) { + if (!in_array('coverage', xdebug_info('mode'), true)) { + throw new XdebugNotEnabledException; + } + + return; } - if (!in_array('coverage', xdebug_info('mode'), true)) { + $mode = getenv('XDEBUG_MODE'); + + if ($mode === false || $mode === '') { + $mode = ini_get('xdebug.mode'); + } + + if ($mode === false || + !in_array('coverage', explode(',', $mode), true)) { throw new XdebugNotEnabledException; } } diff --git a/vendor/phpunit/php-code-coverage/src/Exception/DeadCodeDetectionNotSupportedException.php b/vendor/phpunit/php-code-coverage/src/Exception/DeadCodeDetectionNotSupportedException.php new file mode 100644 index 0000000..d360064 --- /dev/null +++ b/vendor/phpunit/php-code-coverage/src/Exception/DeadCodeDetectionNotSupportedException.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace SebastianBergmann\CodeCoverage; + +use RuntimeException; + +final class DeadCodeDetectionNotSupportedException extends RuntimeException implements Exception +{ +} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/InvalidCodeCoverageTargetException.php b/vendor/phpunit/php-code-coverage/src/Exception/InvalidCodeCoverageTargetException.php deleted file mode 100644 index 0913958..0000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/InvalidCodeCoverageTargetException.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -use function sprintf; -use RuntimeException; -use SebastianBergmann\CodeCoverage\Exception; - -final class InvalidCodeCoverageTargetException extends RuntimeException implements Exception -{ - public function __construct(Target $target) - { - parent::__construct( - sprintf( - '%s is not a valid target for code coverage', - $target->description(), - ), - ); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Exception/XdebugVersionNotSupportedException.php b/vendor/phpunit/php-code-coverage/src/Exception/XdebugVersionNotSupportedException.php deleted file mode 100644 index c785af1..0000000 --- a/vendor/phpunit/php-code-coverage/src/Exception/XdebugVersionNotSupportedException.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Driver; - -use function sprintf; -use RuntimeException; -use SebastianBergmann\CodeCoverage\Exception; - -final class XdebugVersionNotSupportedException extends RuntimeException implements Exception -{ - /** - * @param non-empty-string $version - */ - public function __construct(string $version) - { - parent::__construct( - sprintf( - 'Version %s of the Xdebug extension is not supported', - $version, - ), - ); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Node/AbstractNode.php b/vendor/phpunit/php-code-coverage/src/Node/AbstractNode.php index 2cee547..000d03d 100644 --- a/vendor/phpunit/php-code-coverage/src/Node/AbstractNode.php +++ b/vendor/phpunit/php-code-coverage/src/Node/AbstractNode.php @@ -15,24 +15,20 @@ use function str_ends_with; use function str_replace; use function substr; use Countable; -use SebastianBergmann\CodeCoverage\StaticAnalysis\LinesOfCode; use SebastianBergmann\CodeCoverage\Util\Percentage; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage * - * @phpstan-import-type ProcessedFunctionType from File - * @phpstan-import-type ProcessedClassType from File - * @phpstan-import-type ProcessedTraitType from File + * @phpstan-import-type LinesOfCodeType from \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser + * @phpstan-import-type ProcessedFunctionType from \SebastianBergmann\CodeCoverage\Node\File + * @phpstan-import-type ProcessedClassType from \SebastianBergmann\CodeCoverage\Node\File + * @phpstan-import-type ProcessedTraitType from \SebastianBergmann\CodeCoverage\Node\File */ abstract class AbstractNode implements Countable { private readonly string $name; private string $pathAsString; - - /** - * @var non-empty-list - */ private array $pathAsArray; private readonly ?AbstractNode $parent; private string $id; @@ -65,9 +61,6 @@ abstract class AbstractNode implements Countable return $this->pathAsString; } - /** - * @return non-empty-list - */ public function pathAsArray(): array { return $this->pathAsArray; @@ -193,7 +186,10 @@ abstract class AbstractNode implements Countable */ abstract public function functions(): array; - abstract public function linesOfCode(): LinesOfCode; + /** + * @return LinesOfCodeType + */ + abstract public function linesOfCode(): array; abstract public function numberOfExecutableLines(): int; diff --git a/vendor/phpunit/php-code-coverage/src/Node/Builder.php b/vendor/phpunit/php-code-coverage/src/Node/Builder.php index 0fb1250..4dcc7b5 100644 --- a/vendor/phpunit/php-code-coverage/src/Node/Builder.php +++ b/vendor/phpunit/php-code-coverage/src/Node/Builder.php @@ -28,11 +28,11 @@ use SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage * - * @phpstan-import-type TestType from CodeCoverage + * @phpstan-import-type TestType from \SebastianBergmann\CodeCoverage\CodeCoverage */ -final readonly class Builder +final class Builder { - private FileAnalyser $analyser; + private readonly FileAnalyser $analyser; public function __construct(FileAnalyser $analyser) { @@ -223,7 +223,6 @@ final readonly class Builder $paths[$i] = substr($paths[$i], 7); $paths[$i] = str_replace('/', DIRECTORY_SEPARATOR, $paths[$i]); } - $paths[$i] = explode(DIRECTORY_SEPARATOR, $paths[$i]); if (empty($paths[$i][0])) { diff --git a/vendor/phpunit/php-code-coverage/src/Node/CrapIndex.php b/vendor/phpunit/php-code-coverage/src/Node/CrapIndex.php index a07a550..7173276 100644 --- a/vendor/phpunit/php-code-coverage/src/Node/CrapIndex.php +++ b/vendor/phpunit/php-code-coverage/src/Node/CrapIndex.php @@ -14,10 +14,10 @@ use function sprintf; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final readonly class CrapIndex +final class CrapIndex { - private int $cyclomaticComplexity; - private float $codeCoverage; + private readonly int $cyclomaticComplexity; + private readonly float $codeCoverage; public function __construct(int $cyclomaticComplexity, float $codeCoverage) { diff --git a/vendor/phpunit/php-code-coverage/src/Node/Directory.php b/vendor/phpunit/php-code-coverage/src/Node/Directory.php index 2802f93..335acd0 100644 --- a/vendor/phpunit/php-code-coverage/src/Node/Directory.php +++ b/vendor/phpunit/php-code-coverage/src/Node/Directory.php @@ -14,16 +14,11 @@ use function assert; use function count; use IteratorAggregate; use RecursiveIteratorIterator; -use SebastianBergmann\CodeCoverage\StaticAnalysis\LinesOfCode; /** - * @template-implements IteratorAggregate - * - * @phpstan-import-type ProcessedFunctionType from File - * @phpstan-import-type ProcessedClassType from File - * @phpstan-import-type ProcessedTraitType from File - * * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + * + * @phpstan-import-type LinesOfCodeType from \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser */ final class Directory extends AbstractNode implements IteratorAggregate { @@ -40,23 +35,15 @@ final class Directory extends AbstractNode implements IteratorAggregate /** * @var list */ - private array $files = []; + private array $files = []; + private ?array $classes = null; + private ?array $traits = null; + private ?array $functions = null; /** - * @var ?array + * @var null|LinesOfCodeType */ - private ?array $classes = null; - - /** - * @var ?array - */ - private ?array $traits = null; - - /** - * @var ?array - */ - private ?array $functions = null; - private ?LinesOfCode $linesOfCode = null; + private ?array $linesOfCode = null; private int $numFiles = -1; private int $numExecutableLines = -1; private int $numExecutedLines = -1; @@ -86,9 +73,6 @@ final class Directory extends AbstractNode implements IteratorAggregate return $this->numFiles; } - /** - * @return RecursiveIteratorIterator> - */ public function getIterator(): RecursiveIteratorIterator { return new RecursiveIteratorIterator( @@ -118,33 +102,21 @@ final class Directory extends AbstractNode implements IteratorAggregate $this->numExecutedLines = -1; } - /** - * @return list - */ public function directories(): array { return $this->directories; } - /** - * @return list - */ public function files(): array { return $this->files; } - /** - * @return list - */ public function children(): array { return $this->children; } - /** - * @return array - */ public function classes(): array { if ($this->classes === null) { @@ -161,9 +133,6 @@ final class Directory extends AbstractNode implements IteratorAggregate return $this->classes; } - /** - * @return array - */ public function traits(): array { if ($this->traits === null) { @@ -180,9 +149,6 @@ final class Directory extends AbstractNode implements IteratorAggregate return $this->traits; } - /** - * @return array - */ public function functions(): array { if ($this->functions === null) { @@ -199,22 +165,25 @@ final class Directory extends AbstractNode implements IteratorAggregate return $this->functions; } - public function linesOfCode(): LinesOfCode + /** + * @return LinesOfCodeType + */ + public function linesOfCode(): array { if ($this->linesOfCode === null) { - $linesOfCode = 0; - $commentLinesOfCode = 0; - $nonCommentLinesOfCode = 0; + $this->linesOfCode = [ + 'linesOfCode' => 0, + 'commentLinesOfCode' => 0, + 'nonCommentLinesOfCode' => 0, + ]; foreach ($this->children as $child) { $childLinesOfCode = $child->linesOfCode(); - $linesOfCode += $childLinesOfCode->linesOfCode(); - $commentLinesOfCode += $childLinesOfCode->commentLinesOfCode(); - $nonCommentLinesOfCode += $childLinesOfCode->nonCommentLinesOfCode(); + $this->linesOfCode['linesOfCode'] += $childLinesOfCode['linesOfCode']; + $this->linesOfCode['commentLinesOfCode'] += $childLinesOfCode['commentLinesOfCode']; + $this->linesOfCode['nonCommentLinesOfCode'] += $childLinesOfCode['nonCommentLinesOfCode']; } - - $this->linesOfCode = new LinesOfCode($linesOfCode, $commentLinesOfCode, $nonCommentLinesOfCode); } return $this->linesOfCode; diff --git a/vendor/phpunit/php-code-coverage/src/Node/File.php b/vendor/phpunit/php-code-coverage/src/Node/File.php index df45d53..ec81b23 100644 --- a/vendor/phpunit/php-code-coverage/src/Node/File.php +++ b/vendor/phpunit/php-code-coverage/src/Node/File.php @@ -12,21 +12,18 @@ namespace SebastianBergmann\CodeCoverage\Node; use function array_filter; use function count; use function range; -use SebastianBergmann\CodeCoverage\CodeCoverage; -use SebastianBergmann\CodeCoverage\StaticAnalysis\Class_; -use SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser; -use SebastianBergmann\CodeCoverage\StaticAnalysis\Function_; -use SebastianBergmann\CodeCoverage\StaticAnalysis\LinesOfCode; -use SebastianBergmann\CodeCoverage\StaticAnalysis\Method; -use SebastianBergmann\CodeCoverage\StaticAnalysis\Trait_; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage * - * @phpstan-import-type TestType from CodeCoverage - * @phpstan-import-type LinesType from FileAnalyser + * @phpstan-import-type CodeUnitFunctionType from \SebastianBergmann\CodeCoverage\StaticAnalysis\CodeUnitFindingVisitor + * @phpstan-import-type CodeUnitMethodType from \SebastianBergmann\CodeCoverage\StaticAnalysis\CodeUnitFindingVisitor + * @phpstan-import-type CodeUnitClassType from \SebastianBergmann\CodeCoverage\StaticAnalysis\CodeUnitFindingVisitor + * @phpstan-import-type CodeUnitTraitType from \SebastianBergmann\CodeCoverage\StaticAnalysis\CodeUnitFindingVisitor + * @phpstan-import-type LinesOfCodeType from \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser + * @phpstan-import-type LinesType from \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser * - * @phpstan-type ProcessedFunctionType array{ + * @phpstan-type ProcessedFunctionType = array{ * functionName: string, * namespace: string, * signature: string, @@ -43,7 +40,7 @@ use SebastianBergmann\CodeCoverage\StaticAnalysis\Trait_; * crap: int|string, * link: string * } - * @phpstan-type ProcessedMethodType array{ + * @phpstan-type ProcessedMethodType = array{ * methodName: string, * visibility: string, * signature: string, @@ -60,7 +57,7 @@ use SebastianBergmann\CodeCoverage\StaticAnalysis\Trait_; * crap: int|string, * link: string * } - * @phpstan-type ProcessedClassType array{ + * @phpstan-type ProcessedClassType = array{ * className: string, * namespace: string, * methods: array, @@ -76,7 +73,7 @@ use SebastianBergmann\CodeCoverage\StaticAnalysis\Trait_; * crap: int|string, * link: string * } - * @phpstan-type ProcessedTraitType array{ + * @phpstan-type ProcessedTraitType = array{ * traitName: string, * namespace: string, * methods: array, @@ -100,10 +97,6 @@ final class File extends AbstractNode */ private array $lineCoverageData; private array $functionCoverageData; - - /** - * @var array - */ private readonly array $testData; private int $numExecutableLines = 0; private int $numExecutedLines = 0; @@ -126,7 +119,11 @@ final class File extends AbstractNode * @var array */ private array $functions = []; - private readonly LinesOfCode $linesOfCode; + + /** + * @var LinesOfCodeType + */ + private readonly array $linesOfCode; private ?int $numClasses = null; private int $numTestedClasses = 0; private ?int $numTraits = null; @@ -136,18 +133,18 @@ final class File extends AbstractNode private ?int $numTestedFunctions = null; /** - * @var array + * @var array */ private array $codeUnitsByLine = []; /** * @param array> $lineCoverageData - * @param array $testData - * @param array $classes - * @param array $traits - * @param array $functions + * @param array $classes + * @param array $traits + * @param array $functions + * @param LinesOfCodeType $linesOfCode */ - public function __construct(string $name, AbstractNode $parent, array $lineCoverageData, array $functionCoverageData, array $testData, array $classes, array $traits, array $functions, LinesOfCode $linesOfCode) + public function __construct(string $name, AbstractNode $parent, array $lineCoverageData, array $functionCoverageData, array $testData, array $classes, array $traits, array $functions, array $linesOfCode) { parent::__construct($name, $parent); @@ -177,9 +174,6 @@ final class File extends AbstractNode return $this->functionCoverageData; } - /** - * @return array - */ public function testData(): array { return $this->testData; @@ -209,7 +203,7 @@ final class File extends AbstractNode return $this->functions; } - public function linesOfCode(): LinesOfCode + public function linesOfCode(): array { return $this->linesOfCode; } @@ -366,13 +360,13 @@ final class File extends AbstractNode } /** - * @param array $classes - * @param array $traits - * @param array $functions + * @param array $classes + * @param array $traits + * @param array $functions */ private function calculateStatistics(array $classes, array $traits, array $functions): void { - foreach (range(1, $this->linesOfCode->linesOfCode()) as $lineNumber) { + foreach (range(1, $this->linesOfCode['linesOfCode']) as $lineNumber) { $this->codeUnitsByLine[$lineNumber] = []; } @@ -380,7 +374,7 @@ final class File extends AbstractNode $this->processTraits($traits); $this->processFunctions($functions); - foreach (range(1, $this->linesOfCode->linesOfCode()) as $lineNumber) { + foreach (range(1, $this->linesOfCode['linesOfCode']) as $lineNumber) { if (isset($this->lineCoverageData[$lineNumber])) { foreach ($this->codeUnitsByLine[$lineNumber] as &$codeUnit) { $codeUnit['executableLines']++; @@ -473,7 +467,7 @@ final class File extends AbstractNode } /** - * @param array $classes + * @param array $classes */ private function processClasses(array $classes): void { @@ -482,9 +476,9 @@ final class File extends AbstractNode foreach ($classes as $className => $class) { $this->classes[$className] = [ 'className' => $className, - 'namespace' => $class->namespace(), + 'namespace' => $class['namespace'], 'methods' => [], - 'startLine' => $class->startLine(), + 'startLine' => $class['startLine'], 'executableLines' => 0, 'executedLines' => 0, 'executableBranches' => 0, @@ -494,11 +488,11 @@ final class File extends AbstractNode 'ccn' => 0, 'coverage' => 0, 'crap' => 0, - 'link' => $link . $class->startLine(), + 'link' => $link . $class['startLine'], ]; - foreach ($class->methods() as $methodName => $method) { - $methodData = $this->newMethod($className, $method, $link); + foreach ($class['methods'] as $methodName => $method) { + $methodData = $this->newMethod($className, $methodName, $method, $link); $this->classes[$className]['methods'][$methodName] = $methodData; $this->classes[$className]['executableBranches'] += $methodData['executableBranches']; @@ -511,7 +505,7 @@ final class File extends AbstractNode $this->numExecutablePaths += $methodData['executablePaths']; $this->numExecutedPaths += $methodData['executedPaths']; - foreach (range($method->startLine(), $method->endLine()) as $lineNumber) { + foreach (range($method['startLine'], $method['endLine']) as $lineNumber) { $this->codeUnitsByLine[$lineNumber] = [ &$this->classes[$className], &$this->classes[$className]['methods'][$methodName], @@ -522,7 +516,7 @@ final class File extends AbstractNode } /** - * @param array $traits + * @param array $traits */ private function processTraits(array $traits): void { @@ -531,9 +525,9 @@ final class File extends AbstractNode foreach ($traits as $traitName => $trait) { $this->traits[$traitName] = [ 'traitName' => $traitName, - 'namespace' => $trait->namespace(), + 'namespace' => $trait['namespace'], 'methods' => [], - 'startLine' => $trait->startLine(), + 'startLine' => $trait['startLine'], 'executableLines' => 0, 'executedLines' => 0, 'executableBranches' => 0, @@ -543,11 +537,11 @@ final class File extends AbstractNode 'ccn' => 0, 'coverage' => 0, 'crap' => 0, - 'link' => $link . $trait->startLine(), + 'link' => $link . $trait['startLine'], ]; - foreach ($trait->methods() as $methodName => $method) { - $methodData = $this->newMethod($traitName, $method, $link); + foreach ($trait['methods'] as $methodName => $method) { + $methodData = $this->newMethod($traitName, $methodName, $method, $link); $this->traits[$traitName]['methods'][$methodName] = $methodData; $this->traits[$traitName]['executableBranches'] += $methodData['executableBranches']; @@ -560,7 +554,7 @@ final class File extends AbstractNode $this->numExecutablePaths += $methodData['executablePaths']; $this->numExecutedPaths += $methodData['executedPaths']; - foreach (range($method->startLine(), $method->endLine()) as $lineNumber) { + foreach (range($method['startLine'], $method['endLine']) as $lineNumber) { $this->codeUnitsByLine[$lineNumber] = [ &$this->traits[$traitName], &$this->traits[$traitName]['methods'][$methodName], @@ -571,7 +565,7 @@ final class File extends AbstractNode } /** - * @param array $functions + * @param array $functions */ private function processFunctions(array $functions): void { @@ -580,23 +574,23 @@ final class File extends AbstractNode foreach ($functions as $functionName => $function) { $this->functions[$functionName] = [ 'functionName' => $functionName, - 'namespace' => $function->namespace(), - 'signature' => $function->signature(), - 'startLine' => $function->startLine(), - 'endLine' => $function->endLine(), + 'namespace' => $function['namespace'], + 'signature' => $function['signature'], + 'startLine' => $function['startLine'], + 'endLine' => $function['endLine'], 'executableLines' => 0, 'executedLines' => 0, 'executableBranches' => 0, 'executedBranches' => 0, 'executablePaths' => 0, 'executedPaths' => 0, - 'ccn' => $function->cyclomaticComplexity(), + 'ccn' => $function['ccn'], 'coverage' => 0, 'crap' => 0, - 'link' => $link . $function->startLine(), + 'link' => $link . $function['startLine'], ]; - foreach (range($function->startLine(), $function->endLine()) as $lineNumber) { + foreach (range($function['startLine'], $function['endLine']) as $lineNumber) { $this->codeUnitsByLine[$lineNumber] = [&$this->functions[$functionName]]; } @@ -640,29 +634,31 @@ final class File extends AbstractNode } /** + * @param CodeUnitMethodType $method + * * @return ProcessedMethodType */ - private function newMethod(string $className, Method $method, string $link): array + private function newMethod(string $className, string $methodName, array $method, string $link): array { $methodData = [ - 'methodName' => $method->name(), - 'visibility' => $method->visibility()->value, - 'signature' => $method->signature(), - 'startLine' => $method->startLine(), - 'endLine' => $method->endLine(), + 'methodName' => $methodName, + 'visibility' => $method['visibility'], + 'signature' => $method['signature'], + 'startLine' => $method['startLine'], + 'endLine' => $method['endLine'], 'executableLines' => 0, 'executedLines' => 0, 'executableBranches' => 0, 'executedBranches' => 0, 'executablePaths' => 0, 'executedPaths' => 0, - 'ccn' => $method->cyclomaticComplexity(), + 'ccn' => $method['ccn'], 'coverage' => 0, 'crap' => 0, - 'link' => $link . $method->startLine(), + 'link' => $link . $method['startLine'], ]; - $key = $className . '->' . $method->name(); + $key = $className . '->' . $methodName; if (isset($this->functionCoverageData[$key]['branches'])) { $methodData['executableBranches'] = count( diff --git a/vendor/phpunit/php-code-coverage/src/Node/Iterator.php b/vendor/phpunit/php-code-coverage/src/Node/Iterator.php index ab3c8eb..b110d46 100644 --- a/vendor/phpunit/php-code-coverage/src/Node/Iterator.php +++ b/vendor/phpunit/php-code-coverage/src/Node/Iterator.php @@ -9,13 +9,10 @@ */ namespace SebastianBergmann\CodeCoverage\Node; -use function assert; use function count; use RecursiveIterator; /** - * @template-implements RecursiveIterator - * * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ final class Iterator implements RecursiveIterator @@ -32,38 +29,57 @@ final class Iterator implements RecursiveIterator $this->nodes = $node->children(); } + /** + * Rewinds the Iterator to the first element. + */ public function rewind(): void { $this->position = 0; } + /** + * Checks if there is a current element after calls to rewind() or next(). + */ public function valid(): bool { return $this->position < count($this->nodes); } + /** + * Returns the key of the current element. + */ public function key(): int { return $this->position; } + /** + * Returns the current element. + */ public function current(): ?AbstractNode { return $this->valid() ? $this->nodes[$this->position] : null; } + /** + * Moves forward to next element. + */ public function next(): void { $this->position++; } + /** + * Returns the sub iterator for the current element. + */ public function getChildren(): self { - assert($this->nodes[$this->position] instanceof Directory); - return new self($this->nodes[$this->position]); } + /** + * Checks whether the current element has children. + */ public function hasChildren(): bool { return $this->nodes[$this->position] instanceof Directory; diff --git a/vendor/phpunit/php-code-coverage/src/Report/Clover.php b/vendor/phpunit/php-code-coverage/src/Report/Clover.php index 9d3836f..4a0bd40 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Clover.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Clover.php @@ -168,8 +168,8 @@ final class Clover $linesOfCode = $item->linesOfCode(); $xmlMetrics = $xmlDocument->createElement('metrics'); - $xmlMetrics->setAttribute('loc', (string) $linesOfCode->linesOfCode()); - $xmlMetrics->setAttribute('ncloc', (string) $linesOfCode->nonCommentLinesOfCode()); + $xmlMetrics->setAttribute('loc', (string) $linesOfCode['linesOfCode']); + $xmlMetrics->setAttribute('ncloc', (string) $linesOfCode['nonCommentLinesOfCode']); $xmlMetrics->setAttribute('classes', (string) $item->numberOfClassesAndTraits()); $xmlMetrics->setAttribute('methods', (string) $item->numberOfMethods()); $xmlMetrics->setAttribute('coveredmethods', (string) $item->numberOfTestedMethods()); @@ -201,8 +201,8 @@ final class Clover $xmlMetrics = $xmlDocument->createElement('metrics'); $xmlMetrics->setAttribute('files', (string) count($report)); - $xmlMetrics->setAttribute('loc', (string) $linesOfCode->linesOfCode()); - $xmlMetrics->setAttribute('ncloc', (string) $linesOfCode->nonCommentLinesOfCode()); + $xmlMetrics->setAttribute('loc', (string) $linesOfCode['linesOfCode']); + $xmlMetrics->setAttribute('ncloc', (string) $linesOfCode['nonCommentLinesOfCode']); $xmlMetrics->setAttribute('classes', (string) $report->numberOfClassesAndTraits()); $xmlMetrics->setAttribute('methods', (string) $report->numberOfMethods()); $xmlMetrics->setAttribute('coveredmethods', (string) $report->numberOfTestedMethods()); diff --git a/vendor/phpunit/php-code-coverage/src/Report/Cobertura.php b/vendor/phpunit/php-code-coverage/src/Report/Cobertura.php index b421888..215fc0c 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Cobertura.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Cobertura.php @@ -153,7 +153,7 @@ final class Cobertura $linesValid = $method['executableLines']; $linesCovered = $method['executedLines']; - $lineRate = $linesCovered / $linesValid; + $lineRate = $linesValid === 0 ? 0 : ($linesCovered / $linesValid); $branchesValid = $method['executableBranches']; $branchesCovered = $method['executedBranches']; @@ -228,7 +228,7 @@ final class Cobertura $linesValid = $function['executableLines']; $linesCovered = $function['executedLines']; - $lineRate = $linesCovered / $linesValid; + $lineRate = $linesValid === 0 ? 0 : ($linesCovered / $linesValid); $functionsLinesValid += $linesValid; $functionsLinesCovered += $linesCovered; diff --git a/vendor/phpunit/php-code-coverage/src/Report/Crap4j.php b/vendor/phpunit/php-code-coverage/src/Report/Crap4j.php index 714fe76..cb1bde6 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Crap4j.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Crap4j.php @@ -22,9 +22,9 @@ use SebastianBergmann\CodeCoverage\Driver\WriteOperationFailedException; use SebastianBergmann\CodeCoverage\Node\File; use SebastianBergmann\CodeCoverage\Util\Filesystem; -final readonly class Crap4j +final class Crap4j { - private int $threshold; + private readonly int $threshold; public function __construct(int $threshold = 30) { diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Colors.php b/vendor/phpunit/php-code-coverage/src/Report/Html/Colors.php index c79bf9e..c57aaf8 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Colors.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Colors.php @@ -12,13 +12,13 @@ namespace SebastianBergmann\CodeCoverage\Report\Html; /** * @immutable */ -final readonly class Colors +final class Colors { - private string $successLow; - private string $successMedium; - private string $successHigh; - private string $warning; - private string $danger; + private readonly string $successLow; + private readonly string $successMedium; + private readonly string $successHigh; + private readonly string $warning; + private readonly string $danger; public static function default(): self { diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/CustomCssFile.php b/vendor/phpunit/php-code-coverage/src/Report/Html/CustomCssFile.php index 5c272a0..5f747c9 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/CustomCssFile.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/CustomCssFile.php @@ -15,9 +15,9 @@ use SebastianBergmann\CodeCoverage\InvalidArgumentException; /** * @immutable */ -final readonly class CustomCssFile +final class CustomCssFile { - private string $path; + private readonly string $path; public static function default(): self { diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Facade.php b/vendor/phpunit/php-code-coverage/src/Report/Html/Facade.php index dd2a469..a3d9556 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Facade.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Facade.php @@ -22,13 +22,13 @@ use SebastianBergmann\CodeCoverage\Util\Filesystem; use SebastianBergmann\Template\Exception; use SebastianBergmann\Template\Template; -final readonly class Facade +final class Facade { - private string $templatePath; - private string $generator; - private Colors $colors; - private Thresholds $thresholds; - private CustomCssFile $customCssFile; + private readonly string $templatePath; + private readonly string $generator; + private readonly Colors $colors; + private readonly Thresholds $thresholds; + private readonly CustomCssFile $customCssFile; public function __construct(string $generator = '', ?Colors $colors = null, ?Thresholds $thresholds = null, ?CustomCssFile $customCssFile = null) { diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer.php b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer.php index 49a03e5..6ce7b8f 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer.php @@ -44,9 +44,6 @@ abstract class Renderer $this->hasBranchCoverage = $hasBranchCoverage; } - /** - * @param array $data - */ protected function renderItemTemplate(Template $template, array $data): string { $numSeparator = ' / '; @@ -174,8 +171,8 @@ abstract class Renderer 'version' => $this->version, 'runtime' => $this->runtimeString(), 'generator' => $this->generator, - 'low_upper_bound' => (string) $this->thresholds->lowUpperBound(), - 'high_lower_bound' => (string) $this->thresholds->highLowerBound(), + 'low_upper_bound' => $this->thresholds->lowUpperBound(), + 'high_lower_bound' => $this->thresholds->highLowerBound(), ], ); } diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php index 9d51d22..cf21cf9 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php @@ -12,7 +12,6 @@ namespace SebastianBergmann\CodeCoverage\Report\Html; use function array_values; use function arsort; use function asort; -use function assert; use function count; use function explode; use function floor; @@ -22,14 +21,10 @@ use function str_replace; use SebastianBergmann\CodeCoverage\FileCouldNotBeWrittenException; use SebastianBergmann\CodeCoverage\Node\AbstractNode; use SebastianBergmann\CodeCoverage\Node\Directory as DirectoryNode; -use SebastianBergmann\CodeCoverage\Node\File as FileNode; use SebastianBergmann\Template\Exception; use SebastianBergmann\Template\Template; /** - * @phpstan-import-type ProcessedClassType from FileNode - * @phpstan-import-type ProcessedTraitType from FileNode - * * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ final class Dashboard extends Renderer @@ -86,9 +81,7 @@ final class Dashboard extends Renderer } /** - * @param array $classes - * - * @return array{class: non-empty-string, method: non-empty-string} + * Returns the data for the Class/Method Complexity charts. */ private function complexity(array $classes, string $baseLink): array { @@ -122,21 +115,14 @@ final class Dashboard extends Renderer ]; } - $class = json_encode($result['class']); - - assert($class !== false); - - $method = json_encode($result['method']); - - assert($method !== false); - - return ['class' => $class, 'method' => $method]; + return [ + 'class' => json_encode($result['class']), + 'method' => json_encode($result['method']), + ]; } /** - * @param array $classes - * - * @return array{class: non-empty-string, method: non-empty-string} + * Returns the data for the Class / Method Coverage Distribution chart. */ private function coverageDistribution(array $classes): array { @@ -195,21 +181,14 @@ final class Dashboard extends Renderer } } - $class = json_encode(array_values($result['class'])); - - assert($class !== false); - - $method = json_encode(array_values($result['method'])); - - assert($method !== false); - - return ['class' => $class, 'method' => $method]; + return [ + 'class' => json_encode(array_values($result['class'])), + 'method' => json_encode(array_values($result['method'])), + ]; } /** - * @param array $classes - * - * @return array{class: string, method: string} + * Returns the classes / methods with insufficient coverage. */ private function insufficientCoverage(array $classes, string $baseLink): array { @@ -263,9 +242,7 @@ final class Dashboard extends Renderer } /** - * @param array $classes - * - * @return array{class: string, method: string} + * Returns the project risks according to the CRAP index. */ private function projectRisks(array $classes, string $baseLink): array { diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php index bbf5195..aeef2b3 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php @@ -108,11 +108,6 @@ use SebastianBergmann\Template\Exception; use SebastianBergmann\Template\Template; /** - * @phpstan-import-type ProcessedClassType from FileNode - * @phpstan-import-type ProcessedTraitType from FileNode - * @phpstan-import-type ProcessedMethodType from FileNode - * @phpstan-import-type ProcessedFunctionType from FileNode - * * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ final class File extends Renderer @@ -120,7 +115,7 @@ final class File extends Renderer /** * @var array */ - private const array KEYWORD_TOKENS = [ + private const KEYWORD_TOKENS = [ T_ABSTRACT => true, T_ARRAY => true, T_AS => true, @@ -190,13 +185,8 @@ final class File extends Renderer T_YIELD => true, T_YIELD_FROM => true, ]; - - private const int HTML_SPECIAL_CHARS_FLAGS = ENT_COMPAT | ENT_HTML401 | ENT_SUBSTITUTE; - - /** - * @var array> - */ private static array $formattedSourceCache = []; + private int $htmlSpecialCharsFlags = ENT_COMPAT | ENT_HTML401 | ENT_SUBSTITUTE; public function render(FileNode $node, string $file): void { @@ -324,9 +314,6 @@ final class File extends Renderer return $items; } - /** - * @param array $items - */ private function renderTraitOrClassItems(array $items, Template $template, Template $methodItemTemplate): string { $buffer = ''; @@ -431,9 +418,6 @@ final class File extends Renderer return $buffer; } - /** - * @param array $functions - */ private function renderFunctionItems(array $functions, Template $template): string { if (empty($functions)) { @@ -452,9 +436,6 @@ final class File extends Renderer return $buffer; } - /** - * @param ProcessedFunctionType|ProcessedMethodType $item - */ private function renderFunctionOrMethodItem(Template $template, array $item, string $indent = ''): string { $numMethods = 0; @@ -495,7 +476,7 @@ final class File extends Renderer '%s%s', $indent, $item['startLine'], - htmlspecialchars($item['signature'], self::HTML_SPECIAL_CHARS_FLAGS), + htmlspecialchars($item['signature'], $this->htmlSpecialCharsFlags), $item['functionName'] ?? $item['methodName'], ), 'numMethods' => $numMethods, @@ -573,7 +554,7 @@ final class File extends Renderer $popover = sprintf( ' data-bs-title="%s" data-bs-content="%s" data-bs-placement="top" data-bs-html="true"', $popoverTitle, - htmlspecialchars($popoverContent, self::HTML_SPECIAL_CHARS_FLAGS), + htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags), ); } @@ -660,7 +641,7 @@ final class File extends Renderer $popover = sprintf( ' data-bs-title="%s" data-bs-content="%s" data-bs-placement="top" data-bs-html="true"', $popoverTitle, - htmlspecialchars($popoverContent, self::HTML_SPECIAL_CHARS_FLAGS), + htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags), ); } @@ -750,7 +731,7 @@ final class File extends Renderer $popover = sprintf( ' data-bs-title="%s" data-bs-content="%s" data-bs-placement="top" data-bs-html="true"', $popoverTitle, - htmlspecialchars($popoverContent, self::HTML_SPECIAL_CHARS_FLAGS), + htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags), ); } @@ -787,7 +768,7 @@ final class File extends Renderer } if ($branchStructure !== '') { // don't show empty branches - $branches .= '
' . $this->abbreviateMethodName($methodName) . '
' . "\n"; + $branches .= '
' . $this->abbreviateMethodName($methodName) . '
' . "\n"; $branches .= $branchStructure; } } @@ -797,9 +778,6 @@ final class File extends Renderer return $branchesTemplate->render(); } - /** - * @param list $codeLines - */ private function renderBranchLines(array $branch, array $codeLines, array $testData): string { $linesTemplate = new Template($this->templatePath . 'lines.html.dist', '{{', '}}'); @@ -851,7 +829,7 @@ final class File extends Renderer $popover = sprintf( ' data-bs-title="%s" data-bs-content="%s" data-bs-placement="top" data-bs-html="true"', $popoverTitle, - htmlspecialchars($popoverContent, self::HTML_SPECIAL_CHARS_FLAGS), + htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags), ); } @@ -896,7 +874,7 @@ final class File extends Renderer } if ($pathStructure !== '') { - $paths .= '
' . $this->abbreviateMethodName($methodName) . '
' . "\n"; + $paths .= '
' . $this->abbreviateMethodName($methodName) . '
' . "\n"; $paths .= $pathStructure; } } @@ -906,9 +884,6 @@ final class File extends Renderer return $pathsTemplate->render(); } - /** - * @param list $codeLines - */ private function renderPathLines(array $path, array $branches, array $codeLines, array $testData): string { $linesTemplate = new Template($this->templatePath . 'lines.html.dist', '{{', '}}'); @@ -969,7 +944,7 @@ final class File extends Renderer $popover = sprintf( ' data-bs-title="%s" data-bs-content="%s" data-bs-placement="top" data-bs-html="true"', $popoverTitle, - htmlspecialchars($popoverContent, self::HTML_SPECIAL_CHARS_FLAGS), + htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags), ); } @@ -990,7 +965,7 @@ final class File extends Renderer { $template->setVar( [ - 'lineNumber' => (string) $lineNumber, + 'lineNumber' => $lineNumber, 'lineContent' => $lineContent, 'class' => $class, 'popover' => $popover, @@ -1000,11 +975,6 @@ final class File extends Renderer return $template->render(); } - /** - * @param non-empty-string $file - * - * @return list - */ private function loadFile(string $file): array { if (isset(self::$formattedSourceCache[$file])) { @@ -1025,14 +995,14 @@ final class File extends Renderer if ($token === '"' && $tokens[$j - 1] !== '\\') { $result[$i] .= sprintf( '%s', - htmlspecialchars($token, self::HTML_SPECIAL_CHARS_FLAGS), + htmlspecialchars($token, $this->htmlSpecialCharsFlags), ); $stringFlag = !$stringFlag; } else { $result[$i] .= sprintf( '%s', - htmlspecialchars($token, self::HTML_SPECIAL_CHARS_FLAGS), + htmlspecialchars($token, $this->htmlSpecialCharsFlags), ); } @@ -1044,7 +1014,7 @@ final class File extends Renderer $value = str_replace( ["\t", ' '], ['    ', ' '], - htmlspecialchars($value, self::HTML_SPECIAL_CHARS_FLAGS), + htmlspecialchars($value, $this->htmlSpecialCharsFlags), ); if ($value === "\n") { @@ -1143,7 +1113,7 @@ final class File extends Renderer return sprintf( '%s', $testCSS, - htmlspecialchars($test, self::HTML_SPECIAL_CHARS_FLAGS), + htmlspecialchars($test, $this->htmlSpecialCharsFlags), ); } diff --git a/vendor/phpunit/php-code-coverage/src/Report/Text.php b/vendor/phpunit/php-code-coverage/src/Report/Text.php index b6b8fee..a307aa4 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Text.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Text.php @@ -26,27 +26,27 @@ final class Text /** * @var string */ - private const string COLOR_GREEN = "\x1b[30;42m"; + private const COLOR_GREEN = "\x1b[30;42m"; /** * @var string */ - private const string COLOR_YELLOW = "\x1b[30;43m"; + private const COLOR_YELLOW = "\x1b[30;43m"; /** * @var string */ - private const string COLOR_RED = "\x1b[37;41m"; + private const COLOR_RED = "\x1b[37;41m"; /** * @var string */ - private const string COLOR_HEADER = "\x1b[1;37;40m"; + private const COLOR_HEADER = "\x1b[1;37;40m"; /** * @var string */ - private const string COLOR_RESET = "\x1b[0m"; + private const COLOR_RESET = "\x1b[0m"; private readonly Thresholds $thresholds; private readonly bool $showUncoveredFiles; private readonly bool $showOnlySummary; diff --git a/vendor/phpunit/php-code-coverage/src/Report/Thresholds.php b/vendor/phpunit/php-code-coverage/src/Report/Thresholds.php index d1a81a2..9413515 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Thresholds.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Thresholds.php @@ -14,10 +14,10 @@ use SebastianBergmann\CodeCoverage\InvalidArgumentException; /** * @immutable */ -final readonly class Thresholds +final class Thresholds { - private int $lowUpperBound; - private int $highLowerBound; + private readonly int $lowUpperBound; + private readonly int $highLowerBound; public static function default(): self { diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php index 3878ffc..d7d5323 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php @@ -18,9 +18,9 @@ use SebastianBergmann\Environment\Runtime; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final readonly class BuildInformation +final class BuildInformation { - private DOMElement $contextNode; + private readonly DOMElement $contextNode; public function __construct(DOMElement $contextNode) { diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Facade.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Facade.php index 80b34ba..3264718 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Facade.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Xml/Facade.php @@ -32,19 +32,12 @@ use SebastianBergmann\CodeCoverage\Driver\PathExistsButIsNotDirectoryException; use SebastianBergmann\CodeCoverage\Driver\WriteOperationFailedException; use SebastianBergmann\CodeCoverage\Node\AbstractNode; use SebastianBergmann\CodeCoverage\Node\Directory as DirectoryNode; -use SebastianBergmann\CodeCoverage\Node\File; use SebastianBergmann\CodeCoverage\Node\File as FileNode; use SebastianBergmann\CodeCoverage\Util\Filesystem as DirectoryUtil; use SebastianBergmann\CodeCoverage\Version; use SebastianBergmann\CodeCoverage\XmlException; use SebastianBergmann\Environment\Runtime; -/** - * @phpstan-import-type ProcessedClassType from File - * @phpstan-import-type ProcessedTraitType from File - * @phpstan-import-type ProcessedFunctionType from File - * @phpstan-import-type TestType from CodeCoverage - */ final class Facade { private string $target; @@ -182,9 +175,6 @@ final class Facade $this->saveDocument($fileReport->asDom(), $file->id()); } - /** - * @param ProcessedClassType|ProcessedTraitType $unit - */ private function processUnit(array $unit, Report $report): void { if (isset($unit['className'])) { @@ -215,9 +205,6 @@ final class Facade } } - /** - * @param ProcessedFunctionType $function - */ private function processFunction(array $function, Report $report): void { $functionObject = $report->functionObject($function['functionName']); @@ -228,9 +215,6 @@ final class Facade $functionObject->setTotals((string) $function['executableLines'], (string) $function['executedLines'], (string) $function['coverage']); } - /** - * @param array $tests - */ private function processTests(array $tests): void { $testsObject = $this->project->tests(); @@ -245,9 +229,9 @@ final class Facade $loc = $node->linesOfCode(); $totals->setNumLines( - $loc->linesOfCode(), - $loc->commentLinesOfCode(), - $loc->nonCommentLinesOfCode(), + $loc['linesOfCode'], + $loc['commentLinesOfCode'], + $loc['nonCommentLinesOfCode'], $node->numberOfExecutableLines(), $node->numberOfExecutedLines(), ); diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/File.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/File.php index 0a6bba8..69b2751 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/File.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Xml/File.php @@ -9,7 +9,6 @@ */ namespace SebastianBergmann\CodeCoverage\Report\Xml; -use function assert; use DOMDocument; use DOMElement; @@ -40,8 +39,6 @@ class File ); } - assert($totalsContainer instanceof DOMElement); - return new Totals($totalsContainer); } @@ -68,8 +65,6 @@ class File ), ); - assert($lineNode instanceof DOMElement); - return new Coverage($lineNode, $line); } diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Method.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Method.php index 1994d0f..b1ab9ae 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Method.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Xml/Method.php @@ -14,9 +14,9 @@ use DOMElement; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final readonly class Method +final class Method { - private DOMElement $contextNode; + private readonly DOMElement $contextNode; public function __construct(DOMElement $context, string $name) { diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Node.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Node.php index 3ac9eb3..b2ba54b 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Node.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Xml/Node.php @@ -9,7 +9,6 @@ */ namespace SebastianBergmann\CodeCoverage\Report\Xml; -use function assert; use DOMDocument; use DOMElement; @@ -44,8 +43,6 @@ abstract class Node ); } - assert($totalsContainer instanceof DOMElement); - return new Totals($totalsContainer); } diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Project.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Project.php index 3c1d22b..b450beb 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Project.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Xml/Project.php @@ -9,9 +9,7 @@ */ namespace SebastianBergmann\CodeCoverage\Report\Xml; -use function assert; use DOMDocument; -use DOMElement; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage @@ -45,8 +43,6 @@ final class Project extends Node ); } - assert($buildNode instanceof DOMElement); - return new BuildInformation($buildNode); } @@ -66,8 +62,6 @@ final class Project extends Node ); } - assert($testsNode instanceof DOMElement); - return new Tests($testsNode); } diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Report.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Report.php index 612cc09..09d1034 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Report.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Xml/Report.php @@ -9,11 +9,9 @@ */ namespace SebastianBergmann\CodeCoverage\Report\Xml; -use function assert; use function basename; use function dirname; use DOMDocument; -use DOMElement; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage @@ -40,7 +38,7 @@ final class Report extends File return $this->dom(); } - public function functionObject(string $name): Method + public function functionObject($name): Method { $node = $this->contextNode()->appendChild( $this->dom()->createElementNS( @@ -49,17 +47,15 @@ final class Report extends File ), ); - assert($node instanceof DOMElement); - return new Method($node, $name); } - public function classObject(string $name): Unit + public function classObject($name): Unit { return $this->unitObject('class', $name); } - public function traitObject(string $name): Unit + public function traitObject($name): Unit { return $this->unitObject('trait', $name); } @@ -80,8 +76,6 @@ final class Report extends File ); } - assert($source instanceof DOMElement); - return new Source($source); } @@ -91,7 +85,7 @@ final class Report extends File $this->contextNode()->setAttribute('path', dirname($name)); } - private function unitObject(string $tagName, string $name): Unit + private function unitObject(string $tagName, $name): Unit { $node = $this->contextNode()->appendChild( $this->dom()->createElementNS( @@ -100,8 +94,6 @@ final class Report extends File ), ); - assert($node instanceof DOMElement); - return new Unit($node, $name); } } diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Source.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Source.php index 448fe72..cd1fb90 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Source.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Xml/Source.php @@ -17,9 +17,9 @@ use TheSeer\Tokenizer\XMLSerializer; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final readonly class Source +final class Source { - private DOMElement $context; + private readonly DOMElement $context; public function __construct(DOMElement $context) { diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Tests.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Tests.php index c9e9c48..b575676 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Tests.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Xml/Tests.php @@ -11,16 +11,15 @@ namespace SebastianBergmann\CodeCoverage\Report\Xml; use function assert; use DOMElement; -use SebastianBergmann\CodeCoverage\CodeCoverage; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage * - * @phpstan-import-type TestType from CodeCoverage + * @phpstan-import-type TestType from \SebastianBergmann\CodeCoverage\CodeCoverage */ -final readonly class Tests +final class Tests { - private DOMElement $contextNode; + private readonly DOMElement $contextNode; public function __construct(DOMElement $context) { diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Totals.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Totals.php index 960b8e8..239f6d4 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Totals.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Xml/Totals.php @@ -17,14 +17,14 @@ use SebastianBergmann\CodeCoverage\Util\Percentage; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final readonly class Totals +final class Totals { - private DOMNode $container; - private DOMElement $linesNode; - private DOMElement $methodsNode; - private DOMElement $functionsNode; - private DOMElement $classesNode; - private DOMElement $traitsNode; + private readonly DOMNode $container; + private readonly DOMElement $linesNode; + private readonly DOMElement $methodsNode; + private readonly DOMElement $functionsNode; + private readonly DOMElement $classesNode; + private readonly DOMElement $traitsNode; public function __construct(DOMElement $container) { diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Unit.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Unit.php index fc49552..461ea06 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Unit.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Xml/Unit.php @@ -15,9 +15,9 @@ use DOMElement; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final readonly class Unit +final class Unit { - private DOMElement $contextNode; + private readonly DOMElement $contextNode; public function __construct(DOMElement $context, string $name) { @@ -68,8 +68,6 @@ final readonly class Unit ), ); - assert($node instanceof DOMElement); - return new Method($node, $name); } diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php index f9acc2d..9390b2c 100644 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php +++ b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php @@ -23,17 +23,12 @@ use SebastianBergmann\FileIterator\Facade as FileIteratorFacade; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage * - * @phpstan-type CachedDataForFile array{ - * interfacesIn: array, - * classesIn: array, - * traitsIn: array, - * functionsIn: array, - * linesOfCodeFor: LinesOfCode, - * ignoredLinesFor: LinesType, - * executableLinesIn: LinesType - * } - * - * @phpstan-import-type LinesType from FileAnalyser + * @phpstan-import-type CodeUnitFunctionType from \SebastianBergmann\CodeCoverage\StaticAnalysis\CodeUnitFindingVisitor + * @phpstan-import-type CodeUnitMethodType from \SebastianBergmann\CodeCoverage\StaticAnalysis\CodeUnitFindingVisitor + * @phpstan-import-type CodeUnitClassType from \SebastianBergmann\CodeCoverage\StaticAnalysis\CodeUnitFindingVisitor + * @phpstan-import-type CodeUnitTraitType from \SebastianBergmann\CodeCoverage\StaticAnalysis\CodeUnitFindingVisitor + * @phpstan-import-type LinesOfCodeType from \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser + * @phpstan-import-type LinesType from \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser */ final class CachingFileAnalyser implements FileAnalyser { @@ -42,10 +37,6 @@ final class CachingFileAnalyser implements FileAnalyser private readonly FileAnalyser $analyser; private readonly bool $useAnnotationsForIgnoringCode; private readonly bool $ignoreDeprecatedCode; - - /** - * @var array - */ private array $cache = []; public function __construct(string $directory, FileAnalyser $analyser, bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecatedCode) @@ -59,19 +50,7 @@ final class CachingFileAnalyser implements FileAnalyser } /** - * @return array - */ - public function interfacesIn(string $filename): array - { - if (!isset($this->cache[$filename])) { - $this->process($filename); - } - - return $this->cache[$filename]['interfacesIn']; - } - - /** - * @return array + * @return array */ public function classesIn(string $filename): array { @@ -83,7 +62,7 @@ final class CachingFileAnalyser implements FileAnalyser } /** - * @return array + * @return array */ public function traitsIn(string $filename): array { @@ -95,7 +74,7 @@ final class CachingFileAnalyser implements FileAnalyser } /** - * @return array + * @return array */ public function functionsIn(string $filename): array { @@ -106,7 +85,10 @@ final class CachingFileAnalyser implements FileAnalyser return $this->cache[$filename]['functionsIn']; } - public function linesOfCodeFor(string $filename): LinesOfCode + /** + * @return LinesOfCodeType + */ + public function linesOfCodeFor(string $filename): array { if (!isset($this->cache[$filename])) { $this->process($filename); @@ -150,7 +132,6 @@ final class CachingFileAnalyser implements FileAnalyser } $this->cache[$filename] = [ - 'interfacesIn' => $this->analyser->interfacesIn($filename), 'classesIn' => $this->analyser->classesIn($filename), 'traitsIn' => $this->analyser->traitsIn($filename), 'functionsIn' => $this->analyser->functionsIn($filename), @@ -162,9 +143,6 @@ final class CachingFileAnalyser implements FileAnalyser $this->write($filename, $this->cache[$filename]); } - /** - * @return CachedDataForFile|false - */ private function read(string $filename): array|false { $cacheFile = $this->cacheFile($filename); @@ -175,22 +153,10 @@ final class CachingFileAnalyser implements FileAnalyser return unserialize( file_get_contents($cacheFile), - [ - 'allowed_classes' => [ - Class_::class, - Function_::class, - Interface_::class, - LinesOfCode::class, - Method::class, - Trait_::class, - ], - ], + ['allowed_classes' => false], ); } - /** - * @param CachedDataForFile $data - */ private function write(string $filename, array $data): void { file_put_contents( diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CodeUnitFindingVisitor.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CodeUnitFindingVisitor.php index 08fd009..3ebec6a 100644 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CodeUnitFindingVisitor.php +++ b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CodeUnitFindingVisitor.php @@ -21,6 +21,7 @@ use PhpParser\Node\Name; use PhpParser\Node\NullableType; use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassMethod; +use PhpParser\Node\Stmt\Enum_; use PhpParser\Node\Stmt\Function_; use PhpParser\Node\Stmt\Interface_; use PhpParser\Node\Stmt\Trait_; @@ -31,51 +32,63 @@ use SebastianBergmann\Complexity\CyclomaticComplexityCalculatingVisitor; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage + * + * @phpstan-type CodeUnitFunctionType = array{ + * name: string, + * namespacedName: string, + * namespace: string, + * signature: string, + * startLine: int, + * endLine: int, + * ccn: int + * } + * @phpstan-type CodeUnitMethodType = array{ + * methodName: string, + * signature: string, + * visibility: string, + * startLine: int, + * endLine: int, + * ccn: int + * } + * @phpstan-type CodeUnitClassType = array{ + * name: string, + * namespacedName: string, + * namespace: string, + * startLine: int, + * endLine: int, + * methods: array + * } + * @phpstan-type CodeUnitTraitType = array{ + * name: string, + * namespacedName: string, + * namespace: string, + * startLine: int, + * endLine: int, + * methods: array + * } */ final class CodeUnitFindingVisitor extends NodeVisitorAbstract { /** - * @var non-empty-string - */ - private string $file; - - /** - * @var array - */ - private array $interfaces = []; - - /** - * @var array + * @var array */ private array $classes = []; /** - * @var array + * @var array */ private array $traits = []; /** - * @var array + * @var array */ private array $functions = []; - /** - * @param non-empty-string $file - */ - public function __construct(string $file) + public function enterNode(Node $node): void { - $this->file = $file; - } - - public function enterNode(Node $node): null - { - if ($node instanceof Interface_) { - $this->processInterface($node); - } - if ($node instanceof Class_) { if ($node->isAnonymous()) { - return null; + return; } $this->processClass($node); @@ -85,52 +98,27 @@ final class CodeUnitFindingVisitor extends NodeVisitorAbstract $this->processTrait($node); } - if (!$node instanceof Function_) { - return null; + if (!$node instanceof ClassMethod && !$node instanceof Function_) { + return; + } + + if ($node instanceof ClassMethod) { + $parentNode = $node->getAttribute('parent'); + + if ($parentNode instanceof Class_ && $parentNode->isAnonymous()) { + return; + } + + $this->processMethod($node); + + return; } $this->processFunction($node); - - return null; - } - - public function leaveNode(Node $node): null - { - if ($node instanceof Class_ && $node->isAnonymous()) { - return null; - } - - if (!$node instanceof Class_ && !$node instanceof Trait_) { - return null; - } - - $traits = []; - - foreach ($node->getTraitUses() as $traitUse) { - foreach ($traitUse->traits as $trait) { - $traits[] = $trait->toString(); - } - } - - if (empty($traits)) { - return null; - } - - $this->postProcessClassOrTrait($node, $traits); - - return null; } /** - * @return array - */ - public function interfaces(): array - { - return $this->interfaces; - } - - /** - * @return array + * @return array */ public function classes(): array { @@ -138,7 +126,7 @@ final class CodeUnitFindingVisitor extends NodeVisitorAbstract } /** - * @return array + * @return array */ public function traits(): array { @@ -146,7 +134,7 @@ final class CodeUnitFindingVisitor extends NodeVisitorAbstract } /** - * @return array + * @return array */ public function functions(): array { @@ -222,66 +210,32 @@ final class CodeUnitFindingVisitor extends NodeVisitorAbstract return $type->toString(); } - private function visibility(ClassMethod $node): Visibility + private function visibility(ClassMethod $node): string { if ($node->isPrivate()) { - return Visibility::Private; + return 'private'; } if ($node->isProtected()) { - return Visibility::Protected; + return 'protected'; } - return Visibility::Public; - } - - private function processInterface(Interface_ $node): void - { - $name = $node->name->toString(); - $namespacedName = $node->namespacedName->toString(); - $parentInterfaces = []; - - foreach ($node->extends as $parentInterface) { - $parentInterfaces[] = $parentInterface->toString(); - } - - $this->interfaces[$namespacedName] = new \SebastianBergmann\CodeCoverage\StaticAnalysis\Interface_( - $name, - $namespacedName, - $this->namespace($namespacedName, $name), - $node->getStartLine(), - $node->getEndLine(), - $parentInterfaces, - ); + return 'public'; } private function processClass(Class_ $node): void { $name = $node->name->toString(); $namespacedName = $node->namespacedName->toString(); - $parentClass = null; - $interfaces = []; - if ($node->extends instanceof Name) { - $parentClass = $node->extends->toString(); - } - - foreach ($node->implements as $interface) { - $interfaces[] = $interface->toString(); - } - - $this->classes[$namespacedName] = new \SebastianBergmann\CodeCoverage\StaticAnalysis\Class_( - $name, - $namespacedName, - $this->namespace($namespacedName, $name), - $this->file, - $node->getStartLine(), - $node->getEndLine(), - $parentClass, - $interfaces, - [], - $this->processMethods($node->getMethods()), - ); + $this->classes[$namespacedName] = [ + 'name' => $name, + 'namespacedName' => $namespacedName, + 'namespace' => $this->namespace($namespacedName, $name), + 'startLine' => $node->getStartLine(), + 'endLine' => $node->getEndLine(), + 'methods' => [], + ]; } private function processTrait(Trait_ $node): void @@ -289,39 +243,57 @@ final class CodeUnitFindingVisitor extends NodeVisitorAbstract $name = $node->name->toString(); $namespacedName = $node->namespacedName->toString(); - $this->traits[$namespacedName] = new \SebastianBergmann\CodeCoverage\StaticAnalysis\Trait_( - $name, - $namespacedName, - $this->namespace($namespacedName, $name), - $this->file, - $node->getStartLine(), - $node->getEndLine(), - [], - $this->processMethods($node->getMethods()), - ); + $this->traits[$namespacedName] = [ + 'name' => $name, + 'namespacedName' => $namespacedName, + 'namespace' => $this->namespace($namespacedName, $name), + 'startLine' => $node->getStartLine(), + 'endLine' => $node->getEndLine(), + 'methods' => [], + ]; } - /** - * @param list $nodes - * - * @return array - */ - private function processMethods(array $nodes): array + private function processMethod(ClassMethod $node): void { - $methods = []; + $parentNode = $node->getAttribute('parent'); - foreach ($nodes as $node) { - $methods[$node->name->toString()] = new Method( - $node->name->toString(), - $node->getStartLine(), - $node->getEndLine(), - $this->signature($node), - $this->visibility($node), - $this->cyclomaticComplexity($node), - ); + if ($parentNode instanceof Interface_) { + return; } - return $methods; + assert($parentNode instanceof Class_ || $parentNode instanceof Trait_ || $parentNode instanceof Enum_); + assert(isset($parentNode->name)); + assert(isset($parentNode->namespacedName)); + assert($parentNode->namespacedName instanceof Name); + + $parentName = $parentNode->name->toString(); + $parentNamespacedName = $parentNode->namespacedName->toString(); + + if ($parentNode instanceof Class_) { + $storage = &$this->classes; + } else { + $storage = &$this->traits; + } + + if (!isset($storage[$parentNamespacedName])) { + $storage[$parentNamespacedName] = [ + 'name' => $parentName, + 'namespacedName' => $parentNamespacedName, + 'namespace' => $this->namespace($parentNamespacedName, $parentName), + 'startLine' => $parentNode->getStartLine(), + 'endLine' => $parentNode->getEndLine(), + 'methods' => [], + ]; + } + + $storage[$parentNamespacedName]['methods'][$node->name->toString()] = [ + 'methodName' => $node->name->toString(), + 'signature' => $this->signature($node), + 'visibility' => $this->visibility($node), + 'startLine' => $node->getStartLine(), + 'endLine' => $node->getEndLine(), + 'ccn' => $this->cyclomaticComplexity($node), + ]; } private function processFunction(Function_ $node): void @@ -333,15 +305,15 @@ final class CodeUnitFindingVisitor extends NodeVisitorAbstract $name = $node->name->toString(); $namespacedName = $node->namespacedName->toString(); - $this->functions[$namespacedName] = new \SebastianBergmann\CodeCoverage\StaticAnalysis\Function_( - $name, - $namespacedName, - $this->namespace($namespacedName, $name), - $node->getStartLine(), - $node->getEndLine(), - $this->signature($node), - $this->cyclomaticComplexity($node), - ); + $this->functions[$namespacedName] = [ + 'name' => $name, + 'namespacedName' => $namespacedName, + 'namespace' => $this->namespace($namespacedName, $name), + 'signature' => $this->signature($node), + 'startLine' => $node->getStartLine(), + 'endLine' => $node->getEndLine(), + 'ccn' => $this->cyclomaticComplexity($node), + ]; } private function namespace(string $namespacedName, string $name): string @@ -385,44 +357,4 @@ final class CodeUnitFindingVisitor extends NodeVisitorAbstract return $node->toString(); } - - /** - * @param list $traits - */ - private function postProcessClassOrTrait(Class_|Trait_ $node, array $traits): void - { - $name = $node->namespacedName->toString(); - - if ($node instanceof Class_) { - assert(isset($this->classes[$name])); - - $this->classes[$name] = new \SebastianBergmann\CodeCoverage\StaticAnalysis\Class_( - $this->classes[$name]->name(), - $this->classes[$name]->namespacedName(), - $this->classes[$name]->namespace(), - $this->classes[$name]->file(), - $this->classes[$name]->startLine(), - $this->classes[$name]->endLine(), - $this->classes[$name]->parentClass(), - $this->classes[$name]->interfaces(), - $traits, - $this->classes[$name]->methods(), - ); - - return; - } - - assert(isset($this->traits[$name])); - - $this->traits[$name] = new \SebastianBergmann\CodeCoverage\StaticAnalysis\Trait_( - $this->traits[$name]->name(), - $this->traits[$name]->namespacedName(), - $this->traits[$name]->namespace(), - $this->traits[$name]->file(), - $this->traits[$name]->startLine(), - $this->traits[$name]->endLine(), - $traits, - $this->traits[$name]->methods(), - ); - } } diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/ExecutableLinesFindingVisitor.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/ExecutableLinesFindingVisitor.php index b1abd3a..e1327d8 100644 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/ExecutableLinesFindingVisitor.php +++ b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/ExecutableLinesFindingVisitor.php @@ -27,7 +27,7 @@ use PhpParser\NodeVisitorAbstract; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage * - * @phpstan-import-type LinesType from FileAnalyser + * @phpstan-import-type LinesType from \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser */ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract { @@ -54,7 +54,7 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract $this->source = $source; } - public function enterNode(Node $node): null + public function enterNode(Node $node): void { foreach ($node->getComments() as $comment) { $commentLine = $comment->getStartLine(); @@ -80,7 +80,7 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract } } - return null; + return; } if ($node instanceof Node\Stmt\Interface_) { @@ -88,7 +88,7 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract $this->unsets[$line] = true; } - return null; + return; } if ($node instanceof Node\Stmt\Declare_ || @@ -113,7 +113,7 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract $node instanceof Node\Name || $node instanceof Node\Param || $node instanceof Node\Scalar) { - return null; + return; } if ($node instanceof Node\Expr\Match_) { @@ -125,13 +125,13 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract ); } - return null; + return; } if ($node instanceof Node\Stmt\Expression && $node->expr instanceof Node\Expr\Throw_) { $this->setLineBranch($node->expr->expr->getEndLine(), $node->expr->expr->getEndLine(), ++$this->nextBranch); - return null; + return; } if ($node instanceof Node\Stmt\Enum_ || @@ -176,7 +176,7 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract } if ($isConcreteClassLike) { - return null; + return; } $hasEmptyBody = [] === $node->stmts || @@ -188,15 +188,15 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract if ($hasEmptyBody) { if ($node->getEndLine() === $node->getStartLine() && isset($this->executableLinesGroupedByBranch[$node->getStartLine()])) { - return null; + return; } $this->setLineBranch($node->getEndLine(), $node->getEndLine(), ++$this->nextBranch); - return null; + return; } - return null; + return; } if ($node instanceof Node\Expr\ArrowFunction) { @@ -208,12 +208,12 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract $endLine = $node->expr->getEndLine(); if ($endLine < $startLine) { - return null; + return; } $this->setLineBranch($startLine, $endLine, ++$this->nextBranch); - return null; + return; } if ($node instanceof Node\Expr\Ternary) { @@ -226,7 +226,7 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract $this->setLineBranch($node->else->getStartLine(), $node->else->getEndLine(), ++$this->nextBranch); } - return null; + return; } if ($node instanceof Node\Expr\BinaryOp\Coalesce) { @@ -234,14 +234,14 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract $this->setLineBranch($node->getEndLine(), $node->getEndLine(), ++$this->nextBranch); } - return null; + return; } if ($node instanceof Node\Stmt\If_ || $node instanceof Node\Stmt\ElseIf_ || $node instanceof Node\Stmt\Case_) { if (null === $node->cond) { - return null; + return; } $this->setLineBranch( @@ -250,7 +250,7 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract ++$this->nextBranch, ); - return null; + return; } if ($node instanceof Node\Stmt\For_) { @@ -292,7 +292,7 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract } if (null === $startLine || null === $endLine) { - return null; + return; } $this->setLineBranch( @@ -301,7 +301,7 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract ++$this->nextBranch, ); - return null; + return; } if ($node instanceof Node\Stmt\Foreach_) { @@ -311,7 +311,7 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract ++$this->nextBranch, ); - return null; + return; } if ($node instanceof Node\Stmt\While_ || @@ -322,7 +322,7 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract ++$this->nextBranch, ); - return null; + return; } if ($node instanceof Node\Stmt\Catch_) { @@ -337,7 +337,7 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract ++$this->nextBranch, ); - return null; + return; } if ($node instanceof Node\Expr\CallLike) { @@ -349,19 +349,17 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract $this->setLineBranch($node->getStartLine(), $node->getEndLine(), $branch); - return null; + return; } if (isset($this->executableLinesGroupedByBranch[$node->getStartLine()])) { - return null; + return; } $this->setLineBranch($node->getStartLine(), $node->getEndLine(), ++$this->nextBranch); - - return null; } - public function afterTraverse(array $nodes): null + public function afterTraverse(array $nodes): void { $lines = explode("\n", $this->source); @@ -381,8 +379,6 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract $this->executableLinesGroupedByBranch, $this->unsets, ); - - return null; } /** diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/FileAnalyser.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/FileAnalyser.php index 8aebac4..7f2e618 100644 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/FileAnalyser.php +++ b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/FileAnalyser.php @@ -12,31 +12,39 @@ namespace SebastianBergmann\CodeCoverage\StaticAnalysis; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage * - * @phpstan-type LinesType array + * @phpstan-import-type CodeUnitFunctionType from \SebastianBergmann\CodeCoverage\StaticAnalysis\CodeUnitFindingVisitor + * @phpstan-import-type CodeUnitMethodType from \SebastianBergmann\CodeCoverage\StaticAnalysis\CodeUnitFindingVisitor + * @phpstan-import-type CodeUnitClassType from \SebastianBergmann\CodeCoverage\StaticAnalysis\CodeUnitFindingVisitor + * @phpstan-import-type CodeUnitTraitType from \SebastianBergmann\CodeCoverage\StaticAnalysis\CodeUnitFindingVisitor + * + * @phpstan-type LinesOfCodeType = array{ + * linesOfCode: int, + * commentLinesOfCode: int, + * nonCommentLinesOfCode: int + * } + * @phpstan-type LinesType = array */ interface FileAnalyser { /** - * @return array - */ - public function interfacesIn(string $filename): array; - - /** - * @return array + * @return array */ public function classesIn(string $filename): array; /** - * @return array + * @return array */ public function traitsIn(string $filename): array; /** - * @return array + * @return array */ public function functionsIn(string $filename): array; - public function linesOfCodeFor(string $filename): LinesOfCode; + /** + * @return LinesOfCodeType + */ + public function linesOfCodeFor(string $filename): array; /** * @return LinesType diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/IgnoredLinesFindingVisitor.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/IgnoredLinesFindingVisitor.php index fefe646..40f12cc 100644 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/IgnoredLinesFindingVisitor.php +++ b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/IgnoredLinesFindingVisitor.php @@ -39,7 +39,7 @@ final class IgnoredLinesFindingVisitor extends NodeVisitorAbstract $this->ignoreDeprecated = $ignoreDeprecated; } - public function enterNode(Node $node): null + public function enterNode(Node $node): void { if (!$node instanceof Class_ && !$node instanceof Trait_ && @@ -48,11 +48,11 @@ final class IgnoredLinesFindingVisitor extends NodeVisitorAbstract !$node instanceof ClassMethod && !$node instanceof Function_ && !$node instanceof Attribute) { - return null; + return; } if ($node instanceof Class_ && $node->isAnonymous()) { - return null; + return; } if ($node instanceof Class_ || @@ -68,11 +68,11 @@ final class IgnoredLinesFindingVisitor extends NodeVisitorAbstract } if (!$this->useAnnotationsForIgnoringCode) { - return null; + return; } if ($node instanceof Interface_) { - return null; + return; } if ($node instanceof Attribute && @@ -84,12 +84,10 @@ final class IgnoredLinesFindingVisitor extends NodeVisitorAbstract $this->ignoredLines[] = $line; } - return null; + return; } $this->processDocComment($node); - - return null; } /** diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/ParsingFileAnalyser.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/ParsingFileAnalyser.php index 710c3d4..eae1bdc 100644 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/ParsingFileAnalyser.php +++ b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/ParsingFileAnalyser.php @@ -34,32 +34,32 @@ use SebastianBergmann\LinesOfCode\LineCountingVisitor; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage * - * @phpstan-import-type LinesType from FileAnalyser + * @phpstan-import-type CodeUnitFunctionType from \SebastianBergmann\CodeCoverage\StaticAnalysis\CodeUnitFindingVisitor + * @phpstan-import-type CodeUnitMethodType from \SebastianBergmann\CodeCoverage\StaticAnalysis\CodeUnitFindingVisitor + * @phpstan-import-type CodeUnitClassType from \SebastianBergmann\CodeCoverage\StaticAnalysis\CodeUnitFindingVisitor + * @phpstan-import-type CodeUnitTraitType from \SebastianBergmann\CodeCoverage\StaticAnalysis\CodeUnitFindingVisitor + * @phpstan-import-type LinesOfCodeType from \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser + * @phpstan-import-type LinesType from \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser */ final class ParsingFileAnalyser implements FileAnalyser { /** - * @var array> - */ - private array $interfaces = []; - - /** - * @var array> + * @var array> */ private array $classes = []; /** - * @var array> + * @var array> */ private array $traits = []; /** - * @var array> + * @var array> */ private array $functions = []; /** - * @var array + * @var array */ private array $linesOfCode = []; @@ -82,17 +82,7 @@ final class ParsingFileAnalyser implements FileAnalyser } /** - * @return array - */ - public function interfacesIn(string $filename): array - { - $this->analyse($filename); - - return $this->interfaces[$filename]; - } - - /** - * @return array + * @return array */ public function classesIn(string $filename): array { @@ -102,7 +92,7 @@ final class ParsingFileAnalyser implements FileAnalyser } /** - * @return array + * @return array */ public function traitsIn(string $filename): array { @@ -112,7 +102,7 @@ final class ParsingFileAnalyser implements FileAnalyser } /** - * @return array + * @return array */ public function functionsIn(string $filename): array { @@ -121,7 +111,10 @@ final class ParsingFileAnalyser implements FileAnalyser return $this->functions[$filename]; } - public function linesOfCodeFor(string $filename): LinesOfCode + /** + * @return LinesOfCodeType + */ + public function linesOfCodeFor(string $filename): array { $this->analyse($filename); @@ -153,7 +146,7 @@ final class ParsingFileAnalyser implements FileAnalyser */ private function analyse(string $filename): void { - if (isset($this->interfaces[$filename])) { + if (isset($this->classes[$filename])) { return; } @@ -174,7 +167,7 @@ final class ParsingFileAnalyser implements FileAnalyser assert($nodes !== null); $traverser = new NodeTraverser; - $codeUnitFindingVisitor = new CodeUnitFindingVisitor($filename); + $codeUnitFindingVisitor = new CodeUnitFindingVisitor; $lineCountingVisitor = new LineCountingVisitor($linesOfCode); $ignoredLinesFindingVisitor = new IgnoredLinesFindingVisitor($this->useAnnotationsForIgnoringCode, $this->ignoreDeprecatedCode); $executableLinesFindingVisitor = new ExecutableLinesFindingVisitor($source); @@ -202,7 +195,6 @@ final class ParsingFileAnalyser implements FileAnalyser } // @codeCoverageIgnoreEnd - $this->interfaces[$filename] = $codeUnitFindingVisitor->interfaces(); $this->classes[$filename] = $codeUnitFindingVisitor->classes(); $this->traits[$filename] = $codeUnitFindingVisitor->traits(); $this->functions[$filename] = $codeUnitFindingVisitor->functions(); @@ -222,11 +214,11 @@ final class ParsingFileAnalyser implements FileAnalyser $result = $lineCountingVisitor->result(); - $this->linesOfCode[$filename] = new LinesOfCode( - $result->linesOfCode(), - $result->commentLinesOfCode(), - $result->nonCommentLinesOfCode(), - ); + $this->linesOfCode[$filename] = [ + 'linesOfCode' => $result->linesOfCode(), + 'commentLinesOfCode' => $result->commentLinesOfCode(), + 'nonCommentLinesOfCode' => $result->nonCommentLinesOfCode(), + ]; } private function findLinesIgnoredByLineBasedAnnotations(string $filename, string $source, bool $useAnnotationsForIgnoringCode): void diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Class_.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Class_.php deleted file mode 100644 index ee87b24..0000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Class_.php +++ /dev/null @@ -1,174 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class Class_ -{ - /** - * @var non-empty-string - */ - private string $name; - - /** - * @var non-empty-string - */ - private string $namespacedName; - private string $namespace; - - /** - * @var non-empty-string - */ - private string $file; - - /** - * @var non-negative-int - */ - private int $startLine; - - /** - * @var non-negative-int - */ - private int $endLine; - - /** - * @var ?non-empty-string - */ - private ?string $parentClass; - - /** - * @var list - */ - private array $interfaces; - - /** - * @var list - */ - private array $traits; - - /** - * @var array - */ - private array $methods; - - /** - * @param non-empty-string $name - * @param non-empty-string $namespacedName - * @param non-empty-string $file - * @param non-negative-int $startLine - * @param non-negative-int $endLine - * @param ?non-empty-string $parentClass - * @param list $interfaces - * @param list $traits - * @param array $methods - */ - public function __construct(string $name, string $namespacedName, string $namespace, string $file, int $startLine, int $endLine, ?string $parentClass, array $interfaces, array $traits, array $methods) - { - $this->name = $name; - $this->namespacedName = $namespacedName; - $this->namespace = $namespace; - $this->file = $file; - $this->startLine = $startLine; - $this->endLine = $endLine; - $this->parentClass = $parentClass; - $this->interfaces = $interfaces; - $this->traits = $traits; - $this->methods = $methods; - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->name; - } - - /** - * @return non-empty-string - */ - public function namespacedName(): string - { - return $this->namespacedName; - } - - public function isNamespaced(): bool - { - return $this->namespace !== ''; - } - - public function namespace(): string - { - return $this->namespace; - } - - /** - * @return non-empty-string - */ - public function file(): string - { - return $this->file; - } - - /** - * @return non-negative-int - */ - public function startLine(): int - { - return $this->startLine; - } - - /** - * @return non-negative-int - */ - public function endLine(): int - { - return $this->endLine; - } - - public function hasParent(): bool - { - return $this->parentClass !== null; - } - - /** - * @return ?non-empty-string - */ - public function parentClass(): ?string - { - return $this->parentClass; - } - - /** - * @return list - */ - public function interfaces(): array - { - return $this->interfaces; - } - - /** - * @return list - */ - public function traits(): array - { - return $this->traits; - } - - /** - * @return array - */ - public function methods(): array - { - return $this->methods; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Function_.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Function_.php deleted file mode 100644 index 7069dec..0000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Function_.php +++ /dev/null @@ -1,124 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class Function_ -{ - /** - * @var non-empty-string - */ - private string $name; - - /** - * @var non-empty-string - */ - private string $namespacedName; - private string $namespace; - - /** - * @var non-negative-int - */ - private int $startLine; - - /** - * @var non-negative-int - */ - private int $endLine; - - /** - * @var non-empty-string - */ - private string $signature; - - /** - * @var positive-int - */ - private int $cyclomaticComplexity; - - /** - * @param non-empty-string $name - * @param non-empty-string $namespacedName - * @param non-negative-int $startLine - * @param non-negative-int $endLine - * @param non-empty-string $signature - * @param positive-int $cyclomaticComplexity - */ - public function __construct(string $name, string $namespacedName, string $namespace, int $startLine, int $endLine, string $signature, int $cyclomaticComplexity) - { - $this->name = $name; - $this->namespacedName = $namespacedName; - $this->namespace = $namespace; - $this->startLine = $startLine; - $this->endLine = $endLine; - $this->signature = $signature; - $this->cyclomaticComplexity = $cyclomaticComplexity; - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->name; - } - - /** - * @return non-empty-string - */ - public function namespacedName(): string - { - return $this->namespacedName; - } - - public function isNamespaced(): bool - { - return $this->namespace !== ''; - } - - public function namespace(): string - { - return $this->namespace; - } - - /** - * @return non-negative-int - */ - public function startLine(): int - { - return $this->startLine; - } - - /** - * @return non-negative-int - */ - public function endLine(): int - { - return $this->endLine; - } - - /** - * @return non-empty-string - */ - public function signature(): string - { - return $this->signature; - } - - /** - * @return positive-int - */ - public function cyclomaticComplexity(): int - { - return $this->cyclomaticComplexity; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Interface_.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Interface_.php deleted file mode 100644 index 0b25792..0000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Interface_.php +++ /dev/null @@ -1,109 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class Interface_ -{ - /** - * @var non-empty-string - */ - private string $name; - - /** - * @var non-empty-string - */ - private string $namespacedName; - private string $namespace; - - /** - * @var non-negative-int - */ - private int $startLine; - - /** - * @var non-negative-int - */ - private int $endLine; - - /** - * @var list - */ - private array $parentInterfaces; - - /** - * @param non-empty-string $name - * @param non-empty-string $namespacedName - * @param non-negative-int $startLine - * @param non-negative-int $endLine - * @param list $parentInterfaces - */ - public function __construct(string $name, string $namespacedName, string $namespace, int $startLine, int $endLine, array $parentInterfaces) - { - $this->name = $name; - $this->namespacedName = $namespacedName; - $this->namespace = $namespace; - $this->startLine = $startLine; - $this->endLine = $endLine; - $this->parentInterfaces = $parentInterfaces; - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->name; - } - - /** - * @return non-empty-string - */ - public function namespacedName(): string - { - return $this->namespacedName; - } - - public function isNamespaced(): bool - { - return $this->namespace !== ''; - } - - public function namespace(): string - { - return $this->namespace; - } - - /** - * @return non-negative-int - */ - public function startLine(): int - { - return $this->startLine; - } - - /** - * @return non-negative-int - */ - public function endLine(): int - { - return $this->endLine; - } - - /** - * @return list - */ - public function parentInterfaces(): array - { - return $this->parentInterfaces; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/LinesOfCode.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/LinesOfCode.php deleted file mode 100644 index f8720e1..0000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/LinesOfCode.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class LinesOfCode -{ - /** - * @var non-negative-int - */ - private int $linesOfCode; - - /** - * @var non-negative-int - */ - private int $commentLinesOfCode; - - /** - * @var non-negative-int - */ - private int $nonCommentLinesOfCode; - - /** - * @param non-negative-int $linesOfCode - * @param non-negative-int $commentLinesOfCode - * @param non-negative-int $nonCommentLinesOfCode - */ - public function __construct(int $linesOfCode, int $commentLinesOfCode, int $nonCommentLinesOfCode) - { - $this->linesOfCode = $linesOfCode; - $this->commentLinesOfCode = $commentLinesOfCode; - $this->nonCommentLinesOfCode = $nonCommentLinesOfCode; - } - - /** - * @return non-negative-int - */ - public function linesOfCode(): int - { - return $this->linesOfCode; - } - - /** - * @return non-negative-int - */ - public function commentLinesOfCode(): int - { - return $this->commentLinesOfCode; - } - - /** - * @return non-negative-int - */ - public function nonCommentLinesOfCode(): int - { - return $this->nonCommentLinesOfCode; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Method.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Method.php deleted file mode 100644 index 12e3438..0000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Method.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class Method -{ - /** - * @var non-empty-string - */ - private string $name; - - /** - * @var non-negative-int - */ - private int $startLine; - - /** - * @var non-negative-int - */ - private int $endLine; - private Visibility $visibility; - - /** - * @var non-empty-string - */ - private string $signature; - - /** - * @var positive-int - */ - private int $cyclomaticComplexity; - - /** - * @param non-empty-string $name - * @param non-negative-int $startLine - * @param non-negative-int $endLine - * @param non-empty-string $signature - * @param positive-int $cyclomaticComplexity - */ - public function __construct(string $name, int $startLine, int $endLine, string $signature, Visibility $visibility, int $cyclomaticComplexity) - { - $this->name = $name; - $this->startLine = $startLine; - $this->endLine = $endLine; - $this->signature = $signature; - $this->visibility = $visibility; - $this->cyclomaticComplexity = $cyclomaticComplexity; - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->name; - } - - /** - * @return non-negative-int - */ - public function startLine(): int - { - return $this->startLine; - } - - /** - * @return non-negative-int - */ - public function endLine(): int - { - return $this->endLine; - } - - /** - * @return non-empty-string - */ - public function signature(): string - { - return $this->signature; - } - - public function visibility(): Visibility - { - return $this->visibility; - } - - /** - * @return positive-int - */ - public function cyclomaticComplexity(): int - { - return $this->cyclomaticComplexity; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Trait_.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Trait_.php deleted file mode 100644 index 7bf1084..0000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Trait_.php +++ /dev/null @@ -1,139 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -/** - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class Trait_ -{ - /** - * @var non-empty-string - */ - private string $name; - - /** - * @var non-empty-string - */ - private string $namespacedName; - private string $namespace; - - /** - * @var non-empty-string - */ - private string $file; - - /** - * @var non-negative-int - */ - private int $startLine; - - /** - * @var non-negative-int - */ - private int $endLine; - - /** - * @var list - */ - private array $traits; - - /** - * @var array - */ - private array $methods; - - /** - * @param non-empty-string $name - * @param non-empty-string $namespacedName - * @param non-empty-string $file - * @param non-negative-int $startLine - * @param non-negative-int $endLine - * @param list $traits - * @param array $methods - */ - public function __construct(string $name, string $namespacedName, string $namespace, string $file, int $startLine, int $endLine, array $traits, array $methods) - { - $this->name = $name; - $this->namespacedName = $namespacedName; - $this->namespace = $namespace; - $this->file = $file; - $this->startLine = $startLine; - $this->endLine = $endLine; - $this->traits = $traits; - $this->methods = $methods; - } - - /** - * @return non-empty-string - */ - public function name(): string - { - return $this->name; - } - - /** - * @return non-empty-string - */ - public function namespacedName(): string - { - return $this->namespacedName; - } - - public function isNamespaced(): bool - { - return $this->namespace !== ''; - } - - public function namespace(): string - { - return $this->namespace; - } - - /** - * @return non-empty-string - */ - public function file(): string - { - return $this->file; - } - - /** - * @return non-negative-int - */ - public function startLine(): int - { - return $this->startLine; - } - - /** - * @return non-negative-int - */ - public function endLine(): int - { - return $this->endLine; - } - - /** - * @return list - */ - public function traits(): array - { - return $this->traits; - } - - /** - * @return array - */ - public function methods(): array - { - return $this->methods; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Visibility.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Visibility.php deleted file mode 100644 index c927977..0000000 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/Value/Visibility.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\StaticAnalysis; - -/** - * @internal This enumeration is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -enum Visibility: string -{ - case Public = 'public'; - case Protected = 'protected'; - case Private = 'private'; -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/Class_.php b/vendor/phpunit/php-code-coverage/src/Target/Class_.php deleted file mode 100644 index 9e66978..0000000 --- a/vendor/phpunit/php-code-coverage/src/Target/Class_.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Class_ extends Target -{ - /** - * @var class-string - */ - private string $className; - - /** - * @param class-string $className - */ - protected function __construct(string $className) - { - $this->className = $className; - } - - public function isClass(): true - { - return true; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function key(): string - { - return 'classes'; - } - - /** - * @return non-empty-string - */ - public function target(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function description(): string - { - return 'Class ' . $this->target(); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/ClassesThatExtendClass.php b/vendor/phpunit/php-code-coverage/src/Target/ClassesThatExtendClass.php deleted file mode 100644 index 94fdb56..0000000 --- a/vendor/phpunit/php-code-coverage/src/Target/ClassesThatExtendClass.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class ClassesThatExtendClass extends Target -{ - /** - * @var class-string - */ - private string $className; - - /** - * @param class-string $className - */ - protected function __construct(string $className) - { - $this->className = $className; - } - - public function isClassesThatExtendClass(): true - { - return true; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function key(): string - { - return 'classesThatExtendClass'; - } - - /** - * @return non-empty-string - */ - public function target(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function description(): string - { - return 'Classes that extend class ' . $this->target(); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/ClassesThatImplementInterface.php b/vendor/phpunit/php-code-coverage/src/Target/ClassesThatImplementInterface.php deleted file mode 100644 index 6bbe18e..0000000 --- a/vendor/phpunit/php-code-coverage/src/Target/ClassesThatImplementInterface.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class ClassesThatImplementInterface extends Target -{ - /** - * @var class-string - */ - private string $interfaceName; - - /** - * @param class-string $interfaceName - */ - protected function __construct(string $interfaceName) - { - $this->interfaceName = $interfaceName; - } - - public function isClassesThatImplementInterface(): true - { - return true; - } - - /** - * @return class-string - */ - public function interfaceName(): string - { - return $this->interfaceName; - } - - /** - * @return non-empty-string - */ - public function key(): string - { - return 'classesThatImplementInterface'; - } - - /** - * @return non-empty-string - */ - public function target(): string - { - return $this->interfaceName; - } - - /** - * @return non-empty-string - */ - public function description(): string - { - return 'Classes that implement interface ' . $this->target(); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/Function_.php b/vendor/phpunit/php-code-coverage/src/Target/Function_.php deleted file mode 100644 index 1d7cddd..0000000 --- a/vendor/phpunit/php-code-coverage/src/Target/Function_.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Function_ extends Target -{ - /** - * @var non-empty-string - */ - private string $functionName; - - /** - * @param non-empty-string $functionName - */ - protected function __construct(string $functionName) - { - $this->functionName = $functionName; - } - - public function isFunction(): true - { - return true; - } - - /** - * @return non-empty-string - */ - public function functionName(): string - { - return $this->functionName; - } - - /** - * @return non-empty-string - */ - public function key(): string - { - return 'functions'; - } - - /** - * @return non-empty-string - */ - public function target(): string - { - return $this->functionName; - } - - /** - * @return non-empty-string - */ - public function description(): string - { - return 'Function ' . $this->target(); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/MapBuilder.php b/vendor/phpunit/php-code-coverage/src/Target/MapBuilder.php deleted file mode 100644 index a634e6b..0000000 --- a/vendor/phpunit/php-code-coverage/src/Target/MapBuilder.php +++ /dev/null @@ -1,249 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -use function array_keys; -use function array_merge; -use function array_slice; -use function array_unique; -use function count; -use function explode; -use function implode; -use function range; -use SebastianBergmann\CodeCoverage\Filter; -use SebastianBergmann\CodeCoverage\StaticAnalysis\Class_; -use SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser; -use SebastianBergmann\CodeCoverage\StaticAnalysis\Trait_; - -/** - * @phpstan-import-type TargetMap from Mapper - * @phpstan-import-type TargetMapPart from Mapper - * - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - * - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class MapBuilder -{ - /** - * @return TargetMap - */ - public function build(Filter $filter, FileAnalyser $analyser): array - { - $namespaces = []; - $classes = []; - $classDetails = []; - $classesThatExtendClass = []; - $classesThatImplementInterface = []; - $traits = []; - $methods = []; - $functions = []; - $reverseLookup = []; - - foreach ($filter->files() as $file) { - foreach ($analyser->traitsIn($file) as $trait) { - if ($trait->isNamespaced()) { - $this->processNamespace($namespaces, $trait->namespace(), $file, $trait->startLine(), $trait->endLine()); - } - - $this->process($traits, $trait->namespacedName(), $file, $trait->startLine(), $trait->endLine()); - $this->processMethods($trait, $file, $methods, $reverseLookup); - } - } - - foreach ($filter->files() as $file) { - foreach ($analyser->traitsIn($file) as $trait) { - foreach ($trait->traits() as $traitName) { - if (!isset($traits[$traitName])) { - continue; - } - - $file = array_keys($traits[$traitName])[0]; - - if (!isset($traits[$trait->namespacedName()][$file])) { - $traits[$trait->namespacedName()][$file] = $traits[$traitName][$file]; - - continue; - } - - $traits[$trait->namespacedName()][$file] = array_unique( - array_merge( - $traits[$trait->namespacedName()][$file], - $traits[$traitName][$file], - ), - ); - } - } - } - - foreach ($filter->files() as $file) { - foreach ($analyser->interfacesIn($file) as $interface) { - $classesThatImplementInterface[$interface->namespacedName()] = []; - } - - foreach ($analyser->classesIn($file) as $class) { - if ($class->isNamespaced()) { - $this->processNamespace($namespaces, $class->namespace(), $file, $class->startLine(), $class->endLine()); - } - - $this->process($classes, $class->namespacedName(), $file, $class->startLine(), $class->endLine()); - - foreach ($class->traits() as $traitName) { - if (!isset($traits[$traitName])) { - continue; - } - - foreach ($traits[$traitName] as $file => $lines) { - if (!isset($classes[$class->namespacedName()][$file])) { - $classes[$class->namespacedName()][$file] = $lines; - - continue; - } - - $classes[$class->namespacedName()][$file] = array_unique( - array_merge( - $classes[$class->namespacedName()][$file], - $lines, - ), - ); - } - } - - $this->processMethods($class, $file, $methods, $reverseLookup); - - $classesThatExtendClass[$class->namespacedName()] = []; - $classDetails[] = $class; - } - - foreach ($analyser->functionsIn($file) as $function) { - if ($function->isNamespaced()) { - $this->processNamespace($namespaces, $function->namespace(), $file, $function->startLine(), $function->endLine()); - } - - $this->process($functions, $function->namespacedName(), $file, $function->startLine(), $function->endLine()); - - foreach (range($function->startLine(), $function->endLine()) as $line) { - $reverseLookup[$file . ':' . $line] = $function->namespacedName(); - } - } - } - - foreach (array_keys($namespaces) as $namespace) { - foreach (array_keys($namespaces[$namespace]) as $file) { - $namespaces[$namespace][$file] = array_unique($namespaces[$namespace][$file]); - } - } - - foreach ($classDetails as $class) { - foreach ($class->interfaces() as $interfaceName) { - if (!isset($classesThatImplementInterface[$interfaceName])) { - continue; - } - - $this->process($classesThatImplementInterface, $interfaceName, $class->file(), $class->startLine(), $class->endLine()); - } - - if (!$class->hasParent()) { - continue; - } - - if (!isset($classesThatExtendClass[$class->parentClass()])) { - continue; - } - - $this->process($classesThatExtendClass, $class->parentClass(), $class->file(), $class->startLine(), $class->endLine()); - } - - foreach (array_keys($classesThatImplementInterface) as $className) { - if ($classesThatImplementInterface[$className] !== []) { - continue; - } - - unset($classesThatImplementInterface[$className]); - } - - foreach (array_keys($classesThatExtendClass) as $className) { - if ($classesThatExtendClass[$className] !== []) { - continue; - } - - unset($classesThatExtendClass[$className]); - } - - return [ - 'namespaces' => $namespaces, - 'traits' => $traits, - 'classes' => $classes, - 'classesThatExtendClass' => $classesThatExtendClass, - 'classesThatImplementInterface' => $classesThatImplementInterface, - 'methods' => $methods, - 'functions' => $functions, - 'reverseLookup' => $reverseLookup, - ]; - } - - private function processMethods(Class_|Trait_ $classOrTrait, string $file, array &$methods, array &$reverseLookup): void - { - foreach ($classOrTrait->methods() as $method) { - $methodName = $classOrTrait->namespacedName() . '::' . $method->name(); - - $this->process($methods, $methodName, $file, $method->startLine(), $method->endLine()); - - foreach (range($method->startLine(), $method->endLine()) as $line) { - $reverseLookup[$file . ':' . $line] = $methodName; - } - } - } - - /** - * @param TargetMapPart $data - * @param non-empty-string $namespace - * @param non-empty-string $file - * @param positive-int $startLine - * @param positive-int $endLine - * - * @param-out TargetMapPart $data - */ - private function processNamespace(array &$data, string $namespace, string $file, int $startLine, int $endLine): void - { - $parts = explode('\\', $namespace); - - foreach (range(1, count($parts)) as $i) { - $this->process($data, implode('\\', array_slice($parts, 0, $i)), $file, $startLine, $endLine); - } - } - - /** - * @param TargetMapPart $data - * @param non-empty-string $unit - * @param non-empty-string $file - * @param positive-int $startLine - * @param positive-int $endLine - * - * @param-out TargetMapPart $data - */ - private function process(array &$data, string $unit, string $file, int $startLine, int $endLine): void - { - if (!isset($data[$unit])) { - $data[$unit] = []; - } - - if (!isset($data[$unit][$file])) { - $data[$unit][$file] = []; - } - - $data[$unit][$file] = array_merge( - $data[$unit][$file], - range($startLine, $endLine), - ); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/Mapper.php b/vendor/phpunit/php-code-coverage/src/Target/Mapper.php deleted file mode 100644 index 27fbe95..0000000 --- a/vendor/phpunit/php-code-coverage/src/Target/Mapper.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -use function array_merge; -use function array_unique; - -/** - * @phpstan-type TargetMap array{namespaces: TargetMapPart, traits: TargetMapPart, classes: TargetMapPart, classesThatExtendClass: TargetMapPart, classesThatImplementInterface: TargetMapPart, methods: TargetMapPart, functions: TargetMapPart, reverseLookup: ReverseLookup} - * @phpstan-type TargetMapPart array>> - * @phpstan-type ReverseLookup array - * - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - * - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class Mapper -{ - /** - * @var TargetMap - */ - private array $map; - - /** - * @param TargetMap $map - */ - public function __construct(array $map) - { - $this->map = $map; - } - - /** - * @return array> - */ - public function mapTargets(TargetCollection $targets): array - { - $result = []; - - foreach ($targets as $target) { - foreach ($this->mapTarget($target) as $file => $lines) { - if (!isset($result[$file])) { - $result[$file] = $lines; - - continue; - } - - $result[$file] = array_unique(array_merge($result[$file], $lines)); - } - } - - return $result; - } - - /** - * @throws InvalidCodeCoverageTargetException - * - * @return array> - */ - public function mapTarget(Target $target): array - { - if (!isset($this->map[$target->key()][$target->target()])) { - throw new InvalidCodeCoverageTargetException($target); - } - - return $this->map[$target->key()][$target->target()]; - } - - /** - * @param non-empty-string $file - * @param positive-int $line - * - * @return non-empty-string - */ - public function lookup(string $file, int $line): string - { - $key = $file . ':' . $line; - - if (isset($this->map['reverseLookup'][$key])) { - return $this->map['reverseLookup'][$key]; - } - - return $key; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/Method.php b/vendor/phpunit/php-code-coverage/src/Target/Method.php deleted file mode 100644 index 0b46ba9..0000000 --- a/vendor/phpunit/php-code-coverage/src/Target/Method.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Method extends Target -{ - /** - * @var class-string - */ - private string $className; - - /** - * @var non-empty-string - */ - private string $methodName; - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - protected function __construct(string $className, string $methodName) - { - $this->className = $className; - $this->methodName = $methodName; - } - - public function isMethod(): true - { - return true; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } - - /** - * @return non-empty-string - */ - public function methodName(): string - { - return $this->methodName; - } - - /** - * @return non-empty-string - */ - public function key(): string - { - return 'methods'; - } - - /** - * @return non-empty-string - */ - public function target(): string - { - return $this->className . '::' . $this->methodName; - } - - /** - * @return non-empty-string - */ - public function description(): string - { - return 'Method ' . $this->target(); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/Namespace_.php b/vendor/phpunit/php-code-coverage/src/Target/Namespace_.php deleted file mode 100644 index 651927d..0000000 --- a/vendor/phpunit/php-code-coverage/src/Target/Namespace_.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Namespace_ extends Target -{ - /** - * @var non-empty-string - */ - private string $namespace; - - /** - * @param non-empty-string $namespace - */ - protected function __construct(string $namespace) - { - $this->namespace = $namespace; - } - - public function isNamespace(): true - { - return true; - } - - /** - * @return non-empty-string - */ - public function namespace(): string - { - return $this->namespace; - } - - /** - * @return non-empty-string - */ - public function key(): string - { - return 'namespaces'; - } - - /** - * @return non-empty-string - */ - public function target(): string - { - return $this->namespace; - } - - /** - * @return non-empty-string - */ - public function description(): string - { - return 'Namespace ' . $this->target(); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/Target.php b/vendor/phpunit/php-code-coverage/src/Target/Target.php deleted file mode 100644 index 7432c81..0000000 --- a/vendor/phpunit/php-code-coverage/src/Target/Target.php +++ /dev/null @@ -1,125 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -abstract class Target -{ - /** - * @param non-empty-string $namespace - */ - public static function forNamespace(string $namespace): Namespace_ - { - return new Namespace_($namespace); - } - - /** - * @param class-string $className - */ - public static function forClass(string $className): Class_ - { - return new Class_($className); - } - - /** - * @param class-string $className - * @param non-empty-string $methodName - */ - public static function forMethod(string $className, string $methodName): Method - { - return new Method($className, $methodName); - } - - /** - * @param class-string $interfaceName - */ - public static function forClassesThatImplementInterface(string $interfaceName): ClassesThatImplementInterface - { - return new ClassesThatImplementInterface($interfaceName); - } - - /** - * @param class-string $className - */ - public static function forClassesThatExtendClass(string $className): ClassesThatExtendClass - { - return new ClassesThatExtendClass($className); - } - - /** - * @param non-empty-string $functionName - */ - public static function forFunction(string $functionName): Function_ - { - return new Function_($functionName); - } - - /** - * @param trait-string $traitName - */ - public static function forTrait(string $traitName): Trait_ - { - return new Trait_($traitName); - } - - public function isNamespace(): bool - { - return false; - } - - public function isClass(): bool - { - return false; - } - - public function isMethod(): bool - { - return false; - } - - public function isClassesThatImplementInterface(): bool - { - return false; - } - - public function isClassesThatExtendClass(): bool - { - return false; - } - - public function isFunction(): bool - { - return false; - } - - public function isTrait(): bool - { - return false; - } - - /** - * @return non-empty-string - */ - abstract public function key(): string; - - /** - * @return non-empty-string - */ - abstract public function target(): string; - - /** - * @return non-empty-string - */ - abstract public function description(): string; -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/TargetCollection.php b/vendor/phpunit/php-code-coverage/src/Target/TargetCollection.php deleted file mode 100644 index ef6e32a..0000000 --- a/vendor/phpunit/php-code-coverage/src/Target/TargetCollection.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -use function count; -use Countable; -use IteratorAggregate; - -/** - * @template-implements IteratorAggregate - * - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class TargetCollection implements Countable, IteratorAggregate -{ - /** - * @var list - */ - private array $targets; - - /** - * @param list $targets - */ - public static function fromArray(array $targets): self - { - return new self(...$targets); - } - - private function __construct(Target ...$targets) - { - $this->targets = $targets; - } - - /** - * @return list - */ - public function asArray(): array - { - return $this->targets; - } - - public function count(): int - { - return count($this->targets); - } - - public function isEmpty(): bool - { - return $this->count() === 0; - } - - public function isNotEmpty(): bool - { - return $this->count() > 0; - } - - public function getIterator(): TargetCollectionIterator - { - return new TargetCollectionIterator($this); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/TargetCollectionIterator.php b/vendor/phpunit/php-code-coverage/src/Target/TargetCollectionIterator.php deleted file mode 100644 index 9a5ca06..0000000 --- a/vendor/phpunit/php-code-coverage/src/Target/TargetCollectionIterator.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -use function count; -use Iterator; - -/** - * @template-implements Iterator - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class TargetCollectionIterator implements Iterator -{ - /** - * @var list - */ - private readonly array $targets; - private int $position = 0; - - public function __construct(TargetCollection $metadata) - { - $this->targets = $metadata->asArray(); - } - - public function rewind(): void - { - $this->position = 0; - } - - public function valid(): bool - { - return $this->position < count($this->targets); - } - - public function key(): int - { - return $this->position; - } - - public function current(): Target - { - return $this->targets[$this->position]; - } - - public function next(): void - { - $this->position++; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/TargetCollectionValidator.php b/vendor/phpunit/php-code-coverage/src/Target/TargetCollectionValidator.php deleted file mode 100644 index 3703414..0000000 --- a/vendor/phpunit/php-code-coverage/src/Target/TargetCollectionValidator.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -use function implode; - -/** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - * - * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class TargetCollectionValidator -{ - public function validate(Mapper $mapper, TargetCollection $targets): ValidationResult - { - $errors = []; - - foreach ($targets as $target) { - try { - $mapper->mapTarget($target); - } catch (InvalidCodeCoverageTargetException $e) { - $errors[] = $e->getMessage(); - } - } - - if ($errors === []) { - return ValidationResult::success(); - } - - return ValidationResult::failure(implode("\n", $errors)); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/Trait_.php b/vendor/phpunit/php-code-coverage/src/Target/Trait_.php deleted file mode 100644 index a698a18..0000000 --- a/vendor/phpunit/php-code-coverage/src/Target/Trait_.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final class Trait_ extends Target -{ - /** - * @var trait-string - */ - private string $traitName; - - /** - * @param trait-string $traitName - */ - protected function __construct(string $traitName) - { - $this->traitName = $traitName; - } - - public function isTrait(): true - { - return true; - } - - /** - * @return trait-string - */ - public function traitName(): string - { - return $this->traitName; - } - - /** - * @return non-empty-string - */ - public function key(): string - { - return 'traits'; - } - - /** - * @return non-empty-string - */ - public function target(): string - { - return $this->traitName; - } - - /** - * @return non-empty-string - */ - public function description(): string - { - return 'Trait ' . $this->target(); - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/ValidationFailure.php b/vendor/phpunit/php-code-coverage/src/Target/ValidationFailure.php deleted file mode 100644 index e43791f..0000000 --- a/vendor/phpunit/php-code-coverage/src/Target/ValidationFailure.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -final readonly class ValidationFailure extends ValidationResult -{ - /** - * @var non-empty-string - */ - private string $message; - - /** - * @param non-empty-string $message - * - * @noinspection PhpMissingParentConstructorInspection - */ - protected function __construct(string $message) - { - $this->message = $message; - } - - public function isFailure(): true - { - return true; - } - - /** - * @return non-empty-string - */ - public function message(): string - { - return $this->message; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Target/ValidationResult.php b/vendor/phpunit/php-code-coverage/src/Target/ValidationResult.php deleted file mode 100644 index 7dc0cc5..0000000 --- a/vendor/phpunit/php-code-coverage/src/Target/ValidationResult.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace SebastianBergmann\CodeCoverage\Test\Target; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage - */ -abstract readonly class ValidationResult -{ - public static function success(): ValidationSuccess - { - return new ValidationSuccess; - } - - /** - * @param non-empty-string $message - */ - public static function failure(string $message): ValidationFailure - { - return new ValidationFailure($message); - } - - protected function __construct() - { - } - - /** - * @phpstan-assert-if-true ValidationSuccess $this - */ - public function isSuccess(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true ValidationFailure $this - */ - public function isFailure(): bool - { - return false; - } -} diff --git a/vendor/phpunit/php-code-coverage/src/Util/Percentage.php b/vendor/phpunit/php-code-coverage/src/Util/Percentage.php index 1de640f..a69f236 100644 --- a/vendor/phpunit/php-code-coverage/src/Util/Percentage.php +++ b/vendor/phpunit/php-code-coverage/src/Util/Percentage.php @@ -14,10 +14,10 @@ use function sprintf; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ -final readonly class Percentage +final class Percentage { - private float $fraction; - private float $total; + private readonly float $fraction; + private readonly float $total; public static function fromFractionAndTotal(float $fraction, float $total): self { diff --git a/vendor/phpunit/php-code-coverage/src/Version.php b/vendor/phpunit/php-code-coverage/src/Version.php index df7c227..4c6a045 100644 --- a/vendor/phpunit/php-code-coverage/src/Version.php +++ b/vendor/phpunit/php-code-coverage/src/Version.php @@ -19,7 +19,7 @@ final class Version public static function id(): string { if (self::$version === '') { - self::$version = (new VersionId('12.0', dirname(__DIR__)))->asString(); + self::$version = (new VersionId('11.0.8', dirname(__DIR__)))->asString(); } return self::$version; diff --git a/vendor/phpunit/php-file-iterator/ChangeLog.md b/vendor/phpunit/php-file-iterator/ChangeLog.md index 0a96870..bc3d870 100644 --- a/vendor/phpunit/php-file-iterator/ChangeLog.md +++ b/vendor/phpunit/php-file-iterator/ChangeLog.md @@ -2,12 +2,6 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -## [6.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - ## [5.1.0] - 2024-08-27 ### Added @@ -174,7 +168,6 @@ No changes * [#23](https://github.com/sebastianbergmann/php-file-iterator/pull/23): Added support for wildcards (glob) in exclude -[6.0.0]: https://github.com/sebastianbergmann/php-file-iterator/compare/5.1...main [5.1.0]: https://github.com/sebastianbergmann/php-file-iterator/compare/5.0.1...5.1.0 [5.0.1]: https://github.com/sebastianbergmann/php-file-iterator/compare/5.0.0...5.0.1 [5.0.0]: https://github.com/sebastianbergmann/php-file-iterator/compare/4.1...5.0.0 diff --git a/vendor/phpunit/php-file-iterator/LICENSE b/vendor/phpunit/php-file-iterator/LICENSE index 017eb48..89f0530 100644 --- a/vendor/phpunit/php-file-iterator/LICENSE +++ b/vendor/phpunit/php-file-iterator/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2009-2025, Sebastian Bergmann +Copyright (c) 2009-2024, Sebastian Bergmann All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/phpunit/php-file-iterator/composer.json b/vendor/phpunit/php-file-iterator/composer.json index c21c615..525526d 100644 --- a/vendor/phpunit/php-file-iterator/composer.json +++ b/vendor/phpunit/php-file-iterator/composer.json @@ -21,18 +21,17 @@ }, "config": { "platform": { - "php": "8.3.0" + "php": "8.2.0" }, "optimize-autoloader": true, "sort-packages": true }, "prefer-stable": true, - "minimum-stability": "dev", "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^11.0" }, "autoload": { "classmap": [ @@ -41,7 +40,7 @@ }, "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "5.0-dev" } } } diff --git a/vendor/phpunit/php-file-iterator/src/Factory.php b/vendor/phpunit/php-file-iterator/src/Factory.php index da53df9..1b50128 100644 --- a/vendor/phpunit/php-file-iterator/src/Factory.php +++ b/vendor/phpunit/php-file-iterator/src/Factory.php @@ -37,8 +37,6 @@ final class Factory * @param list|string $suffixes * @param list|string $prefixes * @param list $exclude - * - * @phpstan-ignore missingType.generics */ public function getFileIterator(array|string $paths, array|string $suffixes = '', array|string $prefixes = '', array $exclude = []): AppendIterator { @@ -115,7 +113,7 @@ final class Factory * * @return list */ - private function globstar(string $pattern): array + private function globstar(string $pattern) { if (stripos($pattern, '**') === false) { $files = glob($pattern, GLOB_ONLYDIR); @@ -127,24 +125,23 @@ final class Factory $patterns = [$rootPattern . $restPattern]; $rootPattern .= '/*'; - while ($directories = glob($rootPattern, GLOB_ONLYDIR)) { + while ($dirs = glob($rootPattern, GLOB_ONLYDIR)) { $rootPattern .= '/*'; - foreach ($directories as $directory) { - $patterns[] = $directory . $restPattern; + foreach ($dirs as $dir) { + $patterns[] = $dir . $restPattern; } } $files = []; - foreach ($patterns as $_pattern) { - $files = array_merge($files, $this->globstar($_pattern)); + foreach ($patterns as $pat) { + $files = array_merge($files, $this->globstar($pat)); } } if ($files !== false) { $files = array_unique($files); - sort($files); return $files; diff --git a/vendor/phpunit/php-file-iterator/src/Iterator.php b/vendor/phpunit/php-file-iterator/src/Iterator.php index b29f235..405f25d 100644 --- a/vendor/phpunit/php-file-iterator/src/Iterator.php +++ b/vendor/phpunit/php-file-iterator/src/Iterator.php @@ -9,6 +9,7 @@ */ namespace SebastianBergmann\FileIterator; +use function assert; use function preg_match; use function realpath; use function str_ends_with; @@ -24,8 +25,8 @@ use SplFileInfo; */ final class Iterator extends FilterIterator { - public const int PREFIX = 0; - public const int SUFFIX = 1; + public const PREFIX = 0; + public const SUFFIX = 1; private false|string $basePath; /** @@ -55,6 +56,8 @@ final class Iterator extends FilterIterator { $current = $this->getInnerIterator()->current(); + assert($current instanceof SplFileInfo); + $filename = $current->getFilename(); $realPath = $current->getRealPath(); diff --git a/vendor/phpunit/php-invoker/ChangeLog.md b/vendor/phpunit/php-invoker/ChangeLog.md index 4bc165c..36daa30 100644 --- a/vendor/phpunit/php-invoker/ChangeLog.md +++ b/vendor/phpunit/php-invoker/ChangeLog.md @@ -2,12 +2,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. -## [6.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - ## [5.0.1] - 2024-07-03 ### Changed @@ -65,7 +59,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * This component is no longer supported on PHP 7.1 and PHP 7.2 -[6.0.0]: https://github.com/sebastianbergmann/php-invoker/compare/5.0...main [5.0.1]: https://github.com/sebastianbergmann/php-invoker/compare/5.0.1...5.0.1 [5.0.0]: https://github.com/sebastianbergmann/php-invoker/compare/4.0...5.0.0 [4.0.0]: https://github.com/sebastianbergmann/php-invoker/compare/3.1.1...4.0.0 diff --git a/vendor/phpunit/php-invoker/LICENSE b/vendor/phpunit/php-invoker/LICENSE index 9d94d32..ecc634d 100644 --- a/vendor/phpunit/php-invoker/LICENSE +++ b/vendor/phpunit/php-invoker/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2011-2025, Sebastian Bergmann +Copyright (c) 2011-2024, Sebastian Bergmann All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/phpunit/php-invoker/README.md b/vendor/phpunit/php-invoker/README.md index aedc339..f85a87d 100644 --- a/vendor/phpunit/php-invoker/README.md +++ b/vendor/phpunit/php-invoker/README.md @@ -1,6 +1,6 @@ # phpunit/php-invoker -[![Latest Stable Version](https://poser.pugx.org/phpunit/php-invoker/v)](https://packagist.org/packages/phpunit/php-invoker) +[![Latest Stable Version](https://poser.pugx.org/phpunit/php-invoker/v/stable.png)](https://packagist.org/packages/phpunit/php-invoker) [![CI Status](https://github.com/sebastianbergmann/php-invoker/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/php-invoker/actions) [![codecov](https://codecov.io/gh/sebastianbergmann/php-invoker/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/php-invoker) diff --git a/vendor/phpunit/php-invoker/composer.json b/vendor/phpunit/php-invoker/composer.json index ade7389..cbe9e8e 100644 --- a/vendor/phpunit/php-invoker/composer.json +++ b/vendor/phpunit/php-invoker/composer.json @@ -18,21 +18,20 @@ "issues": "https://github.com/sebastianbergmann/php-invoker/issues", "security": "https://github.com/sebastianbergmann/php-invoker/security/policy" }, - "minimum-stability": "dev", "prefer-stable": true, "config": { "platform": { - "php": "8.3.0" + "php": "8.2.0" }, "optimize-autoloader": true, "sort-packages": true }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, "autoload": { "classmap": [ @@ -49,7 +48,7 @@ }, "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "5.0-dev" } } } diff --git a/vendor/phpunit/php-invoker/src/exceptions/ProcessControlExtensionNotLoadedException.php b/vendor/phpunit/php-invoker/src/exceptions/ProcessControlExtensionNotLoadedException.php index 7f410d3..c864982 100644 --- a/vendor/phpunit/php-invoker/src/exceptions/ProcessControlExtensionNotLoadedException.php +++ b/vendor/phpunit/php-invoker/src/exceptions/ProcessControlExtensionNotLoadedException.php @@ -9,7 +9,6 @@ */ namespace SebastianBergmann\Invoker; -use const PHP_EOL; use function extension_loaded; use function function_exists; use function implode; diff --git a/vendor/phpunit/php-text-template/ChangeLog.md b/vendor/phpunit/php-text-template/ChangeLog.md index 527f5ba..bf2e049 100644 --- a/vendor/phpunit/php-text-template/ChangeLog.md +++ b/vendor/phpunit/php-text-template/ChangeLog.md @@ -2,12 +2,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. -## [5.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - ## [4.0.1] - 2024-07-03 ### Changed @@ -67,7 +61,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * Removed support for PHP 5.3, PHP 5.4, PHP 5.5, PHP 5.6, PHP 7.0, PHP 7.1, and PHP 7.2 -[5.0.0]: https://github.com/sebastianbergmann/php-text-template/compare/4.0...main [4.0.1]: https://github.com/sebastianbergmann/php-text-template/compare/4.0.0...4.0.1 [4.0.0]: https://github.com/sebastianbergmann/php-text-template/compare/3.0...4.0.0 [3.0.1]: https://github.com/sebastianbergmann/php-text-template/compare/3.0.0...3.0.1 diff --git a/vendor/phpunit/php-text-template/LICENSE b/vendor/phpunit/php-text-template/LICENSE index 017eb48..89f0530 100644 --- a/vendor/phpunit/php-text-template/LICENSE +++ b/vendor/phpunit/php-text-template/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2009-2025, Sebastian Bergmann +Copyright (c) 2009-2024, Sebastian Bergmann All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/phpunit/php-text-template/README.md b/vendor/phpunit/php-text-template/README.md index 009d546..6301593 100644 --- a/vendor/phpunit/php-text-template/README.md +++ b/vendor/phpunit/php-text-template/README.md @@ -1,4 +1,4 @@ -[![Latest Stable Version](https://poser.pugx.org/phpunit/php-text-template/v)](https://packagist.org/packages/phpunit/php-text-template) +[![Latest Stable Version](https://poser.pugx.org/phpunit/php-text-template/v/stable.png)](https://packagist.org/packages/phpunit/php-text-template) [![CI Status](https://github.com/sebastianbergmann/php-text-template/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/php-text-template/actions) [![codecov](https://codecov.io/gh/sebastianbergmann/php-text-template/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/php-text-template) diff --git a/vendor/phpunit/php-text-template/composer.json b/vendor/phpunit/php-text-template/composer.json index 1bb365b..0f47249 100644 --- a/vendor/phpunit/php-text-template/composer.json +++ b/vendor/phpunit/php-text-template/composer.json @@ -20,18 +20,17 @@ }, "config": { "platform": { - "php": "8.3.0" + "php": "8.2.0" }, "optimize-autoloader": true, "sort-packages": true }, - "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, "autoload": { "classmap": [ @@ -40,7 +39,7 @@ }, "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "4.0-dev" } } } diff --git a/vendor/phpunit/php-timer/ChangeLog.md b/vendor/phpunit/php-timer/ChangeLog.md index be6a355..5348875 100644 --- a/vendor/phpunit/php-timer/ChangeLog.md +++ b/vendor/phpunit/php-timer/ChangeLog.md @@ -2,12 +2,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. -## [8.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.1 - ## [7.0.1] - 2024-07-03 ### Changed @@ -145,7 +139,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * This component is no longer supported on PHP 5.3, PHP 5.4, PHP 5.5, PHP 5.6, and PHP 7.0 -[8.0.0]: https://github.com/sebastianbergmann/php-timer/compare/7.0...main [7.0.1]: https://github.com/sebastianbergmann/php-timer/compare/7.0.0...7.0.1 [7.0.0]: https://github.com/sebastianbergmann/php-timer/compare/6.0...7.0.0 [6.0.0]: https://github.com/sebastianbergmann/php-timer/compare/5.0.3...6.0.0 diff --git a/vendor/phpunit/php-timer/LICENSE b/vendor/phpunit/php-timer/LICENSE index fd52ce6..60a032d 100644 --- a/vendor/phpunit/php-timer/LICENSE +++ b/vendor/phpunit/php-timer/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2010-2025, Sebastian Bergmann +Copyright (c) 2010-2024, Sebastian Bergmann All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/phpunit/php-timer/README.md b/vendor/phpunit/php-timer/README.md index bc9157c..ae0d5a3 100644 --- a/vendor/phpunit/php-timer/README.md +++ b/vendor/phpunit/php-timer/README.md @@ -1,6 +1,6 @@ # phpunit/php-timer -[![Latest Stable Version](https://poser.pugx.org/phpunit/php-timer/v)](https://packagist.org/packages/phpunit/php-timer) +[![Latest Stable Version](https://poser.pugx.org/phpunit/php-timer/v/stable.png)](https://packagist.org/packages/phpunit/php-timer) [![CI Status](https://github.com/sebastianbergmann/php-timer/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/php-timer/actions) [![codecov](https://codecov.io/gh/sebastianbergmann/php-timer/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/php-timer) diff --git a/vendor/phpunit/php-timer/composer.json b/vendor/phpunit/php-timer/composer.json index a3ece84..f4991e4 100644 --- a/vendor/phpunit/php-timer/composer.json +++ b/vendor/phpunit/php-timer/composer.json @@ -18,17 +18,16 @@ "issues": "https://github.com/sebastianbergmann/php-timer/issues", "security": "https://github.com/sebastianbergmann/php-timer/security/policy" }, - "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, "config": { "platform": { - "php": "8.3.0" + "php": "8.2.0" }, "optimize-autoloader": true, "sort-packages": true @@ -40,7 +39,7 @@ }, "extra": { "branch-alias": { - "dev-main": "8.0-dev" + "dev-main": "7.0-dev" } } } diff --git a/vendor/phpunit/php-timer/src/ResourceUsageFormatter.php b/vendor/phpunit/php-timer/src/ResourceUsageFormatter.php index f797bc0..e26ea62 100644 --- a/vendor/phpunit/php-timer/src/ResourceUsageFormatter.php +++ b/vendor/phpunit/php-timer/src/ResourceUsageFormatter.php @@ -19,7 +19,7 @@ final class ResourceUsageFormatter /** * @var array */ - private const array SIZES = [ + private const SIZES = [ 'GB' => 1073741824, 'MB' => 1048576, 'KB' => 1024, diff --git a/vendor/phpunit/phpunit/.phpunit.result.cache b/vendor/phpunit/phpunit/.phpunit.result.cache new file mode 100644 index 0000000..972a1b3 --- /dev/null +++ b/vendor/phpunit/phpunit/.phpunit.result.cache @@ -0,0 +1 @@ +{"version":1,"defects":[],"times":{"goodboyalex\\php_components_pack\\tests\\classes\\ObjectArrayTest::testSort":0.01,"goodboyalex\\php_components_pack\\tests\\classes\\ObjectArrayTest::testSearch":0,"goodboyalex\\php_components_pack\\tests\\classes\\ObjectArrayTest::testGetRows":0.001,"goodboyalex\\php_components_pack\\tests\\classes\\ObjectArrayTest::testGetValue":0.002,"goodboyalex\\php_components_pack\\tests\\classes\\ObjectArrayTest::testCount":0.001,"goodboyalex\\php_components_pack\\tests\\classes\\ObjectArrayTest::testDelete":0,"goodboyalex\\php_components_pack\\tests\\classes\\ObjectArrayTest::testClear":0.001,"goodboyalex\\php_components_pack\\tests\\classes\\ObjectArrayTest::testMerge":0,"goodboyalex\\php_components_pack\\tests\\classes\\ObjectArrayTest::testMaxBy":0,"goodboyalex\\php_components_pack\\tests\\classes\\ObjectArrayTest::testGetColumn":0.002,"goodboyalex\\php_components_pack\\tests\\classes\\ObjectArrayTest::testToArray":0,"goodboyalex\\php_components_pack\\tests\\classes\\ObjectArrayTest::testMinBy":0,"goodboyalex\\php_components_pack\\tests\\classes\\ObjectArrayTest::testIsExist":0.001,"goodboyalex\\php_components_pack\\tests\\classes\\ObjectArrayTest::testUpdate":0.001,"goodboyalex\\php_components_pack\\tests\\classes\\ObjectArrayTest::testGetRow":0.002}} \ No newline at end of file diff --git a/vendor/phpunit/phpunit/ChangeLog-11.5.md b/vendor/phpunit/phpunit/ChangeLog-11.5.md new file mode 100644 index 0000000..b36718d --- /dev/null +++ b/vendor/phpunit/phpunit/ChangeLog-11.5.md @@ -0,0 +1,97 @@ +# Changes in PHPUnit 11.5 + +All notable changes of the PHPUnit 11.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. + +## [11.5.6] - 2025-01-31 + +### Changed + +* [#6112](https://github.com/sebastianbergmann/phpunit/pull/6112): Improve performance of `SourceMapper` + +### Fixed + +* [#6115](https://github.com/sebastianbergmann/phpunit/issues/6115): Backed enumerations with values not of type `string` cannot be used in customized TestDox output + +## [11.5.5] - 2025-01-29 + +### Changed + +* Do not skip execution of test that depends on a test that is larger than itself + +## [11.5.4] - 2025-01-28 + +### Changed + +* [#5958](https://github.com/sebastianbergmann/phpunit/issues/5958): Support for `#[CoversTrait]` and `#[UsesTrait]` attributes is no longer deprecated +* [#5960](https://github.com/sebastianbergmann/phpunit/issues/5960): Support for targeting trait methods with the `#[CoversMethod]` and `#[UsesMethod]` attributes is no longer deprecated + +### Fixed + +* [#6103](https://github.com/sebastianbergmann/phpunit/issues/6103): Output from test run in separate process is printed twice +* [#6109](https://github.com/sebastianbergmann/phpunit/issues/6109): Skipping a test in a before-class method crashes JUnit XML logger +* [#6111](https://github.com/sebastianbergmann/phpunit/issues/6111): Deprecations cause `SourceMapper` to scan all `` files + +## [11.5.3] - 2025-01-13 + +### Added + +* `Test\AfterLastTestMethodErrored`, `Test\AfterTestMethodErrored`, `Test\BeforeTestMethodErrored`, `Test\PostConditionErrored`, and `Test\PreConditionErrored` events + +### Fixed + +* [#6093](https://github.com/sebastianbergmann/phpunit/issues/6093): Test Double Code Generator does not work when PHPUnit is used from PHAR on PHP 8.4 +* [#6094](https://github.com/sebastianbergmann/phpunit/issues/6094): Errors in after-last-test methods are not reported +* [#6095](https://github.com/sebastianbergmann/phpunit/issues/6095): Expectation is not counted correctly when a doubled method is called more often than is expected +* [#6096](https://github.com/sebastianbergmann/phpunit/issues/6096): `--list-tests-xml` is broken when a group with a numeric name is defined +* [#6098](https://github.com/sebastianbergmann/phpunit/issues/6098): No `system-out` element in JUnit XML logfile +* [#6100](https://github.com/sebastianbergmann/phpunit/issues/6100): Suppressed deprecations incorrectly stop test execution when execution should be stopped on deprecation + +## [11.5.2] - 2024-12-21 + +### Fixed + +* [#6082](https://github.com/sebastianbergmann/phpunit/issues/6082): `assertArrayHasKey()`, `assertArrayNotHasKey()`, `arrayHasKey()`, and `ArrayHasKey::__construct()` do not support all possible key types +* [#6087](https://github.com/sebastianbergmann/phpunit/issues/6087): `--migrate-configuration` does not remove `beStrictAboutTodoAnnotatedTests` attribute from XML configuration file + +## [11.5.1] - 2024-12-11 + +### Added + +* [#6081](https://github.com/sebastianbergmann/phpunit/pull/6081): `DefaultResultCache::mergeWith()` for merging result cache instances + +### Fixed + +* [#6066](https://github.com/sebastianbergmann/phpunit/pull/6066): TeamCity logger does not handle error/skipped events in before-class methods correctly + +## [11.5.0] - 2024-12-06 + +### Added + +* [#5948](https://github.com/sebastianbergmann/phpunit/pull/5948): Support for Property Hooks in Test Doubles +* [#5954](https://github.com/sebastianbergmann/phpunit/issues/5954): Provide a way to stop execution at a particular deprecation +* Method `assertContainsNotOnlyInstancesOf()` in the `PHPUnit\Framework\Assert` class as the inverse of the `assertContainsOnlyInstancesOf()` method +* Methods `assertContainsOnlyArray()`, `assertContainsOnlyBool()`, `assertContainsOnlyCallable()`, `assertContainsOnlyFloat()`, `assertContainsOnlyInt()`, `assertContainsOnlyIterable()`, `assertContainsOnlyNull()`, `assertContainsOnlyNumeric()`, `assertContainsOnlyObject()`, `assertContainsOnlyResource()`, `assertContainsOnlyClosedResource()`, `assertContainsOnlyScalar()`, and `assertContainsOnlyString()` in the `PHPUnit\Framework\Assert` class as specialized alternatives for the generic `assertContainsOnly()` method +* Methods `assertContainsNotOnlyArray()`, `assertContainsNotOnlyBool()`, `assertContainsNotOnlyCallable()`, `assertContainsNotOnlyFloat()`, `assertContainsNotOnlyInt()`, `assertContainsNotOnlyIterable()`, `assertContainsNotOnlyNull()`, `assertContainsNotOnlyNumeric()`, `assertContainsNotOnlyObject()`, `assertContainsNotOnlyResource()`, `assertContainsNotOnlyClosedResource()`, `assertContainsNotOnlyScalar()`, and `assertContainsNotOnlyString()` in the `PHPUnit\Framework\Assert` class as specialized alternatives for the generic `assertNotContainsOnly()` method +* Methods `containsOnlyArray()`, `containsOnlyBool()`, `containsOnlyCallable()`, `containsOnlyFloat()`, `containsOnlyInt()`, `containsOnlyIterable()`, `containsOnlyNull()`, `containsOnlyNumeric()`, `containsOnlyObject()`, `containsOnlyResource()`, `containsOnlyClosedResource()`, `containsOnlyScalar()`, and `containsOnlyString()` in the `PHPUnit\Framework\Assert` class as specialized alternatives for the generic `containsOnly()` method +* Methods `isArray()`, `isBool()`, `isCallable()`, `isFloat()`, `isInt()`, `isIterable()`, `isNumeric()`, `isObject()`, `isResource()`, `isClosedResource()`, `isScalar()`, `isString()` in the `PHPUnit\Framework\Assert` class as specialized alternatives for the generic `isType()` method +* `TestRunner\ChildProcessStarted` and `TestRunner\ChildProcessFinished` events + +### Changed + +* [#5998](https://github.com/sebastianbergmann/phpunit/pull/5998): Do not run `SKIPIF` section of PHPT test in separate process when it is free of side effects +* [#5999](https://github.com/sebastianbergmann/phpunit/pull/5999): Do not run `CLEAN` section of PHPT test in separate process when it is free of side effects that modify the parent process + +### Deprecated + +* [#6052](https://github.com/sebastianbergmann/phpunit/issues/6052): `isType()` (use `isArray()`, `isBool()`, `isCallable()`, `isFloat()`, `isInt()`, `isIterable()`, `isNull()`, `isNumeric()`, `isObject()`, `isResource()`, `isClosedResource()`, `isScalar()`, or `isString()` instead) +* [#6055](https://github.com/sebastianbergmann/phpunit/issues/6055): `assertContainsOnly()` (use `assertContainsOnlyArray()`, `assertContainsOnlyBool()`, `assertContainsOnlyCallable()`, `assertContainsOnlyFloat()`, `assertContainsOnlyInt()`, `assertContainsOnlyIterable()`, `assertContainsOnlyNumeric()`, `assertContainsOnlyObject()`, `assertContainsOnlyResource()`, `assertContainsOnlyClosedResource()`, `assertContainsOnlyScalar()`, or `assertContainsOnlyString()` instead) +* [#6055](https://github.com/sebastianbergmann/phpunit/issues/6055): `assertNotContainsOnly()` (use `assertContainsNotOnlyArray()`, `assertContainsNotOnlyBool()`, `assertContainsNotOnlyCallable()`, `assertContainsNotOnlyFloat()`, `assertContainsNotOnlyInt()`, `assertContainsNotOnlyIterable()`, `assertContainsNotOnlyNumeric()`, `assertContainsNotOnlyObject()`, `assertContainsNotOnlyResource()`, `assertContainsNotOnlyClosedResource()`, `assertContainsNotOnlyScalar()`, or `assertContainsNotOnlyString()` instead) +* [#6059](https://github.com/sebastianbergmann/phpunit/issues/6059): `containsOnly()` (use `containsOnlyArray()`, `containsOnlyBool()`, `containsOnlyCallable()`, `containsOnlyFloat()`, `containsOnlyInt()`, `containsOnlyIterable()`, `containsOnlyNumeric()`, `containsOnlyObject()`, `containsOnlyResource()`, `containsOnlyClosedResource()`, `containsOnlyScalar()`, or `containsOnlyString()` instead) + +[11.5.6]: https://github.com/sebastianbergmann/phpunit/compare/11.5.5...11.5.6 +[11.5.5]: https://github.com/sebastianbergmann/phpunit/compare/11.5.4...11.5.5 +[11.5.4]: https://github.com/sebastianbergmann/phpunit/compare/11.5.3...11.5.4 +[11.5.3]: https://github.com/sebastianbergmann/phpunit/compare/11.5.2...11.5.3 +[11.5.2]: https://github.com/sebastianbergmann/phpunit/compare/11.5.1...11.5.2 +[11.5.1]: https://github.com/sebastianbergmann/phpunit/compare/11.5.0...11.5.1 +[11.5.0]: https://github.com/sebastianbergmann/phpunit/compare/11.4.4...11.5.0 diff --git a/vendor/phpunit/phpunit/ChangeLog-12.0.md b/vendor/phpunit/phpunit/ChangeLog-12.0.md deleted file mode 100644 index 42fc04a..0000000 --- a/vendor/phpunit/phpunit/ChangeLog-12.0.md +++ /dev/null @@ -1,52 +0,0 @@ -# Changes in PHPUnit 12.0 - -All notable changes of the PHPUnit 12.0 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. - -## [12.0.0] - 2025-02-07 - -### Added - -* [#5984](https://github.com/sebastianbergmann/phpunit/issues/5984): `#[CoversClassesThatExtendClass]` and `#[UsesClassesThatExtendClass]` -* [#5985](https://github.com/sebastianbergmann/phpunit/issues/5985): `#[CoversClassesThatImplementInterface]` and `#[UsesClassesThatImplementInterface]` -* [#6073](https://github.com/sebastianbergmann/phpunit/issues/6073): `#[CoversNamespace]` and `#[UsesNamespace]` -* [#6074](https://github.com/sebastianbergmann/phpunit/pull/6074): `#[RequiresEnvironmentVariable]` - -### Changed - -* [#5872](https://github.com/sebastianbergmann/phpunit/issues/5872): The default value for `shortenArraysForExportThreshold` is now `10` (limit export of arrays to 10 levels) instead of `0` (do not limit export of arrays) - -### Deprecated - -* [#6053](https://github.com/sebastianbergmann/phpunit/issues/6053): `Assert::isType()` (was soft-deprecated in PHPUnit 11.5) -* [#6056](https://github.com/sebastianbergmann/phpunit/issues/6056): `assertContainsOnly()` (was soft-deprecated in PHPUnit 11.5) -* [#6056](https://github.com/sebastianbergmann/phpunit/issues/6056): `assertNotContainsOnly()` (was soft-deprecated in PHPUnit 11.5) -* [#6060](https://github.com/sebastianbergmann/phpunit/issues/6060): `containsOnly()` (was soft-deprecated in PHPUnit 11.5) - -### Removed - -* [#5215](https://github.com/sebastianbergmann/phpunit/issues/5215): `TestCase::iniSet()` -* [#5217](https://github.com/sebastianbergmann/phpunit/issues/5217): `TestCase::setLocale()` -* [#5246](https://github.com/sebastianbergmann/phpunit/issues/5246): `TestCase::createTestProxy()` -* [#5247](https://github.com/sebastianbergmann/phpunit/issues/5247): `TestCase::getMockForAbstractClass()` -* [#5248](https://github.com/sebastianbergmann/phpunit/issues/5248): `TestCase::getMockFromWsdl()` -* [#5249](https://github.com/sebastianbergmann/phpunit/issues/5249): `TestCase::getMockForTrait()` -* [#5250](https://github.com/sebastianbergmann/phpunit/issues/5250): `TestCase::getObjectForTrait()` -* [#5310](https://github.com/sebastianbergmann/phpunit/issues/5310): `MockBuilder::enableAutoload()` and `MockBuilder::disableAutoload()` -* [#5311](https://github.com/sebastianbergmann/phpunit/issues/5311): `MockBuilder::allowMockingUnknownTypes()` and `MockBuilder::disallowMockingUnknownTypes()` -* [#5312](https://github.com/sebastianbergmann/phpunit/issues/5312): `MockBuilder::enableProxyingToOriginalMethods()`, `MockBuilder::disableProxyingToOriginalMethods()`, and `MockBuilder::setProxyTarget()` -* [#5313](https://github.com/sebastianbergmann/phpunit/issues/5313): `MockBuilder::getMockForTrait()` -* [#5314](https://github.com/sebastianbergmann/phpunit/issues/5314): `MockBuilder::getMockForAbstractClass()` -* [#5316](https://github.com/sebastianbergmann/phpunit/issues/5316): `MockBuilder::enableArgumentCloning()` and `MockBuilder::disableArgumentCloning()` -* [#5321](https://github.com/sebastianbergmann/phpunit/issues/5321): `MockBuilder::addMethods()` -* [#5416](https://github.com/sebastianbergmann/phpunit/issues/5416): Support for doubling interfaces (or classes) that have a method named `method` -* [#5424](https://github.com/sebastianbergmann/phpunit/issues/5424): `TestCase` methods for creating return stub configuration objects -* [#5473](https://github.com/sebastianbergmann/phpunit/issues/5473): `assertStringNotMatchesFormat()` and `assertStringNotMatchesFormatFile()` -* [#5536](https://github.com/sebastianbergmann/phpunit/issues/5536): Support for configuring expectations using `expects()` on test stubs -* [#5541](https://github.com/sebastianbergmann/phpunit/issues/5541): Support for metadata in doc-comments -* [#5710](https://github.com/sebastianbergmann/phpunit/issues/5710): Support for using comma-separated values with the `--group`, `--exclude-group`, `--covers`, `--uses`, and `--test-suffix` CLI options -* [#5756](https://github.com/sebastianbergmann/phpunit/issues/5756): Support for the `restrictDeprecations` attribute on the `` element of the XML configuration file -* [#5801](https://github.com/sebastianbergmann/phpunit/issues/5801): Support for targeting traits with `#[CoversClass]` and `#[UsesClass]` attributes -* [#5952](https://github.com/sebastianbergmann/phpunit/issues/5952): `includeUncoveredFiles` configuration option -* [#5978](https://github.com/sebastianbergmann/phpunit/issues/5978): Support for PHP 8.2 - -[12.0.0]: https://github.com/sebastianbergmann/phpunit/compare/11.5...main diff --git a/vendor/phpunit/phpunit/DEPRECATIONS.md b/vendor/phpunit/phpunit/DEPRECATIONS.md index e9e015a..6319da8 100644 --- a/vendor/phpunit/phpunit/DEPRECATIONS.md +++ b/vendor/phpunit/phpunit/DEPRECATIONS.md @@ -8,6 +8,66 @@ This functionality is currently [hard-deprecated](https://phpunit.de/backward-co #### Assertions, Constraints, and Expectations +| Issue | Description | Since | Replacement | +|-------------------------------------------------------------------|----------------------------------------------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [#5472](https://github.com/sebastianbergmann/phpunit/issues/5472) | `Assert::assertStringNotMatchesFormat()` | 10.4.0 | | +| [#5472](https://github.com/sebastianbergmann/phpunit/issues/5472) | `Assert::assertStringNotMatchesFormatFile()` | 10.4.0 | | + +#### Test Double API + +| Issue | Description | Since | Replacement | +|-------------------------------------------------------------------|--------------------------------------------------------------------------------|--------|-----------------------------------------------------------------------------------------| +| [#5240](https://github.com/sebastianbergmann/phpunit/issues/5240) | `TestCase::createTestProxy()` | 10.1.0 | | +| [#5241](https://github.com/sebastianbergmann/phpunit/issues/5241) | `TestCase::getMockForAbstractClass()` | 10.1.0 | | +| [#5242](https://github.com/sebastianbergmann/phpunit/issues/5242) | `TestCase::getMockFromWsdl()` | 10.1.0 | | +| [#5243](https://github.com/sebastianbergmann/phpunit/issues/5243) | `TestCase::getMockForTrait()` | 10.1.0 | | +| [#5244](https://github.com/sebastianbergmann/phpunit/issues/5244) | `TestCase::getObjectForTrait()` | 10.1.0 | | +| [#5305](https://github.com/sebastianbergmann/phpunit/issues/5305) | `MockBuilder::getMockForAbstractClass()` | 10.1.0 | | +| [#5306](https://github.com/sebastianbergmann/phpunit/issues/5306) | `MockBuilder::getMockForTrait()` | 10.1.0 | | +| [#5307](https://github.com/sebastianbergmann/phpunit/issues/5307) | `MockBuilder::disableProxyingToOriginalMethods()` | 10.1.0 | | +| [#5307](https://github.com/sebastianbergmann/phpunit/issues/5307) | `MockBuilder::enableProxyingToOriginalMethods()` | 10.1.0 | | +| [#5307](https://github.com/sebastianbergmann/phpunit/issues/5307) | `MockBuilder::setProxyTarget()` | 10.1.0 | | +| [#5308](https://github.com/sebastianbergmann/phpunit/issues/5308) | `MockBuilder::allowMockingUnknownTypes()` | 10.1.0 | | +| [#5308](https://github.com/sebastianbergmann/phpunit/issues/5308) | `MockBuilder::disallowMockingUnknownTypes()` | 10.1.0 | | +| [#5309](https://github.com/sebastianbergmann/phpunit/issues/5309) | `MockBuilder::disableAutoload()` | 10.1.0 | | +| [#5309](https://github.com/sebastianbergmann/phpunit/issues/5309) | `MockBuilder::enableAutoload()` | 10.1.0 | | +| [#5315](https://github.com/sebastianbergmann/phpunit/issues/5315) | `MockBuilder::disableArgumentCloning()` | 10.1.0 | | +| [#5315](https://github.com/sebastianbergmann/phpunit/issues/5315) | `MockBuilder::enableArgumentCloning()` | 10.1.0 | | +| [#5320](https://github.com/sebastianbergmann/phpunit/issues/5320) | `MockBuilder::addMethods()` | 10.1.0 | | +| [#5415](https://github.com/sebastianbergmann/phpunit/issues/5415) | Support for doubling interfaces (or classes) that have a method named `method` | 11.0.0 | | +| [#5423](https://github.com/sebastianbergmann/phpunit/issues/5423) | `TestCase::onConsecutiveCalls()` | 10.3.0 | Use `$double->willReturn()` instead of `$double->will($this->onConsecutiveCalls())` | +| [#5423](https://github.com/sebastianbergmann/phpunit/issues/5423) | `TestCase::returnArgument()` | 10.3.0 | Use `$double->willReturnArgument()` instead of `$double->will($this->returnArgument())` | +| [#5423](https://github.com/sebastianbergmann/phpunit/issues/5423) | `TestCase::returnCallback()` | 10.3.0 | Use `$double->willReturnCallback()` instead of `$double->will($this->returnCallback())` | +| [#5423](https://github.com/sebastianbergmann/phpunit/issues/5423) | `TestCase::returnSelf()` | 10.3.0 | Use `$double->willReturnSelf()` instead of `$double->will($this->returnSelf())` | +| [#5423](https://github.com/sebastianbergmann/phpunit/issues/5423) | `TestCase::returnValue()` | 10.3.0 | Use `$double->willReturn()` instead of `$double->will($this->returnValue())` | +| [#5423](https://github.com/sebastianbergmann/phpunit/issues/5423) | `TestCase::returnValueMap()` | 10.3.0 | Use `$double->willReturnMap()` instead of `$double->will($this->returnValueMap())` | +| [#5535](https://github.com/sebastianbergmann/phpunit/issues/5525) | Configuring expectations using `expects()` on test stubs | 11.0.0 | Create a mock object when you need to configure expectations on a test double | + +### Running Tests + +| Issue | Description | Since | Replacement | +|-------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|--------|----------------------------------------------------------------------------------------------------| +| [#5689](https://github.com/sebastianbergmann/phpunit/issues/5689) | `restrictDeprecations` attribute on the `` element of the XML configuration file | 11.1.0 | Use `ignoreSelfDeprecations`, `ignoreDirectDeprecations`, and `ignoreIndirectDeprecations` instead | +| [#5709](https://github.com/sebastianbergmann/phpunit/issues/5709) | Support for using comma-separated values with the `--group`, `--exclude-group`, `--covers`, `--uses`, and `--test-suffix` CLI options | 11.1.0 | Use `--group foo --group bar` instead of `--group foo,bar`, for example | + +#### Miscellaneous + +| Issue | Description | Since | Replacement | +|-------------------------------------------------------------------|-------------------------------------------------------------|--------|-----------------------------------------------------------------------------------------| +| [#4505](https://github.com/sebastianbergmann/phpunit/issues/4505) | Metadata in doc-comments | 10.3.0 | Metadata in attributes | +| [#5214](https://github.com/sebastianbergmann/phpunit/issues/5214) | `TestCase::iniSet()` | 10.3.0 | | +| [#5216](https://github.com/sebastianbergmann/phpunit/issues/5216) | `TestCase::setLocale()` | 10.3.0 | | +| [#5800](https://github.com/sebastianbergmann/phpunit/issues/5800) | Targeting traits with `#[CoversClass]` and `#[UsesClass]` | 11.2.0 | `#[CoversClass]` and `#[UsesClass]` also target the traits used by the targeted classes | +| [#5951](https://github.com/sebastianbergmann/phpunit/issues/5951) | `includeUncoveredFiles` configuration option | 11.4.0 | | + +## Soft Deprecations + +This functionality is currently [soft-deprecated](https://phpunit.de/backward-compatibility.html#soft-deprecation): + +### Writing Tests + +#### Assertions, Constraints, and Expectations + | Issue | Description | Since | Replacement | |-------------------------------------------------------------------|-----------------------------------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [#6052](https://github.com/sebastianbergmann/phpunit/issues/6052) | `Assert::isType()` | 11.5.0 | Use `isArray()`, `isBool()`, `isCallable()`, `isFloat()`, `isInt()`, `isIterable()`, `isNull()`, `isNumeric()`, `isObject()`, `isResource()`, `isClosedResource()`, `isScalar()`, or `isString()` instead | diff --git a/vendor/phpunit/phpunit/README.md b/vendor/phpunit/phpunit/README.md index 4b5abe2..1ca144a 100644 --- a/vendor/phpunit/phpunit/README.md +++ b/vendor/phpunit/phpunit/README.md @@ -1,20 +1,14 @@ -[![PHPUnit](.github/img/phpunit.svg)](https://phpunit.de/?ref=github) - -[![CI Status](https://github.com/sebastianbergmann/phpunit/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/phpunit/actions) -[![codecov](https://codecov.io/gh/sebastianbergmann/phpunit/branch/main/graph/badge.svg?token=0yzBUK8Wri)](https://codecov.io/gh/sebastianbergmann/phpunit) -[![Latest Stable Version](https://poser.pugx.org/phpunit/phpunit/v)](https://packagist.org/packages/phpunit/phpunit) -[![Total Downloads](https://poser.pugx.org/phpunit/phpunit/downloads)](https://packagist.org/packages/phpunit/phpunit/stats) -[![Monthly Downloads](https://poser.pugx.org/phpunit/phpunit/d/monthly)](https://packagist.org/packages/phpunit/phpunit/stats) -[![Daily Downloads](https://poser.pugx.org/phpunit/phpunit/d/daily)](https://packagist.org/packages/phpunit/phpunit/stats) - # PHPUnit -PHPUnit is a programmer-oriented testing framework for PHP. -It is an instance of the xUnit architecture for unit testing frameworks. +[![Latest Stable Version](https://poser.pugx.org/phpunit/phpunit/v)](https://packagist.org/packages/phpunit/phpunit) +[![CI Status](https://github.com/sebastianbergmann/phpunit/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/phpunit/actions) +[![codecov](https://codecov.io/gh/sebastianbergmann/phpunit/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/phpunit) + +PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks. ## Installation -We distribute a [PHP Archive (PHAR)](https://php.net/phar) that has all required dependencies of PHPUnit bundled in a single file: +We distribute a [PHP Archive (PHAR)](https://php.net/phar) that has all required (as well as some optional) dependencies of PHPUnit bundled in a single file: ```bash $ wget https://phar.phpunit.de/phpunit-X.Y.phar @@ -24,86 +18,17 @@ $ php phpunit-X.Y.phar --version Please replace `X.Y` with the version of PHPUnit you are interested in. -Alternatively, you may use [Composer](https://getcomposer.org/) to download and install PHPUnit as well as its dependencies. -Please refer to the [documentation](https://phpunit.de/documentation.html?ref=github) for details on how to install PHPUnit. +Alternatively, you may use [Composer](https://getcomposer.org/) to download and install PHPUnit as well as its dependencies. Please refer to the [documentation](https://phpunit.de/documentation.html) for details on how to install PHPUnit. ## Contribute Please refer to [CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/main/.github/CONTRIBUTING.md) for information on how to contribute to PHPUnit and its related projects. -A big "Thank you!" to everyone who has contributed to PHPUnit! -You can find a detailed list of contributors on every PHPUnit related package on GitHub. +## List of Contributors -Here is a list of all components that are primarily developed and maintained by [Sebastian Bergmann](https://sebastian-bergmann.de/open-source.html?ref=github): +Thanks to everyone who has contributed to PHPUnit! You can find a detailed list of contributors on every PHPUnit related package on GitHub. This list shows only the major components: -* [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) -* [phpunit/php-code-coverage](https://github.com/sebastianbergmann/php-code-coverage) -* [phpunit/php-file-iterator](https://github.com/sebastianbergmann/php-file-iterator) -* [phpunit/php-invoker](https://github.com/sebastianbergmann/php-invoker) -* [phpunit/php-text-template](https://github.com/sebastianbergmann/php-text-template) -* [phpunit/php-timer](https://github.com/sebastianbergmann/php-timer) -* [sebastian/cli-parser](https://github.com/sebastianbergmann/cli-parser) -* [sebastian/comparator](https://github.com/sebastianbergmann/comparator) -* [sebastian/complexity](https://github.com/sebastianbergmann/complexity) -* [sebastian/diff](https://github.com/sebastianbergmann/diff) -* [sebastian/environment](https://github.com/sebastianbergmann/environment) -* [sebastian/exporter](https://github.com/sebastianbergmann/exporter) -* [sebastian/global-state](https://github.com/sebastianbergmann/global-state) -* [sebastian/lines-of-code](https://github.com/sebastianbergmann/lines-of-code) -* [sebastian/object-enumerator](https://github.com/sebastianbergmann/object-enumerator) -* [sebastian/object-reflector](https://github.com/sebastianbergmann/object-reflector) -* [sebastian/recursion-context](https://github.com/sebastianbergmann/recursion-context) -* [sebastian/type](https://github.com/sebastianbergmann/type) -* [sebastian/version](https://github.com/sebastianbergmann/version) +* [PHPUnit](https://github.com/sebastianbergmann/phpunit/graphs/contributors) +* [php-code-coverage](https://github.com/sebastianbergmann/php-code-coverage/graphs/contributors) -A very special thanks to everyone who has contributed to the [PHPUnit Manual](https://github.com/sebastianbergmann/phpunit-documentation-english). - -In addition to the components listed above, PHPUnit depends on the components listed below: - -* [myclabs/deep-copy](https://github.com/myclabs/DeepCopy) -* [nikic/php-parser](https://github.com/nikic/php-parser) -* [phar-io/manifest](https://github.com/phar-io/manifest) -* [phar-io/version](https://github.com/phar-io/version) -* [staabm/side-effects-detector](https://github.com/staabm/side-effects-detector) -* [theseer/tokenizer](https://github.com/theseer/tokenizer) - -These tools are used to develop PHPUnit: - -* [Composer](https://getcomposer.org/) -* [Phive](https://phar.io/) -* [PHP Autoload Builder](https://github.com/theseer/Autoload/) -* [PHP-CS-Fixer](https://cs.symfony.com/) -* [PHP-Scoper](https://github.com/humbug/php-scoper) -* [PHPStan](https://phpstan.org/) - -## Sponsors - -It has taken [Sebastian Bergmann](https://sebastian-bergmann.de/open-source.html?ref=github) thousands of hours to develop, test, and support PHPUnit. -[**You can sponsor his Open Source work through GitHub Sponsors**](https://github.com/sponsors/sebastianbergmann), for example. - -These businesses support Sebastian Bergmann's work on PHPUnit: - - - - - - - - - - - - - - - - - - -
Bubble Shooterin2it vofRoave
Route4MeTestmo GmbHTideways GmbH
TYPO3 GmbHVEMA Versicherungsmakler Genossenschaft eG
- -Would you like to see your logo here as well as on the [PHPUnit website](https://phpunit.de/sponsors.html?ref=github)? -Contact Sebastian Bergmann at [sponsoring@phpunit.de](mailto:sponsoring@phpunit.de) to learn more about how you can support his work on PHPUnit. - -Whether you are a CEO, CFO, CTO, or a developer: your company surely depends on Open Source software. -[It is time to pay your share](https://opensourcepledge.com/) and support maintainers like [Sebastian Bergmann](https://sebastian-bergmann.de/open-source.html?ref=github). +A very special thanks to everyone who has contributed to the [documentation](https://github.com/sebastianbergmann/phpunit-documentation-english/graphs/contributors). diff --git a/vendor/phpunit/phpunit/composer.json b/vendor/phpunit/phpunit/composer.json index 5698c7d..b666777 100644 --- a/vendor/phpunit/phpunit/composer.json +++ b/vendor/phpunit/phpunit/composer.json @@ -20,10 +20,9 @@ "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy" }, - "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.3", + "php": ">=8.2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -33,29 +32,33 @@ "myclabs/deep-copy": "^1.12.1", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", - "phpunit/php-code-coverage": "^12.0-dev", - "phpunit/php-file-iterator": "^6.0-dev", - "phpunit/php-invoker": "^6.0-dev", - "phpunit/php-text-template": "^5.0-dev", - "phpunit/php-timer": "^8.0-dev", - "sebastian/cli-parser": "^4.0-dev", - "sebastian/comparator": "^7.0-dev", - "sebastian/diff": "^7.0-dev", - "sebastian/environment": "^8.0-dev", - "sebastian/exporter": "^7.0-dev", - "sebastian/global-state": "^8.0-dev", - "sebastian/object-enumerator": "^7.0-dev", - "sebastian/type": "^6.0-dev", - "sebastian/version": "^6.0-dev", + "phpunit/php-code-coverage": "^11.0.8", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-invoker": "^5.0.1", + "phpunit/php-text-template": "^4.0.1", + "phpunit/php-timer": "^7.0.1", + "sebastian/cli-parser": "^3.0.2", + "sebastian/code-unit": "^3.0.2", + "sebastian/comparator": "^6.3.0", + "sebastian/diff": "^6.0.2", + "sebastian/environment": "^7.2.0", + "sebastian/exporter": "^6.3.0", + "sebastian/global-state": "^7.0.2", + "sebastian/object-enumerator": "^6.0.1", + "sebastian/type": "^5.1.0", + "sebastian/version": "^5.0.2", "staabm/side-effects-detector": "^1.0.5" }, "config": { "platform": { - "php": "8.3.0" + "php": "8.2.0" }, "optimize-autoloader": true, "sort-packages": true }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files" + }, "bin": [ "phpunit" ], @@ -75,6 +78,7 @@ "tests/_files/deprecation-trigger/trigger_deprecation.php", "tests/unit/Event/AbstractEventTestCase.php", "tests/unit/Framework/MockObject/TestDoubleTestCase.php", + "tests/unit/Metadata/Parser/AnnotationParserTestCase.php", "tests/unit/Metadata/Parser/AttributeParserTestCase.php", "tests/unit/Framework/Assert/assertContainsOnlyArrayTest.php", "tests/unit/Framework/Assert/assertContainsOnlyBoolTest.php", @@ -103,6 +107,7 @@ "tests/unit/Framework/Assert/assertNullTest.php", "tests/unit/Framework/Assert/assertSameSizeTest.php", "tests/unit/Framework/Assert/assertSameTest.php", + "tests/_files/CoverageNamespacedFunctionTest.php", "tests/_files/CoveredFunction.php", "tests/_files/Generator.php", "tests/_files/NamespaceCoveredFunction.php" @@ -110,7 +115,7 @@ }, "extra": { "branch-alias": { - "dev-main": "12.0-dev" + "dev-main": "11.5-dev" } } } diff --git a/vendor/phpunit/phpunit/composer.lock b/vendor/phpunit/phpunit/composer.lock index 62eae2b..692401c 100644 --- a/vendor/phpunit/phpunit/composer.lock +++ b/vendor/phpunit/phpunit/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": "65fa32471e464a761351d14ae15a23b7", + "content-hash": "8bb9756429367fe5f916165dd00b8a5a", "packages": [ { "name": "myclabs/deep-copy", @@ -244,44 +244,44 @@ }, { "name": "phpunit/php-code-coverage", - "version": "dev-main", + "version": "11.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "30b614244b02907cf0b2edc559fd5e24bd05ea57" + "reference": "418c59fd080954f8c4aa5631d9502ecda2387118" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/30b614244b02907cf0b2edc559fd5e24bd05ea57", - "reference": "30b614244b02907cf0b2edc559fd5e24bd05ea57", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/418c59fd080954f8c4aa5631d9502ecda2387118", + "reference": "418c59fd080954f8c4aa5631d9502ecda2387118", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^5.4.0", - "php": ">=8.3", - "phpunit/php-file-iterator": "^6.0-dev", - "phpunit/php-text-template": "^5.0-dev", - "sebastian/complexity": "^5.0-dev", - "sebastian/environment": "^8.0-dev", - "sebastian/lines-of-code": "^4.0-dev", - "sebastian/version": "^6.0-dev", + "nikic/php-parser": "^5.3.1", + "php": ">=8.2", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-text-template": "^4.0.1", + "sebastian/code-unit-reverse-lookup": "^4.0.1", + "sebastian/complexity": "^4.0.1", + "sebastian/environment": "^7.2.0", + "sebastian/lines-of-code": "^3.0.1", + "sebastian/version": "^5.0.2", "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.5.0" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "12.0.x-dev" + "dev-main": "11.0.x-dev" } }, "autoload": { @@ -310,7 +310,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/main" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.8" }, "funding": [ { @@ -318,33 +318,32 @@ "type": "github" } ], - "time": "2025-01-28T10:09:07+00:00" + "time": "2024-12-11T12:34:27+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "dev-main", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "a1339a60b2206324e440c4a3806bbd873fda0860" + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a1339a60b2206324e440c4a3806bbd873fda0860", - "reference": "a1339a60b2206324e440c4a3806bbd873fda0860", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/118cfaaa8bc5aef3287bf315b6060b1174754af6", + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^11.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -372,7 +371,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/main" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.0" }, "funding": [ { @@ -380,37 +379,36 @@ "type": "github" } ], - "time": "2025-01-15T13:41:39+00:00" + "time": "2024-08-27T05:02:59+00:00" }, { "name": "phpunit/php-invoker", - "version": "dev-main", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "a79e641e661a20d3b8c264b0b3b9eb0d98f98506" + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/a79e641e661a20d3b8c264b0b3b9eb0d98f98506", - "reference": "a79e641e661a20d3b8c264b0b3b9eb0d98f98506", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, "suggest": { "ext-pcntl": "*" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -437,7 +435,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/main" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.1" }, "funding": [ { @@ -445,33 +443,32 @@ "type": "github" } ], - "time": "2025-01-16T08:05:12+00:00" + "time": "2024-07-03T05:07:44+00:00" }, { "name": "phpunit/php-text-template", - "version": "dev-main", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "0199874fd3f2ae19aa9813bdfcb68e67671eee64" + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0199874fd3f2ae19aa9813bdfcb68e67671eee64", - "reference": "0199874fd3f2ae19aa9813bdfcb68e67671eee64", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -498,7 +495,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/main" + "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.1" }, "funding": [ { @@ -506,33 +503,32 @@ "type": "github" } ], - "time": "2025-01-16T08:08:04+00:00" + "time": "2024-07-03T05:08:43+00:00" }, { "name": "phpunit/php-timer", - "version": "dev-main", + "version": "7.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "aa0f95babbd87f096f1c20364204f195dd4b4608" + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/aa0f95babbd87f096f1c20364204f195dd4b4608", - "reference": "aa0f95babbd87f096f1c20364204f195dd4b4608", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "8.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -559,7 +555,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", "security": "https://github.com/sebastianbergmann/php-timer/security/policy", - "source": "https://github.com/sebastianbergmann/php-timer/tree/main" + "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.1" }, "funding": [ { @@ -567,33 +563,32 @@ "type": "github" } ], - "time": "2025-01-16T08:10:48+00:00" + "time": "2024-07-03T05:09:35+00:00" }, { "name": "sebastian/cli-parser", - "version": "dev-main", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "7f79d38ab02a0cb4089f31207ca11b74f49c7848" + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/7f79d38ab02a0cb4089f31207ca11b74f49c7848", - "reference": "7f79d38ab02a0cb4089f31207ca11b74f49c7848", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -617,7 +612,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/main" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2" }, "funding": [ { @@ -625,40 +620,152 @@ "type": "github" } ], - "time": "2025-01-16T08:13:26+00:00" + "time": "2024-07-03T04:41:36+00:00" }, { - "name": "sebastian/comparator", - "version": "dev-main", + "name": "sebastian/code-unit", + "version": "3.0.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "07f683f544931bc816c47faf894e387f2216a1e9" + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/07f683f544931bc816c47faf894e387f2216a1e9", - "reference": "07f683f544931bc816c47faf894e387f2216a1e9", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca", + "reference": "ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "security": "https://github.com/sebastianbergmann/code-unit/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-12-12T09:59:06+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:45:54+00:00" + }, + { + "name": "sebastian/comparator", + "version": "6.3.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "d4e47a769525c4dd38cea90e5dcd435ddbbc7115" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/d4e47a769525c4dd38cea90e5dcd435ddbbc7115", + "reference": "d4e47a769525c4dd38cea90e5dcd435ddbbc7115", "shasum": "" }, "require": { "ext-dom": "*", "ext-mbstring": "*", - "php": ">=8.3", - "sebastian/diff": "^7.0", - "sebastian/exporter": "^7.0" + "php": ">=8.2", + "sebastian/diff": "^6.0", + "sebastian/exporter": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.4" }, "suggest": { "ext-bcmath": "For comparing BcMath\\Number objects" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.2-dev" } }, "autoload": { @@ -698,7 +805,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/main" + "source": "https://github.com/sebastianbergmann/comparator/tree/6.3.0" }, "funding": [ { @@ -706,34 +813,33 @@ "type": "github" } ], - "time": "2025-01-16T09:21:21+00:00" + "time": "2025-01-06T10:28:19+00:00" }, { "name": "sebastian/complexity", - "version": "dev-main", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "eec688b04904c5ecfa3b94f59bc60485209805a9" + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/eec688b04904c5ecfa3b94f59bc60485209805a9", - "reference": "eec688b04904c5ecfa3b94f59bc60485209805a9", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0", "shasum": "" }, "require": { "nikic/php-parser": "^5.0", - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -757,7 +863,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/main" + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1" }, "funding": [ { @@ -765,34 +871,33 @@ "type": "github" } ], - "time": "2025-01-16T08:20:43+00:00" + "time": "2024-07-03T04:49:50+00:00" }, { "name": "sebastian/diff", - "version": "dev-main", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "87a9594e6994ba8ee9010836903305a64c895083" + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/87a9594e6994ba8ee9010836903305a64c895083", - "reference": "87a9594e6994ba8ee9010836903305a64c895083", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev", + "phpunit/phpunit": "^11.0", "symfony/process": "^4.2 || ^5" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -825,7 +930,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/main" + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" }, "funding": [ { @@ -833,36 +938,35 @@ "type": "github" } ], - "time": "2025-01-16T09:04:01+00:00" + "time": "2024-07-03T04:53:05+00:00" }, { "name": "sebastian/environment", - "version": "dev-main", + "version": "7.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "92b1a897b49e191a8fbca823d75bc0e157ff7cdb" + "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/92b1a897b49e191a8fbca823d75bc0e157ff7cdb", - "reference": "92b1a897b49e191a8fbca823d75bc0e157ff7cdb", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", + "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, "suggest": { "ext-posix": "*" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "8.0-dev" + "dev-main": "7.2-dev" } }, "autoload": { @@ -890,7 +994,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/main" + "source": "https://github.com/sebastianbergmann/environment/tree/7.2.0" }, "funding": [ { @@ -898,35 +1002,34 @@ "type": "github" } ], - "time": "2025-01-16T08:28:42+00:00" + "time": "2024-07-03T04:54:44+00:00" }, { "name": "sebastian/exporter", - "version": "dev-main", + "version": "6.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "17e38c7a602c690c6f097b6aeaf47d0771ace9ca" + "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/17e38c7a602c690c6f097b6aeaf47d0771ace9ca", - "reference": "17e38c7a602c690c6f097b6aeaf47d0771ace9ca", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/3473f61172093b2da7de1fb5782e1f24cc036dc3", + "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": ">=8.3", - "sebastian/recursion-context": "^7.0-dev" + "php": ">=8.2", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.3" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.1-dev" } }, "autoload": { @@ -969,7 +1072,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/main" + "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.0" }, "funding": [ { @@ -977,36 +1080,35 @@ "type": "github" } ], - "time": "2025-01-16T08:54:00+00:00" + "time": "2024-12-05T09:17:50+00:00" }, { "name": "sebastian/global-state", - "version": "dev-main", + "version": "7.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "8a089e5a2a118a6725b603a47be1d1a9da1b9a68" + "reference": "3be331570a721f9a4b5917f4209773de17f747d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/8a089e5a2a118a6725b603a47be1d1a9da1b9a68", - "reference": "8a089e5a2a118a6725b603a47be1d1a9da1b9a68", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7", "shasum": "" }, "require": { - "php": ">=8.3", - "sebastian/object-reflector": "^5.0", - "sebastian/recursion-context": "^7.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "8.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -1032,7 +1134,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", "security": "https://github.com/sebastianbergmann/global-state/security/policy", - "source": "https://github.com/sebastianbergmann/global-state/tree/main" + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2" }, "funding": [ { @@ -1040,34 +1142,33 @@ "type": "github" } ], - "time": "2025-01-16T09:14:38+00:00" + "time": "2024-07-03T04:57:36+00:00" }, { "name": "sebastian/lines-of-code", - "version": "dev-main", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "fe8070ab1160c447839048ab240c07c448caa2b2" + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/fe8070ab1160c447839048ab240c07c448caa2b2", - "reference": "fe8070ab1160c447839048ab240c07c448caa2b2", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a", "shasum": "" }, "require": { "nikic/php-parser": "^5.0", - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1091,7 +1192,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/main" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1" }, "funding": [ { @@ -1099,35 +1200,34 @@ "type": "github" } ], - "time": "2025-01-16T08:36:53+00:00" + "time": "2024-07-03T04:58:38+00:00" }, { "name": "sebastian/object-enumerator", - "version": "dev-main", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "250d806a14baca8c4b37823426277dbcb8d4440d" + "reference": "f5b498e631a74204185071eb41f33f38d64608aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/250d806a14baca8c4b37823426277dbcb8d4440d", - "reference": "250d806a14baca8c4b37823426277dbcb8d4440d", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa", "shasum": "" }, "require": { - "php": ">=8.3", - "sebastian/object-reflector": "^5.0", - "sebastian/recursion-context": "^7.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1150,7 +1250,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/main" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1" }, "funding": [ { @@ -1158,33 +1258,32 @@ "type": "github" } ], - "time": "2025-01-16T08:38:51+00:00" + "time": "2024-07-03T05:00:13+00:00" }, { "name": "sebastian/object-reflector", - "version": "dev-main", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "7dddd66b56ba05cb474de46b2b623e92b42bff3a" + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/7dddd66b56ba05cb474de46b2b623e92b42bff3a", - "reference": "7dddd66b56ba05cb474de46b2b623e92b42bff3a", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1207,7 +1306,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/main" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.1" }, "funding": [ { @@ -1215,33 +1314,32 @@ "type": "github" } ], - "time": "2025-01-16T08:40:54+00:00" + "time": "2024-07-03T05:01:32+00:00" }, { "name": "sebastian/recursion-context", - "version": "dev-main", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "c9442e27dc9965ad453397725830d8ecb5497410" + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/c9442e27dc9965ad453397725830d8ecb5497410", - "reference": "c9442e27dc9965ad453397725830d8ecb5497410", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/694d156164372abbd149a4b85ccda2e4670c0e16", + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1272,7 +1370,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/main" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.2" }, "funding": [ { @@ -1280,33 +1378,32 @@ "type": "github" } ], - "time": "2025-01-16T08:53:18+00:00" + "time": "2024-07-03T05:10:34+00:00" }, { "name": "sebastian/type", - "version": "dev-main", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b07de32ccc63961cfcf87c4531816388dbaf264f" + "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b07de32ccc63961cfcf87c4531816388dbaf264f", - "reference": "b07de32ccc63961cfcf87c4531816388dbaf264f", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/461b9c5da241511a2a0e8f240814fb23ce5c0aac", + "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.3" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -1330,7 +1427,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/type/issues", "security": "https://github.com/sebastianbergmann/type/security/policy", - "source": "https://github.com/sebastianbergmann/type/tree/main" + "source": "https://github.com/sebastianbergmann/type/tree/5.1.0" }, "funding": [ { @@ -1338,30 +1435,29 @@ "type": "github" } ], - "time": "2025-01-16T08:45:13+00:00" + "time": "2024-09-17T13:12:04+00:00" }, { "name": "sebastian/version", - "version": "dev-main", + "version": "5.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "3e8786f0e004140c3be066577af51e7ea0446e54" + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/3e8786f0e004140c3be066577af51e7ea0446e54", - "reference": "3e8786f0e004140c3be066577af51e7ea0446e54", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1385,7 +1481,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/version/issues", "security": "https://github.com/sebastianbergmann/version/security/policy", - "source": "https://github.com/sebastianbergmann/version/tree/main" + "source": "https://github.com/sebastianbergmann/version/tree/5.0.2" }, "funding": [ { @@ -1393,7 +1489,7 @@ "type": "github" } ], - "time": "2025-01-16T08:47:17+00:00" + "time": "2024-10-09T05:16:32+00:00" }, { "name": "staabm/side-effects-detector", @@ -1500,27 +1596,12 @@ ], "packages-dev": [], "aliases": [], - "minimum-stability": "dev", - "stability-flags": { - "phpunit/php-code-coverage": 20, - "phpunit/php-file-iterator": 20, - "phpunit/php-invoker": 20, - "phpunit/php-text-template": 20, - "phpunit/php-timer": 20, - "sebastian/cli-parser": 20, - "sebastian/comparator": 20, - "sebastian/diff": 20, - "sebastian/environment": 20, - "sebastian/exporter": 20, - "sebastian/global-state": 20, - "sebastian/object-enumerator": 20, - "sebastian/type": 20, - "sebastian/version": 20 - }, + "minimum-stability": "stable", + "stability-flags": {}, "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": ">=8.3", + "php": ">=8.2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -1530,7 +1611,7 @@ }, "platform-dev": {}, "platform-overrides": { - "php": "8.3.0" + "php": "8.2.0" }, "plugin-api-version": "2.6.0" } diff --git a/vendor/phpunit/phpunit/phpunit b/vendor/phpunit/phpunit/phpunit index 84afaf1..6fa992b 100644 --- a/vendor/phpunit/phpunit/phpunit +++ b/vendor/phpunit/phpunit/phpunit @@ -24,11 +24,11 @@ if (!version_compare(PHP_VERSION, PHP_VERSION, '=')) { die(1); } -if (version_compare('8.3.0', PHP_VERSION, '>')) { +if (version_compare('8.2.0', PHP_VERSION, '>')) { fwrite( STDERR, sprintf( - 'This version of PHPUnit requires PHP >= 8.3.' . PHP_EOL . + 'This version of PHPUnit requires PHP >= 8.2.' . PHP_EOL . 'You are using PHP %s (%s).' . PHP_EOL, PHP_VERSION, PHP_BINARY diff --git a/vendor/phpunit/phpunit/phpunit.xsd b/vendor/phpunit/phpunit/phpunit.xsd index 839b1c3..7613f22 100644 --- a/vendor/phpunit/phpunit/phpunit.xsd +++ b/vendor/phpunit/phpunit/phpunit.xsd @@ -2,7 +2,7 @@ - This Schema file defines the rules by which the XML configuration file of PHPUnit 12.0 may be structured. + This Schema file defines the rules by which the XML configuration file of PHPUnit 11.5 may be structured. @@ -218,7 +218,7 @@ - + diff --git a/vendor/phpunit/phpunit/schema/11.5.xsd b/vendor/phpunit/phpunit/schema/11.5.xsd deleted file mode 100644 index 7613f22..0000000 --- a/vendor/phpunit/phpunit/schema/11.5.xsd +++ /dev/null @@ -1,334 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 11.5 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/src/Event/Emitter/DispatchingEmitter.php b/vendor/phpunit/phpunit/src/Event/Emitter/DispatchingEmitter.php index 7dc51da..7106882 100644 --- a/vendor/phpunit/phpunit/src/Event/Emitter/DispatchingEmitter.php +++ b/vendor/phpunit/phpunit/src/Event/Emitter/DispatchingEmitter.php @@ -27,6 +27,7 @@ use PHPUnit\Event\TestSuite\Sorted as TestSuiteSorted; use PHPUnit\Event\TestSuite\Started as TestSuiteStarted; use PHPUnit\Event\TestSuite\TestSuite; use PHPUnit\TextUI\Configuration\Configuration; +use PHPUnit\Util\Exporter; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -554,6 +555,62 @@ final class DispatchingEmitter implements Emitter ); } + /** + * @param trait-string $traitName + * + * @throws InvalidArgumentException + * @throws UnknownEventTypeException + */ + public function testCreatedMockObjectForTrait(string $traitName): void + { + $this->dispatcher->dispatch( + new Test\MockObjectForTraitCreated( + $this->telemetryInfo(), + $traitName, + ), + ); + } + + /** + * @param class-string $className + * + * @throws InvalidArgumentException + * @throws UnknownEventTypeException + */ + public function testCreatedMockObjectForAbstractClass(string $className): void + { + $this->dispatcher->dispatch( + new Test\MockObjectForAbstractClassCreated( + $this->telemetryInfo(), + $className, + ), + ); + } + + /** + * @param class-string $originalClassName + * @param class-string $mockClassName + * @param list $methods + * @param list $options + * + * @throws InvalidArgumentException + * @throws UnknownEventTypeException + */ + public function testCreatedMockObjectFromWsdl(string $wsdlFile, string $originalClassName, string $mockClassName, array $methods, bool $callOriginalConstructor, array $options): void + { + $this->dispatcher->dispatch( + new Test\MockObjectFromWsdlCreated( + $this->telemetryInfo(), + $wsdlFile, + $originalClassName, + $mockClassName, + $methods, + $callOriginalConstructor, + $options, + ), + ); + } + /** * @param class-string $className * @@ -571,6 +628,24 @@ final class DispatchingEmitter implements Emitter ); } + /** + * @param class-string $className + * @param list $constructorArguments + * + * @throws InvalidArgumentException + * @throws UnknownEventTypeException + */ + public function testCreatedTestProxy(string $className, array $constructorArguments): void + { + $this->dispatcher->dispatch( + new Test\TestProxyCreated( + $this->telemetryInfo(), + $className, + Exporter::export($constructorArguments), + ), + ); + } + /** * @param class-string $className * diff --git a/vendor/phpunit/phpunit/src/Event/Emitter/Emitter.php b/vendor/phpunit/phpunit/src/Event/Emitter/Emitter.php index 958ba44..8ff025d 100644 --- a/vendor/phpunit/phpunit/src/Event/Emitter/Emitter.php +++ b/vendor/phpunit/phpunit/src/Event/Emitter/Emitter.php @@ -127,11 +127,35 @@ interface Emitter */ public function testCreatedMockObjectForIntersectionOfInterfaces(array $interfaces): void; + /** + * @param trait-string $traitName + */ + public function testCreatedMockObjectForTrait(string $traitName): void; + + /** + * @param class-string $className + */ + public function testCreatedMockObjectForAbstractClass(string $className): void; + + /** + * @param class-string $originalClassName + * @param class-string $mockClassName + * @param list $methods + * @param list $options + */ + public function testCreatedMockObjectFromWsdl(string $wsdlFile, string $originalClassName, string $mockClassName, array $methods, bool $callOriginalConstructor, array $options): void; + /** * @param class-string $className */ public function testCreatedPartialMockObject(string $className, string ...$methodNames): void; + /** + * @param class-string $className + * @param list $constructorArguments + */ + public function testCreatedTestProxy(string $className, array $constructorArguments): void; + /** * @param class-string $className */ @@ -155,6 +179,9 @@ interface Emitter public function testMarkedAsIncomplete(Code\Test $test, Throwable $throwable): void; + /** + * @param non-empty-string $message + */ public function testSkipped(Code\Test $test, string $message): void; /** diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversClassesThatExtendClass.php b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForAbstractClassCreated.php similarity index 50% rename from vendor/phpunit/phpunit/src/Framework/Attributes/CoversClassesThatExtendClass.php rename to vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForAbstractClassCreated.php index 486fc5b..6dcc79a 100644 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversClassesThatExtendClass.php +++ b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForAbstractClassCreated.php @@ -7,18 +7,21 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ -namespace PHPUnit\Framework\Attributes; +namespace PHPUnit\Event\Test; -use Attribute; +use function sprintf; +use PHPUnit\Event\Event; +use PHPUnit\Event\Telemetry; /** * @immutable * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] -final readonly class CoversClassesThatExtendClass +final readonly class MockObjectForAbstractClassCreated implements Event { + private Telemetry\Info $telemetryInfo; + /** * @var class-string */ @@ -27,9 +30,15 @@ final readonly class CoversClassesThatExtendClass /** * @param class-string $className */ - public function __construct(string $className) + public function __construct(Telemetry\Info $telemetryInfo, string $className) { - $this->className = $className; + $this->telemetryInfo = $telemetryInfo; + $this->className = $className; + } + + public function telemetryInfo(): Telemetry\Info + { + return $this->telemetryInfo; } /** @@ -39,4 +48,12 @@ final readonly class CoversClassesThatExtendClass { return $this->className; } + + public function asString(): string + { + return sprintf( + 'Mock Object Created (%s)', + $this->className, + ); + } } diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForAbstractClassCreatedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForAbstractClassCreatedSubscriber.php new file mode 100644 index 0000000..c335d19 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForAbstractClassCreatedSubscriber.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Event\Test; + +use PHPUnit\Event\Subscriber; + +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +interface MockObjectForAbstractClassCreatedSubscriber extends Subscriber +{ + public function notify(MockObjectForAbstractClassCreated $event): void; +} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForTraitCreated.php b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForTraitCreated.php new file mode 100644 index 0000000..fc5b545 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForTraitCreated.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Event\Test; + +use function sprintf; +use PHPUnit\Event\Event; +use PHPUnit\Event\Telemetry; + +/** + * @immutable + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final readonly class MockObjectForTraitCreated implements Event +{ + private Telemetry\Info $telemetryInfo; + + /** + * @var trait-string + */ + private string $traitName; + + /** + * @param trait-string $traitName + */ + public function __construct(Telemetry\Info $telemetryInfo, string $traitName) + { + $this->telemetryInfo = $telemetryInfo; + $this->traitName = $traitName; + } + + public function telemetryInfo(): Telemetry\Info + { + return $this->telemetryInfo; + } + + /** + * @return trait-string + */ + public function traitName(): string + { + return $this->traitName; + } + + public function asString(): string + { + return sprintf( + 'Mock Object Created (%s)', + $this->traitName, + ); + } +} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForTraitCreatedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForTraitCreatedSubscriber.php new file mode 100644 index 0000000..a7e7dd0 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectForTraitCreatedSubscriber.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Event\Test; + +use PHPUnit\Event\Subscriber; + +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +interface MockObjectForTraitCreatedSubscriber extends Subscriber +{ + public function notify(MockObjectForTraitCreated $event): void; +} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectFromWsdlCreated.php b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectFromWsdlCreated.php new file mode 100644 index 0000000..25f5ab8 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectFromWsdlCreated.php @@ -0,0 +1,118 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Event\Test; + +use function sprintf; +use PHPUnit\Event\Event; +use PHPUnit\Event\Telemetry; + +/** + * @immutable + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final readonly class MockObjectFromWsdlCreated implements Event +{ + private Telemetry\Info $telemetryInfo; + private string $wsdlFile; + + /** + * @var class-string + */ + private string $originalClassName; + + /** + * @var class-string + */ + private string $mockClassName; + + /** + * @var list + */ + private array $methods; + private bool $callOriginalConstructor; + + /** + * @var list + */ + private array $options; + + /** + * @param class-string $originalClassName + * @param class-string $mockClassName + * @param list $methods + * @param list $options + */ + public function __construct(Telemetry\Info $telemetryInfo, string $wsdlFile, string $originalClassName, string $mockClassName, array $methods, bool $callOriginalConstructor, array $options) + { + $this->telemetryInfo = $telemetryInfo; + $this->wsdlFile = $wsdlFile; + $this->originalClassName = $originalClassName; + $this->mockClassName = $mockClassName; + $this->methods = $methods; + $this->callOriginalConstructor = $callOriginalConstructor; + $this->options = $options; + } + + public function telemetryInfo(): Telemetry\Info + { + return $this->telemetryInfo; + } + + public function wsdlFile(): string + { + return $this->wsdlFile; + } + + /** + * @return class-string + */ + public function originalClassName(): string + { + return $this->originalClassName; + } + + /** + * @return class-string + */ + public function mockClassName(): string + { + return $this->mockClassName; + } + + /** + * @return list + */ + public function methods(): array + { + return $this->methods; + } + + public function callOriginalConstructor(): bool + { + return $this->callOriginalConstructor; + } + + /** + * @return list + */ + public function options(): array + { + return $this->options; + } + + public function asString(): string + { + return sprintf( + 'Mock Object Created (%s)', + $this->wsdlFile, + ); + } +} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectFromWsdlCreatedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectFromWsdlCreatedSubscriber.php new file mode 100644 index 0000000..fb0524b --- /dev/null +++ b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/MockObjectFromWsdlCreatedSubscriber.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Event\Test; + +use PHPUnit\Event\Subscriber; + +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +interface MockObjectFromWsdlCreatedSubscriber extends Subscriber +{ + public function notify(MockObjectFromWsdlCreated $event): void; +} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestProxyCreated.php b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestProxyCreated.php new file mode 100644 index 0000000..83db771 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestProxyCreated.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Event\Test; + +use function sprintf; +use PHPUnit\Event\Event; +use PHPUnit\Event\Telemetry; + +/** + * @immutable + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +final readonly class TestProxyCreated implements Event +{ + private Telemetry\Info $telemetryInfo; + + /** + * @var class-string + */ + private string $className; + private string $constructorArguments; + + /** + * @param class-string $className + */ + public function __construct(Telemetry\Info $telemetryInfo, string $className, string $constructorArguments) + { + $this->telemetryInfo = $telemetryInfo; + $this->className = $className; + $this->constructorArguments = $constructorArguments; + } + + public function telemetryInfo(): Telemetry\Info + { + return $this->telemetryInfo; + } + + /** + * @return class-string + */ + public function className(): string + { + return $this->className; + } + + public function constructorArguments(): string + { + return $this->constructorArguments; + } + + public function asString(): string + { + return sprintf( + 'Test Proxy Created (%s)', + $this->className, + ); + } +} diff --git a/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestProxyCreatedSubscriber.php b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestProxyCreatedSubscriber.php new file mode 100644 index 0000000..8af8384 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Event/Events/Test/TestDouble/TestProxyCreatedSubscriber.php @@ -0,0 +1,20 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Event\Test; + +use PHPUnit\Event\Subscriber; + +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + */ +interface TestProxyCreatedSubscriber extends Subscriber +{ + public function notify(TestProxyCreated $event): void; +} diff --git a/vendor/phpunit/phpunit/src/Event/Facade.php b/vendor/phpunit/phpunit/src/Event/Facade.php index 72307d5..7304148 100644 --- a/vendor/phpunit/phpunit/src/Event/Facade.php +++ b/vendor/phpunit/phpunit/src/Event/Facade.php @@ -9,10 +9,13 @@ */ namespace PHPUnit\Event; +use const PHP_VERSION; use function assert; use function interface_exists; +use function version_compare; use PHPUnit\Event\Telemetry\HRTime; -use PHPUnit\Event\Telemetry\SystemGarbageCollectorStatusProvider; +use PHPUnit\Event\Telemetry\Php81GarbageCollectorStatusProvider; +use PHPUnit\Event\Telemetry\Php83GarbageCollectorStatusProvider; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -96,7 +99,7 @@ final class Facade new Telemetry\System( new Telemetry\SystemStopWatchWithOffset($offset), new Telemetry\SystemMemoryMeter, - new SystemGarbageCollectorStatusProvider, + $this->garbageCollectorStatusProvider(), ), ); @@ -136,7 +139,7 @@ final class Facade return new Telemetry\System( new Telemetry\SystemStopWatch, new Telemetry\SystemMemoryMeter, - new SystemGarbageCollectorStatusProvider, + $this->garbageCollectorStatusProvider(), ); } @@ -214,8 +217,12 @@ final class Facade Test\WarningTriggered::class, Test\MockObjectCreated::class, + Test\MockObjectForAbstractClassCreated::class, Test\MockObjectForIntersectionOfInterfacesCreated::class, + Test\MockObjectForTraitCreated::class, + Test\MockObjectFromWsdlCreated::class, Test\PartialMockObjectCreated::class, + Test\TestProxyCreated::class, Test\TestStubCreated::class, Test\TestStubForIntersectionOfInterfacesCreated::class, @@ -253,4 +260,15 @@ final class Facade $typeMap->addMapping($subscriberInterface, $eventClass); } } + + private function garbageCollectorStatusProvider(): Telemetry\GarbageCollectorStatusProvider + { + if (version_compare(PHP_VERSION, '8.3.0', '>=')) { + return new Php83GarbageCollectorStatusProvider; + } + + // @codeCoverageIgnoreStart + return new Php81GarbageCollectorStatusProvider; + // @codeCoverageIgnoreEnd + } } diff --git a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/GarbageCollectorStatus.php b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/GarbageCollectorStatus.php index f8bb77a..23260de 100644 --- a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/GarbageCollectorStatus.php +++ b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/GarbageCollectorStatus.php @@ -9,6 +9,8 @@ */ namespace PHPUnit\Event\Telemetry; +use PHPUnit\Event\RuntimeException; + /** * @immutable * @@ -20,16 +22,16 @@ final readonly class GarbageCollectorStatus private int $collected; private int $threshold; private int $roots; - private float $applicationTime; - private float $collectorTime; - private float $destructorTime; - private float $freeTime; - private bool $running; - private bool $protected; - private bool $full; - private int $bufferSize; + private ?float $applicationTime; + private ?float $collectorTime; + private ?float $destructorTime; + private ?float $freeTime; + private ?bool $running; + private ?bool $protected; + private ?bool $full; + private ?int $bufferSize; - public function __construct(int $runs, int $collected, int $threshold, int $roots, float $applicationTime, float $collectorTime, float $destructorTime, float $freeTime, bool $running, bool $protected, bool $full, int $bufferSize) + public function __construct(int $runs, int $collected, int $threshold, int $roots, ?float $applicationTime, ?float $collectorTime, ?float $destructorTime, ?float $freeTime, ?bool $running, ?bool $protected, ?bool $full, ?int $bufferSize) { $this->runs = $runs; $this->collected = $collected; @@ -65,43 +67,114 @@ final readonly class GarbageCollectorStatus return $this->roots; } + /** + * @phpstan-assert-if-true !null $this->applicationTime + * @phpstan-assert-if-true !null $this->collectorTime + * @phpstan-assert-if-true !null $this->destructorTime + * @phpstan-assert-if-true !null $this->freeTime + * @phpstan-assert-if-true !null $this->running + * @phpstan-assert-if-true !null $this->protected + * @phpstan-assert-if-true !null $this->full + * @phpstan-assert-if-true !null $this->bufferSize + */ + public function hasExtendedInformation(): bool + { + return $this->running !== null; + } + + /** + * @throws RuntimeException on PHP < 8.3 + */ public function applicationTime(): float { + if ($this->applicationTime === null) { + throw new RuntimeException('Information not available'); + } + return $this->applicationTime; } + /** + * @throws RuntimeException on PHP < 8.3 + */ public function collectorTime(): float { + if ($this->collectorTime === null) { + throw new RuntimeException('Information not available'); + } + return $this->collectorTime; } + /** + * @throws RuntimeException on PHP < 8.3 + */ public function destructorTime(): float { + if ($this->destructorTime === null) { + throw new RuntimeException('Information not available'); + } + return $this->destructorTime; } + /** + * @throws RuntimeException on PHP < 8.3 + */ public function freeTime(): float { + if ($this->freeTime === null) { + throw new RuntimeException('Information not available'); + } + return $this->freeTime; } + /** + * @throws RuntimeException on PHP < 8.3 + */ public function isRunning(): bool { + if ($this->running === null) { + throw new RuntimeException('Information not available'); + } + return $this->running; } + /** + * @throws RuntimeException on PHP < 8.3 + */ public function isProtected(): bool { + if ($this->protected === null) { + throw new RuntimeException('Information not available'); + } + return $this->protected; } + /** + * @throws RuntimeException on PHP < 8.3 + */ public function isFull(): bool { + if ($this->full === null) { + throw new RuntimeException('Information not available'); + } + return $this->full; } + /** + * @throws RuntimeException on PHP < 8.3 + */ public function bufferSize(): int { + if ($this->bufferSize === null) { + throw new RuntimeException('Information not available'); + } + return $this->bufferSize; } } diff --git a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/SystemGarbageCollectorStatusProvider.php b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/Php81GarbageCollectorStatusProvider.php similarity index 67% rename from vendor/phpunit/phpunit/src/Event/Value/Telemetry/SystemGarbageCollectorStatusProvider.php rename to vendor/phpunit/phpunit/src/Event/Value/Telemetry/Php81GarbageCollectorStatusProvider.php index 3f33d69..f909c11 100644 --- a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/SystemGarbageCollectorStatusProvider.php +++ b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/Php81GarbageCollectorStatusProvider.php @@ -15,8 +15,10 @@ use function gc_status; * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @codeCoverageIgnore */ -final readonly class SystemGarbageCollectorStatusProvider implements GarbageCollectorStatusProvider +final readonly class Php81GarbageCollectorStatusProvider implements GarbageCollectorStatusProvider { public function status(): GarbageCollectorStatus { @@ -27,14 +29,14 @@ final readonly class SystemGarbageCollectorStatusProvider implements GarbageColl $status['collected'], $status['threshold'], $status['roots'], - $status['application_time'], - $status['collector_time'], - $status['destructor_time'], - $status['free_time'], - $status['running'], - $status['protected'], - $status['full'], - $status['buffer_size'], + null, + null, + null, + null, + null, + null, + null, + null, ); } } diff --git a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/Php83GarbageCollectorStatusProvider.php b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/Php83GarbageCollectorStatusProvider.php new file mode 100644 index 0000000..5e02c83 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/Php83GarbageCollectorStatusProvider.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Event\Telemetry; + +use function gc_status; + +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final readonly class Php83GarbageCollectorStatusProvider implements GarbageCollectorStatusProvider +{ + public function status(): GarbageCollectorStatus + { + $status = gc_status(); + + return new GarbageCollectorStatus( + $status['runs'], + $status['collected'], + $status['threshold'], + $status['roots'], + /** @phpstan-ignore offsetAccess.notFound */ + $status['application_time'], + /** @phpstan-ignore offsetAccess.notFound */ + $status['collector_time'], + /** @phpstan-ignore offsetAccess.notFound */ + $status['destructor_time'], + /** @phpstan-ignore offsetAccess.notFound */ + $status['free_time'], + /** @phpstan-ignore offsetAccess.notFound */ + $status['running'], + /** @phpstan-ignore offsetAccess.notFound */ + $status['protected'], + /** @phpstan-ignore offsetAccess.notFound */ + $status['full'], + /** @phpstan-ignore offsetAccess.notFound */ + $status['buffer_size'], + ); + } +} diff --git a/vendor/phpunit/phpunit/src/Framework/Assert.php b/vendor/phpunit/phpunit/src/Framework/Assert.php index 717301c..37ee4a8 100644 --- a/vendor/phpunit/phpunit/src/Framework/Assert.php +++ b/vendor/phpunit/phpunit/src/Framework/Assert.php @@ -16,11 +16,10 @@ use function count; use function file_get_contents; use function interface_exists; use function is_bool; -use function sprintf; use ArrayAccess; use Countable; use Generator; -use PHPUnit\Event\Facade as EventFacade; +use PHPUnit\Event; use PHPUnit\Framework\Constraint\ArrayHasKey; use PHPUnit\Framework\Constraint\Callback; use PHPUnit\Framework\Constraint\Constraint; @@ -274,7 +273,7 @@ abstract class Assert * @throws Exception * @throws ExpectationFailedException * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6056 + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6055 */ final public static function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void { @@ -282,54 +281,14 @@ abstract class Assert $isNativeType = self::isNativeType($type); } - if ($isNativeType) { - $replacement = match ($type) { - 'array' => 'assertContainsOnlyArray', - 'bool' => 'assertContainsOnlyBool', - 'boolean' => 'assertContainsOnlyBool', - 'callable' => 'assertContainsOnlyCallable', - 'double' => 'assertContainsOnlyFloat', - 'float' => 'assertContainsOnlyFloat', - 'int' => 'assertContainsOnlyInt', - 'integer' => 'assertContainsOnlyInt', - 'iterable' => 'assertContainsOnlyIterable', - 'null' => 'assertContainsOnlyNull', - 'numeric' => 'assertContainsOnlyNumeric', - 'object' => 'assertContainsOnlyObject', - 'real' => 'assertContainsOnlyFloat', - 'resource' => 'assertContainsOnlyResource', - 'resource (closed)' => 'assertContainsOnlyClosedResource', - 'scalar' => 'assertContainsOnlyScalar', - 'string' => 'assertContainsOnlyString', - }; - - EventFacade::emitter()->testTriggeredPhpunitDeprecation( - null, - sprintf( - 'assertContainsOnly() is deprecated and will be removed in PHPUnit 12. ' . - 'Please use %s($haystack) instead of assertContainsOnly(\'%s\', $haystack).', - $replacement, - $type, - ), - ); - - $constraint = TraversableContainsOnly::forNativeType(self::mapNativeType($type)); - } else { - EventFacade::emitter()->testTriggeredPhpunitDeprecation( - null, - sprintf( - 'assertContainsOnly() is deprecated and will be removed in PHPUnit 12. ' . - 'Please use assertContainsOnlyInstancesOf(\'%s\', $haystack) instead of assertContainsOnly(\'%s\', $haystack).', - $type, - $type, - ), - ); - - /** @phpstan-ignore argument.type */ - $constraint = TraversableContainsOnly::forClassOrInterface($type); - } - - self::assertThat($haystack, $constraint, $message); + self::assertThat( + $haystack, + new TraversableContainsOnly( + $type, + $isNativeType, + ), + $message, + ); } /** @@ -343,8 +302,8 @@ abstract class Assert { self::assertThat( $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Array, + new TraversableContainsOnly( + NativeType::Array->value, ), $message, ); @@ -361,8 +320,8 @@ abstract class Assert { self::assertThat( $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Bool, + new TraversableContainsOnly( + NativeType::Bool->value, ), $message, ); @@ -379,8 +338,8 @@ abstract class Assert { self::assertThat( $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Callable, + new TraversableContainsOnly( + NativeType::Callable->value, ), $message, ); @@ -397,8 +356,8 @@ abstract class Assert { self::assertThat( $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Float, + new TraversableContainsOnly( + NativeType::Float->value, ), $message, ); @@ -415,8 +374,8 @@ abstract class Assert { self::assertThat( $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Int, + new TraversableContainsOnly( + NativeType::Int->value, ), $message, ); @@ -433,8 +392,8 @@ abstract class Assert { self::assertThat( $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Iterable, + new TraversableContainsOnly( + NativeType::Iterable->value, ), $message, ); @@ -451,8 +410,8 @@ abstract class Assert { self::assertThat( $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Null, + new TraversableContainsOnly( + NativeType::Null->value, ), $message, ); @@ -469,8 +428,8 @@ abstract class Assert { self::assertThat( $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Numeric, + new TraversableContainsOnly( + NativeType::Numeric->value, ), $message, ); @@ -487,8 +446,8 @@ abstract class Assert { self::assertThat( $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Object, + new TraversableContainsOnly( + NativeType::Object->value, ), $message, ); @@ -505,8 +464,8 @@ abstract class Assert { self::assertThat( $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Resource, + new TraversableContainsOnly( + NativeType::Resource->value, ), $message, ); @@ -523,8 +482,8 @@ abstract class Assert { self::assertThat( $haystack, - TraversableContainsOnly::forNativeType( - NativeType::ClosedResource, + new TraversableContainsOnly( + NativeType::ClosedResource->value, ), $message, ); @@ -541,8 +500,8 @@ abstract class Assert { self::assertThat( $haystack, - TraversableContainsOnly::forNativeType( - NativeType::Scalar, + new TraversableContainsOnly( + NativeType::Scalar->value, ), $message, ); @@ -559,8 +518,8 @@ abstract class Assert { self::assertThat( $haystack, - TraversableContainsOnly::forNativeType( - NativeType::String, + new TraversableContainsOnly( + NativeType::String->value, ), $message, ); @@ -579,7 +538,10 @@ abstract class Assert { self::assertThat( $haystack, - TraversableContainsOnly::forClassOrInterface($className), + new TraversableContainsOnly( + $className, + false, + ), $message, ); } @@ -593,7 +555,7 @@ abstract class Assert * @throws Exception * @throws ExpectationFailedException * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6056 + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6055 */ final public static function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void { @@ -601,56 +563,14 @@ abstract class Assert $isNativeType = self::isNativeType($type); } - if ($isNativeType) { - $replacement = match ($type) { - 'array' => 'assertContainsNotOnlyArray', - 'bool' => 'assertContainsNotOnlyBool', - 'boolean' => 'assertContainsNotOnlyBool', - 'callable' => 'assertContainsNotOnlyCallable', - 'double' => 'assertContainsNotOnlyFloat', - 'float' => 'assertContainsNotOnlyFloat', - 'int' => 'assertContainsNotOnlyInt', - 'integer' => 'assertContainsNotOnlyInt', - 'iterable' => 'assertContainsNotOnlyIterable', - 'null' => 'assertContainsNotOnlyNull', - 'numeric' => 'assertContainsNotOnlyNumeric', - 'object' => 'assertContainsNotOnlyObject', - 'real' => 'assertContainsNotOnlyFloat', - 'resource' => 'assertContainsNotOnlyResource', - 'resource (closed)' => 'assertContainsNotOnlyClosedResource', - 'scalar' => 'assertContainsNotOnlyScalar', - 'string' => 'assertContainsNotOnlyString', - }; - - EventFacade::emitter()->testTriggeredPhpunitDeprecation( - null, - sprintf( - 'assertNotContainsOnly() is deprecated and will be removed in PHPUnit 12. ' . - 'Please use %s($haystack) instead of assertNotContainsOnly(\'%s\', $haystack).', - $replacement, - $type, - ), - ); - - $constraint = TraversableContainsOnly::forNativeType(self::mapNativeType($type)); - } else { - EventFacade::emitter()->testTriggeredPhpunitDeprecation( - null, - sprintf( - 'assertNotContainsOnly() is deprecated and will be removed in PHPUnit 12. ' . - 'Please use assertContainsNotOnlyInstancesOf(\'%s\', $haystack) instead of assertNotContainsOnly(\'%s\', $haystack).', - $type, - $type, - ), - ); - - /** @phpstan-ignore argument.type */ - $constraint = TraversableContainsOnly::forClassOrInterface($type); - } - self::assertThat( $haystack, - new LogicalNot($constraint), + new LogicalNot( + new TraversableContainsOnly( + $type, + $isNativeType, + ), + ), $message, ); } @@ -667,8 +587,8 @@ abstract class Assert self::assertThat( $haystack, new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Array, + new TraversableContainsOnly( + NativeType::Array->value, ), ), $message, @@ -687,8 +607,8 @@ abstract class Assert self::assertThat( $haystack, new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Bool, + new TraversableContainsOnly( + NativeType::Bool->value, ), ), $message, @@ -707,8 +627,8 @@ abstract class Assert self::assertThat( $haystack, new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Callable, + new TraversableContainsOnly( + NativeType::Callable->value, ), ), $message, @@ -727,8 +647,8 @@ abstract class Assert self::assertThat( $haystack, new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Float, + new TraversableContainsOnly( + NativeType::Float->value, ), ), $message, @@ -747,8 +667,8 @@ abstract class Assert self::assertThat( $haystack, new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Int, + new TraversableContainsOnly( + NativeType::Int->value, ), ), $message, @@ -767,8 +687,8 @@ abstract class Assert self::assertThat( $haystack, new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Iterable, + new TraversableContainsOnly( + NativeType::Iterable->value, ), ), $message, @@ -787,8 +707,8 @@ abstract class Assert self::assertThat( $haystack, new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Null, + new TraversableContainsOnly( + NativeType::Null->value, ), ), $message, @@ -807,8 +727,8 @@ abstract class Assert self::assertThat( $haystack, new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Numeric, + new TraversableContainsOnly( + NativeType::Numeric->value, ), ), $message, @@ -827,8 +747,8 @@ abstract class Assert self::assertThat( $haystack, new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Object, + new TraversableContainsOnly( + NativeType::Object->value, ), ), $message, @@ -847,8 +767,8 @@ abstract class Assert self::assertThat( $haystack, new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Resource, + new TraversableContainsOnly( + NativeType::Resource->value, ), ), $message, @@ -867,8 +787,8 @@ abstract class Assert self::assertThat( $haystack, new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::ClosedResource, + new TraversableContainsOnly( + NativeType::ClosedResource->value, ), ), $message, @@ -887,8 +807,8 @@ abstract class Assert self::assertThat( $haystack, new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::Scalar, + new TraversableContainsOnly( + NativeType::Scalar->value, ), ), $message, @@ -907,8 +827,8 @@ abstract class Assert self::assertThat( $haystack, new LogicalNot( - TraversableContainsOnly::forNativeType( - NativeType::String, + new TraversableContainsOnly( + NativeType::String->value, ), ), $message, @@ -929,7 +849,10 @@ abstract class Assert self::assertThat( $haystack, new LogicalNot( - TraversableContainsOnly::forClassOrInterface($className), + new TraversableContainsOnly( + $className, + false, + ), ), $message, ); @@ -1802,7 +1725,7 @@ abstract class Assert { self::assertThat( $actual, - new IsType(NativeType::Array), + new IsType(IsType::TYPE_ARRAY), $message, ); } @@ -1819,7 +1742,7 @@ abstract class Assert { self::assertThat( $actual, - new IsType(NativeType::Bool), + new IsType(IsType::TYPE_BOOL), $message, ); } @@ -1836,7 +1759,7 @@ abstract class Assert { self::assertThat( $actual, - new IsType(NativeType::Float), + new IsType(IsType::TYPE_FLOAT), $message, ); } @@ -1853,7 +1776,7 @@ abstract class Assert { self::assertThat( $actual, - new IsType(NativeType::Int), + new IsType(IsType::TYPE_INT), $message, ); } @@ -1870,7 +1793,7 @@ abstract class Assert { self::assertThat( $actual, - new IsType(NativeType::Numeric), + new IsType(IsType::TYPE_NUMERIC), $message, ); } @@ -1887,7 +1810,7 @@ abstract class Assert { self::assertThat( $actual, - new IsType(NativeType::Object), + new IsType(IsType::TYPE_OBJECT), $message, ); } @@ -1904,7 +1827,7 @@ abstract class Assert { self::assertThat( $actual, - new IsType(NativeType::Resource), + new IsType(IsType::TYPE_RESOURCE), $message, ); } @@ -1921,7 +1844,7 @@ abstract class Assert { self::assertThat( $actual, - new IsType(NativeType::ClosedResource), + new IsType(IsType::TYPE_CLOSED_RESOURCE), $message, ); } @@ -1938,7 +1861,7 @@ abstract class Assert { self::assertThat( $actual, - new IsType(NativeType::String), + new IsType(IsType::TYPE_STRING), $message, ); } @@ -1955,7 +1878,7 @@ abstract class Assert { self::assertThat( $actual, - new IsType(NativeType::Scalar), + new IsType(IsType::TYPE_SCALAR), $message, ); } @@ -1972,7 +1895,7 @@ abstract class Assert { self::assertThat( $actual, - new IsType(NativeType::Callable), + new IsType(IsType::TYPE_CALLABLE), $message, ); } @@ -1989,7 +1912,7 @@ abstract class Assert { self::assertThat( $actual, - new IsType(NativeType::Iterable), + new IsType(IsType::TYPE_ITERABLE), $message, ); } @@ -2006,7 +1929,7 @@ abstract class Assert { self::assertThat( $actual, - new LogicalNot(new IsType(NativeType::Array)), + new LogicalNot(new IsType(IsType::TYPE_ARRAY)), $message, ); } @@ -2023,7 +1946,7 @@ abstract class Assert { self::assertThat( $actual, - new LogicalNot(new IsType(NativeType::Bool)), + new LogicalNot(new IsType(IsType::TYPE_BOOL)), $message, ); } @@ -2040,7 +1963,7 @@ abstract class Assert { self::assertThat( $actual, - new LogicalNot(new IsType(NativeType::Float)), + new LogicalNot(new IsType(IsType::TYPE_FLOAT)), $message, ); } @@ -2057,7 +1980,7 @@ abstract class Assert { self::assertThat( $actual, - new LogicalNot(new IsType(NativeType::Int)), + new LogicalNot(new IsType(IsType::TYPE_INT)), $message, ); } @@ -2074,7 +1997,7 @@ abstract class Assert { self::assertThat( $actual, - new LogicalNot(new IsType(NativeType::Numeric)), + new LogicalNot(new IsType(IsType::TYPE_NUMERIC)), $message, ); } @@ -2091,7 +2014,7 @@ abstract class Assert { self::assertThat( $actual, - new LogicalNot(new IsType(NativeType::Object)), + new LogicalNot(new IsType(IsType::TYPE_OBJECT)), $message, ); } @@ -2108,7 +2031,7 @@ abstract class Assert { self::assertThat( $actual, - new LogicalNot(new IsType(NativeType::Resource)), + new LogicalNot(new IsType(IsType::TYPE_RESOURCE)), $message, ); } @@ -2125,7 +2048,7 @@ abstract class Assert { self::assertThat( $actual, - new LogicalNot(new IsType(NativeType::ClosedResource)), + new LogicalNot(new IsType(IsType::TYPE_CLOSED_RESOURCE)), $message, ); } @@ -2142,7 +2065,7 @@ abstract class Assert { self::assertThat( $actual, - new LogicalNot(new IsType(NativeType::String)), + new LogicalNot(new IsType(IsType::TYPE_STRING)), $message, ); } @@ -2159,7 +2082,7 @@ abstract class Assert { self::assertThat( $actual, - new LogicalNot(new IsType(NativeType::Scalar)), + new LogicalNot(new IsType(IsType::TYPE_SCALAR)), $message, ); } @@ -2176,7 +2099,7 @@ abstract class Assert { self::assertThat( $actual, - new LogicalNot(new IsType(NativeType::Callable)), + new LogicalNot(new IsType(IsType::TYPE_CALLABLE)), $message, ); } @@ -2193,7 +2116,7 @@ abstract class Assert { self::assertThat( $actual, - new LogicalNot(new IsType(NativeType::Iterable)), + new LogicalNot(new IsType(IsType::TYPE_ITERABLE)), $message, ); } @@ -2347,6 +2270,29 @@ abstract class Assert self::assertThat($string, new StringMatchesFormatDescription($format), $message); } + /** + * Asserts that a string does not match a given format string. + * + * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5472 + */ + final public static function assertStringNotMatchesFormat(string $format, string $string, string $message = ''): void + { + Event\Facade::emitter()->testTriggeredPhpunitDeprecation( + null, + 'assertStringNotMatchesFormat() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + + self::assertThat( + $string, + new LogicalNot( + new StringMatchesFormatDescription($format), + ), + $message, + ); + } + /** * Asserts that a string matches a given format file. * @@ -2369,6 +2315,37 @@ abstract class Assert ); } + /** + * Asserts that a string does not match a given format string. + * + * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5472 + */ + final public static function assertStringNotMatchesFormatFile(string $formatFile, string $string, string $message = ''): void + { + Event\Facade::emitter()->testTriggeredPhpunitDeprecation( + null, + 'assertStringNotMatchesFormatFile() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + + self::assertFileExists($formatFile, $message); + + $formatDescription = file_get_contents($formatFile); + + self::assertIsString($formatDescription); + + self::assertThat( + $string, + new LogicalNot( + new StringMatchesFormatDescription( + $formatDescription, + ), + ), + $message, + ); + } + /** * Asserts that a string starts with a given prefix. * @@ -2806,76 +2783,76 @@ abstract class Assert * * @throws Exception * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6060 + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6055 */ final public static function containsOnly(string $type): TraversableContainsOnly { - return TraversableContainsOnly::forNativeType(self::mapNativeType($type)); + return new TraversableContainsOnly($type); } final public static function containsOnlyArray(): TraversableContainsOnly { - return TraversableContainsOnly::forNativeType(NativeType::Array); + return new TraversableContainsOnly(NativeType::Array->value); } final public static function containsOnlyBool(): TraversableContainsOnly { - return TraversableContainsOnly::forNativeType(NativeType::Bool); + return new TraversableContainsOnly(NativeType::Bool->value); } final public static function containsOnlyCallable(): TraversableContainsOnly { - return TraversableContainsOnly::forNativeType(NativeType::Callable); + return new TraversableContainsOnly(NativeType::Callable->value); } final public static function containsOnlyFloat(): TraversableContainsOnly { - return TraversableContainsOnly::forNativeType(NativeType::Float); + return new TraversableContainsOnly(NativeType::Float->value); } final public static function containsOnlyInt(): TraversableContainsOnly { - return TraversableContainsOnly::forNativeType(NativeType::Int); + return new TraversableContainsOnly(NativeType::Int->value); } final public static function containsOnlyIterable(): TraversableContainsOnly { - return TraversableContainsOnly::forNativeType(NativeType::Iterable); + return new TraversableContainsOnly(NativeType::Iterable->value); } final public static function containsOnlyNull(): TraversableContainsOnly { - return TraversableContainsOnly::forNativeType(NativeType::Null); + return new TraversableContainsOnly(NativeType::Null->value); } final public static function containsOnlyNumeric(): TraversableContainsOnly { - return TraversableContainsOnly::forNativeType(NativeType::Numeric); + return new TraversableContainsOnly(NativeType::Numeric->value); } final public static function containsOnlyObject(): TraversableContainsOnly { - return TraversableContainsOnly::forNativeType(NativeType::Object); + return new TraversableContainsOnly(NativeType::Object->value); } final public static function containsOnlyResource(): TraversableContainsOnly { - return TraversableContainsOnly::forNativeType(NativeType::Resource); + return new TraversableContainsOnly(NativeType::Resource->value); } final public static function containsOnlyClosedResource(): TraversableContainsOnly { - return TraversableContainsOnly::forNativeType(NativeType::ClosedResource); + return new TraversableContainsOnly(NativeType::ClosedResource->value); } final public static function containsOnlyScalar(): TraversableContainsOnly { - return TraversableContainsOnly::forNativeType(NativeType::Scalar); + return new TraversableContainsOnly(NativeType::Scalar->value); } final public static function containsOnlyString(): TraversableContainsOnly { - return TraversableContainsOnly::forNativeType(NativeType::String); + return new TraversableContainsOnly(NativeType::String->value); } /** @@ -2885,7 +2862,7 @@ abstract class Assert */ final public static function containsOnlyInstancesOf(string $className): TraversableContainsOnly { - return TraversableContainsOnly::forClassOrInterface($className); + return new TraversableContainsOnly($className, false); } final public static function arrayHasKey(mixed $key): ArrayHasKey @@ -2971,106 +2948,74 @@ abstract class Assert final public static function isArray(): IsType { - return new IsType(NativeType::Array); + return new IsType(NativeType::Array->value); } final public static function isBool(): IsType { - return new IsType(NativeType::Bool); + return new IsType(NativeType::Bool->value); } final public static function isCallable(): IsType { - return new IsType(NativeType::Callable); + return new IsType(NativeType::Callable->value); } final public static function isFloat(): IsType { - return new IsType(NativeType::Float); + return new IsType(NativeType::Float->value); } final public static function isInt(): IsType { - return new IsType(NativeType::Int); + return new IsType(NativeType::Int->value); } final public static function isIterable(): IsType { - return new IsType(NativeType::Iterable); + return new IsType(NativeType::Iterable->value); } final public static function isNumeric(): IsType { - return new IsType(NativeType::Numeric); + return new IsType(NativeType::Numeric->value); } final public static function isObject(): IsType { - return new IsType(NativeType::Object); + return new IsType(NativeType::Object->value); } final public static function isResource(): IsType { - return new IsType(NativeType::Resource); + return new IsType(NativeType::Resource->value); } final public static function isClosedResource(): IsType { - return new IsType(NativeType::ClosedResource); + return new IsType(NativeType::ClosedResource->value); } final public static function isScalar(): IsType { - return new IsType(NativeType::Scalar); + return new IsType(NativeType::Scalar->value); } final public static function isString(): IsType { - return new IsType(NativeType::String); + return new IsType(NativeType::String->value); } /** * @param 'array'|'bool'|'boolean'|'callable'|'double'|'float'|'int'|'integer'|'iterable'|'null'|'numeric'|'object'|'real'|'resource (closed)'|'resource'|'scalar'|'string' $type * - * @throws UnknownNativeTypeException + * @throws Exception * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6053 + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6052 */ final public static function isType(string $type): IsType { - $constraint = new IsType(self::mapNativeType($type)); - - $replacement = match ($type) { - 'array' => 'isArray', - 'bool' => 'isBool', - 'boolean' => 'isBool', - 'callable' => 'isCallable', - 'double' => 'isFloat', - 'float' => 'isFloat', - 'int' => 'isInt', - 'integer' => 'isInt', - 'iterable' => 'isIterable', - 'null' => 'isNull', - 'numeric' => 'isNumeric', - 'object' => 'isObject', - 'real' => 'isFloat', - 'resource' => 'isResource', - 'resource (closed)' => 'isClosedResource', - 'scalar' => 'isScalar', - 'string' => 'isString', - }; - - EventFacade::emitter()->testTriggeredPhpunitDeprecation( - null, - sprintf( - 'isType(\'%s\') is deprecated and will be removed in PHPUnit 12. ' . - 'Please use the %s() method instead.', - $type, - $replacement, - ), - ); - - return $constraint; + return new IsType($type); } final public static function lessThan(mixed $value): LessThan @@ -3186,53 +3131,9 @@ abstract class Assert private static function isNativeType(string $type): bool { - return $type === 'array' || - $type === 'bool' || - $type === 'boolean' || - $type === 'callable' || - $type === 'double' || - $type === 'float' || - $type === 'int' || - $type === 'integer' || - $type === 'iterable' || - $type === 'null' || - $type === 'numeric' || - $type === 'object' || - $type === 'real' || - $type === 'resource' || - $type === 'resource (closed)' || - $type === 'scalar' || - $type === 'string'; - } - - /** - * @throws UnknownNativeTypeException - */ - private static function mapNativeType(string $type): NativeType - { - if (!self::isNativeType($type)) { - throw new UnknownNativeTypeException($type); - } - - /** @phpstan-ignore match.unhandled */ return match ($type) { - 'array' => NativeType::Array, - 'bool' => NativeType::Bool, - 'boolean' => NativeType::Bool, - 'callable' => NativeType::Callable, - 'double' => NativeType::Float, - 'float' => NativeType::Float, - 'int' => NativeType::Int, - 'integer' => NativeType::Int, - 'iterable' => NativeType::Iterable, - 'null' => NativeType::Null, - 'numeric' => NativeType::Numeric, - 'object' => NativeType::Object, - 'real' => NativeType::Float, - 'resource' => NativeType::Resource, - 'resource (closed)' => NativeType::ClosedResource, - 'scalar' => NativeType::Scalar, - 'string' => NativeType::String, + 'numeric', 'integer', 'int', 'iterable', 'float', 'string', 'boolean', 'bool', 'null', 'array', 'object', 'resource', 'scalar' => true, + default => false, }; } } diff --git a/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php b/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php index e3e3633..cfe2557 100644 --- a/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php +++ b/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php @@ -59,7 +59,13 @@ use PHPUnit\Framework\MockObject\Rule\InvokedAtLeastCount as InvokedAtLeastCount use PHPUnit\Framework\MockObject\Rule\InvokedAtLeastOnce as InvokedAtLeastOnceMatcher; use PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount as InvokedAtMostCountMatcher; use PHPUnit\Framework\MockObject\Rule\InvokedCount as InvokedCountMatcher; +use PHPUnit\Framework\MockObject\Stub\ConsecutiveCalls as ConsecutiveCallsStub; use PHPUnit\Framework\MockObject\Stub\Exception as ExceptionStub; +use PHPUnit\Framework\MockObject\Stub\ReturnArgument as ReturnArgumentStub; +use PHPUnit\Framework\MockObject\Stub\ReturnCallback as ReturnCallbackStub; +use PHPUnit\Framework\MockObject\Stub\ReturnSelf as ReturnSelfStub; +use PHPUnit\Framework\MockObject\Stub\ReturnStub; +use PHPUnit\Framework\MockObject\Stub\ReturnValueMap as ReturnValueMapStub; use PHPUnit\Util\Xml\XmlException; use Throwable; @@ -281,7 +287,7 @@ if (!function_exists('PHPUnit\Framework\assertContainsOnly')) { * @throws Exception * @throws ExpectationFailedException * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6056 + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6055 * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -557,7 +563,7 @@ if (!function_exists('PHPUnit\Framework\assertNotContainsOnly')) { * @throws Exception * @throws ExpectationFailedException * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6056 + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/6055 * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2468,6 +2474,24 @@ if (!function_exists('PHPUnit\Framework\assertStringMatchesFormat')) { } } +if (!function_exists('PHPUnit\Framework\assertStringNotMatchesFormat')) { + /** + * Asserts that a string does not match a given format string. + * + * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5472 + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see Assert::assertStringNotMatchesFormat + */ + function assertStringNotMatchesFormat(string $format, string $string, string $message = ''): void + { + Assert::assertStringNotMatchesFormat(...func_get_args()); + } +} + if (!function_exists('PHPUnit\Framework\assertStringMatchesFormatFile')) { /** * Asserts that a string matches a given format file. @@ -2484,6 +2508,24 @@ if (!function_exists('PHPUnit\Framework\assertStringMatchesFormatFile')) { } } +if (!function_exists('PHPUnit\Framework\assertStringNotMatchesFormatFile')) { + /** + * Asserts that a string does not match a given format string. + * + * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5472 + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see Assert::assertStringNotMatchesFormatFile + */ + function assertStringNotMatchesFormatFile(string $formatFile, string $string, string $message = ''): void + { + Assert::assertStringNotMatchesFormatFile(...func_get_args()); + } +} + if (!function_exists('PHPUnit\Framework\assertStringStartsWith')) { /** * Asserts that a string starts with a given prefix. @@ -3406,9 +3448,61 @@ if (!function_exists('PHPUnit\Framework\atMost')) { } } +if (!function_exists('PHPUnit\Framework\returnValue')) { + function returnValue(mixed $value): ReturnStub + { + return new ReturnStub($value); + } +} + +if (!function_exists('PHPUnit\Framework\returnValueMap')) { + /** + * @param array $valueMap + */ + function returnValueMap(array $valueMap): ReturnValueMapStub + { + return new ReturnValueMapStub($valueMap); + } +} + +if (!function_exists('PHPUnit\Framework\returnArgument')) { + function returnArgument(int $argumentIndex): ReturnArgumentStub + { + return new ReturnArgumentStub($argumentIndex); + } +} + +if (!function_exists('PHPUnit\Framework\returnCallback')) { + function returnCallback(callable $callback): ReturnCallbackStub + { + return new ReturnCallbackStub($callback); + } +} + +if (!function_exists('PHPUnit\Framework\returnSelf')) { + /** + * Returns the current object. + * + * This method is useful when mocking a fluent interface. + */ + function returnSelf(): ReturnSelfStub + { + return new ReturnSelfStub; + } +} + if (!function_exists('PHPUnit\Framework\throwException')) { function throwException(Throwable $exception): ExceptionStub { return new ExceptionStub($exception); } } + +if (!function_exists('PHPUnit\Framework\onConsecutiveCalls')) { + function onConsecutiveCalls(): ConsecutiveCallsStub + { + $arguments = func_get_args(); + + return new ConsecutiveCallsStub($arguments); + } +} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversClassesThatImplementInterface.php b/vendor/phpunit/phpunit/src/Framework/Attributes/CoversClassesThatImplementInterface.php deleted file mode 100644 index 69bcd84..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversClassesThatImplementInterface.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] -final readonly class CoversClassesThatImplementInterface -{ - /** - * @var class-string - */ - private string $interfaceName; - - /** - * @param class-string $interfaceName - */ - public function __construct(string $interfaceName) - { - $this->interfaceName = $interfaceName; - } - - /** - * @return class-string - */ - public function interfaceName(): string - { - return $this->interfaceName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversNamespace.php b/vendor/phpunit/phpunit/src/Framework/Attributes/CoversNamespace.php deleted file mode 100644 index 50d82b9..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/CoversNamespace.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] -final readonly class CoversNamespace -{ - /** - * @var non-empty-string - */ - private string $namespace; - - /** - * @param non-empty-string $namespace - */ - public function __construct(string $namespace) - { - $this->namespace = $namespace; - } - - /** - * @return non-empty-string - */ - public function namespace(): string - { - return $this->namespace; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresEnvironmentVariable.php b/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresEnvironmentVariable.php deleted file mode 100644 index 7e460b9..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/RequiresEnvironmentVariable.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] -final readonly class RequiresEnvironmentVariable -{ - private string $environmentVariableName; - private null|string $value; - - public function __construct(string $environmentVariableName, null|string $value = null) - { - $this->environmentVariableName = $environmentVariableName; - $this->value = $value; - } - - public function environmentVariableName(): string - { - return $this->environmentVariableName; - } - - public function value(): null|string - { - return $this->value; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/UsesClassesThatExtendClass.php b/vendor/phpunit/phpunit/src/Framework/Attributes/UsesClassesThatExtendClass.php deleted file mode 100644 index d1aa73f..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/UsesClassesThatExtendClass.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] -final readonly class UsesClassesThatExtendClass -{ - /** - * @var class-string - */ - private string $className; - - /** - * @param class-string $className - */ - public function __construct(string $className) - { - $this->className = $className; - } - - /** - * @return class-string - */ - public function className(): string - { - return $this->className; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/UsesClassesThatImplementInterface.php b/vendor/phpunit/phpunit/src/Framework/Attributes/UsesClassesThatImplementInterface.php deleted file mode 100644 index 0f2241c..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/UsesClassesThatImplementInterface.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] -final readonly class UsesClassesThatImplementInterface -{ - /** - * @var class-string - */ - private string $interfaceName; - - /** - * @param class-string $interfaceName - */ - public function __construct(string $interfaceName) - { - $this->interfaceName = $interfaceName; - } - - /** - * @return class-string - */ - public function interfaceName(): string - { - return $this->interfaceName; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Attributes/UsesNamespace.php b/vendor/phpunit/phpunit/src/Framework/Attributes/UsesNamespace.php deleted file mode 100644 index ad929cd..0000000 --- a/vendor/phpunit/phpunit/src/Framework/Attributes/UsesNamespace.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Framework\Attributes; - -use Attribute; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] -final readonly class UsesNamespace -{ - /** - * @var non-empty-string - */ - private string $namespace; - - /** - * @param non-empty-string $namespace - */ - public function __construct(string $namespace) - { - $this->namespace = $namespace; - } - - /** - * @return non-empty-string - */ - public function namespace(): string - { - return $this->namespace; - } -} diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalXor.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalXor.php index 3b40a12..e8ffc34 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalXor.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalXor.php @@ -59,7 +59,7 @@ final class LogicalXor extends BinaryOperator return array_reduce( $constraints, - static fn (?bool $matches, Constraint $constraint): bool => $matches xor $constraint->evaluate($other, '', true), + static fn (bool $matches, Constraint $constraint): bool => $matches xor $constraint->evaluate($other, '', true), $initial->evaluate($other, '', true), ); } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsOnly.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsOnly.php index 50da87f..da752e9 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsOnly.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsOnly.php @@ -9,8 +9,8 @@ */ namespace PHPUnit\Framework\Constraint; +use PHPUnit\Framework\Exception; use PHPUnit\Framework\ExpectationFailedException; -use PHPUnit\Framework\NativeType; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -20,23 +20,20 @@ final class TraversableContainsOnly extends Constraint private readonly Constraint $constraint; private readonly string $type; - public static function forNativeType(NativeType $type): self - { - return new self(new IsType($type), $type->value); - } - /** - * @param class-string $type + * @param 'array'|'bool'|'boolean'|'callable'|'double'|'float'|'int'|'integer'|'iterable'|'null'|'numeric'|'object'|'real'|'resource (closed)'|'resource'|'scalar'|'string'|class-string $type + * + * @throws Exception */ - public static function forClassOrInterface(string $type): self + public function __construct(string $type, bool $isNativeType = true) { - return new self(new IsInstanceOf($type), $type); - } + if ($isNativeType) { + $this->constraint = new IsType($type); + } else { + $this->constraint = new IsInstanceOf($type); + } - private function __construct(IsInstanceOf|IsType $constraint, string $type) - { - $this->constraint = $constraint; - $this->type = $type; + $this->type = $type; } /** diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsType.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsType.php index c2bff8e..4f1c709 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsType.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsType.php @@ -21,17 +21,117 @@ use function is_object; use function is_scalar; use function is_string; use function sprintf; -use PHPUnit\Framework\NativeType; +use PHPUnit\Framework\UnknownTypeException; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ final class IsType extends Constraint { - private readonly NativeType $type; + /** + * @var string + */ + public const TYPE_ARRAY = 'array'; - public function __construct(NativeType $type) + /** + * @var string + */ + public const TYPE_BOOL = 'bool'; + + /** + * @var string + */ + public const TYPE_FLOAT = 'float'; + + /** + * @var string + */ + public const TYPE_INT = 'int'; + + /** + * @var string + */ + public const TYPE_NULL = 'null'; + + /** + * @var string + */ + public const TYPE_NUMERIC = 'numeric'; + + /** + * @var string + */ + public const TYPE_OBJECT = 'object'; + + /** + * @var string + */ + public const TYPE_RESOURCE = 'resource'; + + /** + * @var string + */ + public const TYPE_CLOSED_RESOURCE = 'resource (closed)'; + + /** + * @var string + */ + public const TYPE_STRING = 'string'; + + /** + * @var string + */ + public const TYPE_SCALAR = 'scalar'; + + /** + * @var string + */ + public const TYPE_CALLABLE = 'callable'; + + /** + * @var string + */ + public const TYPE_ITERABLE = 'iterable'; + + /** + * @var array + */ + private const KNOWN_TYPES = [ + 'array' => true, + 'boolean' => true, + 'bool' => true, + 'double' => true, + 'float' => true, + 'integer' => true, + 'int' => true, + 'null' => true, + 'numeric' => true, + 'object' => true, + 'real' => true, + 'resource' => true, + 'resource (closed)' => true, + 'string' => true, + 'scalar' => true, + 'callable' => true, + 'iterable' => true, + ]; + + /** + * @var 'array'|'bool'|'boolean'|'callable'|'double'|'float'|'int'|'integer'|'iterable'|'null'|'numeric'|'object'|'real'|'resource (closed)'|'resource'|'scalar'|'string' + */ + private readonly string $type; + + /** + * @param 'array'|'bool'|'boolean'|'callable'|'double'|'float'|'int'|'integer'|'iterable'|'null'|'numeric'|'object'|'real'|'resource (closed)'|'resource'|'scalar'|'string' $type + * + * @throws UnknownTypeException + */ + public function __construct(string $type) { + if (!isset(self::KNOWN_TYPES[$type])) { + throw new UnknownTypeException($type); + } + $this->type = $type; } @@ -42,7 +142,7 @@ final class IsType extends Constraint { return sprintf( 'is of type %s', - $this->type->value, + $this->type, ); } @@ -53,45 +153,49 @@ final class IsType extends Constraint protected function matches(mixed $other): bool { switch ($this->type) { - case NativeType::Numeric: + case 'numeric': return is_numeric($other); - case NativeType::Int: + case 'integer': + case 'int': return is_int($other); - case NativeType::Float: + case 'double': + case 'float': + case 'real': return is_float($other); - case NativeType::String: + case 'string': return is_string($other); - case NativeType::Bool: + case 'boolean': + case 'bool': return is_bool($other); - case NativeType::Null: + case 'null': return null === $other; - case NativeType::Array: + case 'array': return is_array($other); - case NativeType::Object: + case 'object': return is_object($other); - case NativeType::Resource: + case 'resource': $type = gettype($other); return $type === 'resource' || $type === 'resource (closed)'; - case NativeType::ClosedResource: + case 'resource (closed)': return gettype($other) === 'resource (closed)'; - case NativeType::Scalar: + case 'scalar': return is_scalar($other); - case NativeType::Callable: + case 'callable': return is_callable($other); - case NativeType::Iterable: + case 'iterable': return is_iterable($other); default: diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/UnknownNativeTypeException.php b/vendor/phpunit/phpunit/src/Framework/Exception/UnknownTypeException.php similarity index 76% rename from vendor/phpunit/phpunit/src/Framework/Exception/UnknownNativeTypeException.php rename to vendor/phpunit/phpunit/src/Framework/Exception/UnknownTypeException.php index 09da460..b58b695 100644 --- a/vendor/phpunit/phpunit/src/Framework/Exception/UnknownNativeTypeException.php +++ b/vendor/phpunit/phpunit/src/Framework/Exception/UnknownTypeException.php @@ -16,14 +16,14 @@ use function sprintf; * * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class UnknownNativeTypeException extends InvalidArgumentException +final class UnknownTypeException extends InvalidArgumentException { - public function __construct(string $type) + public function __construct(string $name) { parent::__construct( sprintf( - 'Native type "%s" is not known', - $type, + 'Type "%s" is not known', + $name, ), ); } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/CannotCloneTestDoubleForReadonlyClassException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/CannotCloneTestDoubleForReadonlyClassException.php new file mode 100644 index 0000000..ed1cb82 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/CannotCloneTestDoubleForReadonlyClassException.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Framework\MockObject; + +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @codeCoverageIgnore + */ +final class CannotCloneTestDoubleForReadonlyClassException extends \PHPUnit\Framework\Exception implements Exception +{ + public function __construct() + { + parent::__construct( + 'Cloning test doubles for readonly classes is not supported on PHP 8.2', + ); + } +} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/CannotUseAddMethodsException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/CannotUseAddMethodsException.php new file mode 100644 index 0000000..9fc5078 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/CannotUseAddMethodsException.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Framework\MockObject\Generator; + +use function sprintf; + +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class CannotUseAddMethodsException extends \PHPUnit\Framework\Exception implements Exception +{ + public function __construct(string $type, string $methodName) + { + parent::__construct( + sprintf( + 'Trying to configure method "%s" with addMethods(), but it exists in class "%s". Use onlyMethods() for methods that exist in the class', + $methodName, + $type, + ), + ); + } +} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/OriginalConstructorInvocationRequiredException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/OriginalConstructorInvocationRequiredException.php new file mode 100644 index 0000000..b284d94 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/OriginalConstructorInvocationRequiredException.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Framework\MockObject\Generator; + +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class OriginalConstructorInvocationRequiredException extends \PHPUnit\Framework\Exception implements Exception +{ + public function __construct() + { + parent::__construct('Proxying to original methods requires invoking the original constructor'); + } +} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/SoapExtensionNotAvailableException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/SoapExtensionNotAvailableException.php new file mode 100644 index 0000000..f6f513b --- /dev/null +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/SoapExtensionNotAvailableException.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Framework\MockObject\Generator; + +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class SoapExtensionNotAvailableException extends \PHPUnit\Framework\Exception implements Exception +{ + public function __construct() + { + parent::__construct( + 'The SOAP extension is required to generate a test double from WSDL', + ); + } +} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownClassException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownClassException.php new file mode 100644 index 0000000..c512745 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownClassException.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Framework\MockObject\Generator; + +use function sprintf; + +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class UnknownClassException extends \PHPUnit\Framework\Exception implements Exception +{ + public function __construct(string $className) + { + parent::__construct( + sprintf( + 'Class "%s" does not exist', + $className, + ), + ); + } +} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownTraitException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownTraitException.php new file mode 100644 index 0000000..a536b15 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/UnknownTraitException.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Framework\MockObject\Generator; + +use function sprintf; + +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5243 + */ +final class UnknownTraitException extends \PHPUnit\Framework\Exception implements Exception +{ + public function __construct(string $traitName) + { + parent::__construct( + sprintf( + 'Trait "%s" does not exist', + $traitName, + ), + ); + } +} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Generator.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Generator.php index 334279f..5d18770 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Generator.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Generator.php @@ -10,6 +10,10 @@ namespace PHPUnit\Framework\MockObject\Generator; use const PHP_EOL; +use const PHP_MAJOR_VERSION; +use const PHP_MINOR_VERSION; +use const PREG_OFFSET_CAPTURE; +use const WSDL_CACHE_NONE; use function array_merge; use function array_pop; use function array_unique; @@ -17,28 +21,44 @@ use function assert; use function class_exists; use function count; use function explode; +use function extension_loaded; use function implode; use function in_array; use function interface_exists; use function is_array; +use function is_object; use function md5; use function method_exists; use function mt_rand; use function preg_match; +use function preg_match_all; +use function range; use function serialize; use function sort; use function sprintf; +use function str_contains; +use function str_replace; +use function strlen; +use function strpos; use function substr; use function trait_exists; use Exception; use Iterator; use IteratorAggregate; +use PHPUnit\Event\Code\NoTestCaseObjectOnCallStackException; +use PHPUnit\Event\Code\TestMethodBuilder; +use PHPUnit\Event\Facade as EventFacade; +use PHPUnit\Framework\InvalidArgumentException; use PHPUnit\Framework\MockObject\ConfigurableMethod; use PHPUnit\Framework\MockObject\DoubledCloneMethod; +use PHPUnit\Framework\MockObject\ErrorCloneMethod; +use PHPUnit\Framework\MockObject\GeneratedAsMockObject; +use PHPUnit\Framework\MockObject\GeneratedAsTestStub; use PHPUnit\Framework\MockObject\Method; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\MockObject\MockObjectApi; use PHPUnit\Framework\MockObject\MockObjectInternal; +use PHPUnit\Framework\MockObject\MutableStubApi; use PHPUnit\Framework\MockObject\ProxiedCloneMethod; use PHPUnit\Framework\MockObject\Stub; use PHPUnit\Framework\MockObject\StubApi; @@ -51,6 +71,8 @@ use ReflectionObject; use ReflectionProperty; use SebastianBergmann\Type\ReflectionMapper; use SebastianBergmann\Type\Type; +use SoapClient; +use SoapFault; use Throwable; use Traversable; @@ -64,9 +86,9 @@ final class Generator use TemplateLoader; /** - * @var non-empty-array + * @var array */ - private const array EXCLUDED_METHOD_NAMES = [ + private const EXCLUDED_METHOD_NAMES = [ '__CLASS__' => true, '__DIR__' => true, '__FILE__' => true, @@ -80,48 +102,62 @@ final class Generator ]; /** - * @var array + * @var array */ private static array $cache = []; /** * Returns a test double for the specified class. * - * @param class-string $type * @param ?list $methods - * @param array $arguments + * @param list $arguments * * @throws ClassIsEnumerationException * @throws ClassIsFinalException * @throws DuplicateMethodException * @throws InvalidMethodNameException * @throws NameAlreadyInUseException + * @throws OriginalConstructorInvocationRequiredException * @throws ReflectionException * @throws RuntimeException * @throws UnknownTypeException */ - public function testDouble(string $type, bool $mockObject, ?array $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $returnValueGeneration = true): MockObject|Stub + public function testDouble(string $type, bool $mockObject, bool $markAsMockObject, ?array $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = true, bool $callOriginalMethods = false, ?object $proxyTarget = null, bool $allowMockingUnknownTypes = true, bool $returnValueGeneration = true): MockObject|Stub { if ($type === Traversable::class) { $type = Iterator::class; } - $this->ensureKnownType($type); + if (!$allowMockingUnknownTypes) { + $this->ensureKnownType($type, $callAutoload); + } + $this->ensureValidMethods($methods); $this->ensureNameForTestDoubleClassIsAvailable($mockClassName); + if (!$callOriginalConstructor && $callOriginalMethods) { + throw new OriginalConstructorInvocationRequiredException; + } + $mock = $this->generate( $type, $mockObject, + $markAsMockObject, $methods, $mockClassName, $callOriginalClone, + $callAutoload, + $cloneArguments, + $callOriginalMethods, ); $object = $this->getObject( $mock, + $type, $callOriginalConstructor, $arguments, + $callOriginalMethods, + $proxyTarget, $returnValueGeneration, ); @@ -142,14 +178,14 @@ final class Generator * @throws RuntimeException * @throws UnknownTypeException */ - public function testDoubleForInterfaceIntersection(array $interfaces, bool $mockObject, bool $returnValueGeneration = true): MockObject|Stub + public function testDoubleForInterfaceIntersection(array $interfaces, bool $mockObject, bool $callAutoload = true, bool $returnValueGeneration = true): MockObject|Stub { if (count($interfaces) < 2) { throw new RuntimeException('At least two interfaces must be specified'); } foreach ($interfaces as $interface) { - if (!interface_exists($interface)) { + if (!interface_exists($interface, $callAutoload)) { throw new UnknownTypeException($interface); } } @@ -194,17 +230,174 @@ final class Generator eval($template->render()); - assert(interface_exists($intersectionName)); - return $this->testDouble( $intersectionName, $mockObject, + $mockObject, returnValueGeneration: $returnValueGeneration, ); } /** - * @param class-string $type + * Returns a mock object for the specified abstract class with all abstract + * methods of the class mocked. + * + * Concrete methods to mock can be specified with the $mockedMethods parameter. + * + * @param list $arguments + * @param ?list $mockedMethods + * + * @throws ClassIsEnumerationException + * @throws ClassIsFinalException + * @throws DuplicateMethodException + * @throws InvalidArgumentException + * @throws InvalidMethodNameException + * @throws NameAlreadyInUseException + * @throws OriginalConstructorInvocationRequiredException + * @throws ReflectionException + * @throws RuntimeException + * @throws UnknownClassException + * @throws UnknownTypeException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5241 + */ + public function mockObjectForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, ?array $mockedMethods = null, bool $cloneArguments = true): MockObject + { + if (class_exists($originalClassName, $callAutoload) || + interface_exists($originalClassName, $callAutoload)) { + $reflector = $this->reflectClass($originalClassName); + $methods = $mockedMethods; + + foreach ($reflector->getMethods() as $method) { + if ($method->isAbstract() && !in_array($method->getName(), $methods ?? [], true)) { + $methods[] = $method->getName(); + } + } + + if (empty($methods)) { + $methods = null; + } + + $mockObject = $this->testDouble( + $originalClassName, + true, + true, + $methods, + $arguments, + $mockClassName, + $callOriginalConstructor, + $callOriginalClone, + $callAutoload, + $cloneArguments, + ); + + assert($mockObject instanceof $originalClassName); + assert($mockObject instanceof MockObject); + + return $mockObject; + } + + throw new UnknownClassException($originalClassName); + } + + /** + * Returns a mock object for the specified trait with all abstract methods + * of the trait mocked. Concrete methods to mock can be specified with the + * `$mockedMethods` parameter. + * + * @param trait-string $traitName + * @param list $arguments + * @param ?list $mockedMethods + * + * @throws ClassIsEnumerationException + * @throws ClassIsFinalException + * @throws DuplicateMethodException + * @throws InvalidArgumentException + * @throws InvalidMethodNameException + * @throws NameAlreadyInUseException + * @throws OriginalConstructorInvocationRequiredException + * @throws ReflectionException + * @throws RuntimeException + * @throws UnknownClassException + * @throws UnknownTraitException + * @throws UnknownTypeException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5243 + */ + public function mockObjectForTrait(string $traitName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, ?array $mockedMethods = null, bool $cloneArguments = true): MockObject + { + if (!trait_exists($traitName, $callAutoload)) { + throw new UnknownTraitException($traitName); + } + + $className = $this->generateClassName( + $traitName, + '', + 'Trait_', + ); + + $classTemplate = $this->loadTemplate('trait_class.tpl'); + + $classTemplate->setVar( + [ + 'prologue' => 'abstract ', + 'class_name' => $className['className'], + 'trait_name' => $traitName, + ], + ); + + $mockTrait = new MockTrait($classTemplate->render(), $className['className']); + $mockTrait->generate(); + + return $this->mockObjectForAbstractClass($className['className'], $arguments, $mockClassName, $callOriginalConstructor, $callOriginalClone, $callAutoload, $mockedMethods, $cloneArguments); + } + + /** + * Returns an object for the specified trait. + * + * @param trait-string $traitName + * @param list $arguments + * + * @throws ReflectionException + * @throws RuntimeException + * @throws UnknownTraitException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5244 + */ + public function objectForTrait(string $traitName, string $traitClassName = '', bool $callAutoload = true, bool $callOriginalConstructor = false, array $arguments = []): object + { + if (!trait_exists($traitName, $callAutoload)) { + throw new UnknownTraitException($traitName); + } + + $className = $this->generateClassName( + $traitName, + $traitClassName, + 'Trait_', + ); + + $classTemplate = $this->loadTemplate('trait_class.tpl'); + + $classTemplate->setVar( + [ + 'prologue' => '', + 'class_name' => $className['className'], + 'trait_name' => $traitName, + ], + ); + + return $this->getObject( + new MockTrait( + $classTemplate->render(), + $className['className'], + ), + '', + $callOriginalConstructor, + $arguments, + ); + } + + /** * @param ?list $methods * * @throws ClassIsEnumerationException @@ -216,32 +409,43 @@ final class Generator * * @see https://github.com/sebastianbergmann/phpunit/issues/5476 */ - public function generate(string $type, bool $mockObject, ?array $methods = null, string $mockClassName = '', bool $callOriginalClone = true): DoubledClass + public function generate(string $type, bool $mockObject, bool $markAsMockObject, ?array $methods = null, string $mockClassName = '', bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = true, bool $callOriginalMethods = false): MockClass { if ($mockClassName !== '') { return $this->generateCodeForTestDoubleClass( $type, $mockObject, + $markAsMockObject, $methods, $mockClassName, $callOriginalClone, + $callAutoload, + $cloneArguments, + $callOriginalMethods, ); } $key = md5( $type . ($mockObject ? 'MockObject' : 'TestStub') . + ($markAsMockObject ? 'MockObject' : 'TestStub') . serialize($methods) . - serialize($callOriginalClone), + serialize($callOriginalClone) . + serialize($cloneArguments) . + serialize($callOriginalMethods), ); if (!isset(self::$cache[$key])) { self::$cache[$key] = $this->generateCodeForTestDoubleClass( $type, $mockObject, + $markAsMockObject, $methods, $mockClassName, $callOriginalClone, + $callAutoload, + $cloneArguments, + $callOriginalMethods, ); } @@ -249,20 +453,120 @@ final class Generator } /** - * @param class-string $className + * @param non-empty-string $wsdlFile + * @param class-string $className + * @param list $methods + * @param array $options * + * @throws RuntimeException + * @throws SoapExtensionNotAvailableException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5242 + */ + public function generateClassFromWsdl(string $wsdlFile, string $className, array $methods = [], array $options = []): string + { + if (!extension_loaded('soap')) { + throw new SoapExtensionNotAvailableException; + } + + $options['cache_wsdl'] = WSDL_CACHE_NONE; + + try { + $client = new SoapClient($wsdlFile, $options); + $_methods = array_unique($client->__getFunctions() ?? []); + + unset($client); + } catch (SoapFault $e) { + throw new RuntimeException( + $e->getMessage(), + $e->getCode(), + $e, + ); + } + + sort($_methods); + + $methodTemplate = $this->loadTemplate('wsdl_method.tpl'); + $methodsBuffer = ''; + + foreach ($_methods as $method) { + preg_match_all('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\(/', $method, $matches, PREG_OFFSET_CAPTURE); + + $lastFunction = array_pop($matches[0]); + $nameStart = $lastFunction[1]; + $nameEnd = $nameStart + strlen($lastFunction[0]) - 1; + $name = str_replace('(', '', $lastFunction[0]); + + if (empty($methods) || in_array($name, $methods, true)) { + $arguments = explode( + ',', + str_replace(')', '', substr($method, $nameEnd + 1)), + ); + + foreach (range(0, count($arguments) - 1) as $i) { + $parameterStart = strpos($arguments[$i], '$'); + + if (!$parameterStart) { + continue; + } + + $arguments[$i] = substr($arguments[$i], $parameterStart); + } + + $methodTemplate->setVar( + [ + 'method_name' => $name, + 'arguments' => implode(', ', $arguments), + ], + ); + + $methodsBuffer .= $methodTemplate->render(); + } + } + + $optionsBuffer = '['; + + foreach ($options as $key => $value) { + $optionsBuffer .= $key . ' => ' . $value; + } + + $optionsBuffer .= ']'; + + $classTemplate = $this->loadTemplate('wsdl_class.tpl'); + $namespace = ''; + + if (str_contains($className, '\\')) { + $parts = explode('\\', $className); + $className = array_pop($parts); + $namespace = 'namespace ' . implode('\\', $parts) . ';' . "\n\n"; + } + + $classTemplate->setVar( + [ + 'namespace' => $namespace, + 'class_name' => $className, + 'wsdl' => $wsdlFile, + 'options' => $optionsBuffer, + 'methods' => $methodsBuffer, + ], + ); + + return $classTemplate->render(); + } + + /** * @throws ReflectionException * - * @return list + * @return list */ - private function mockClassMethods(string $className): array + public function mockClassMethods(string $className, bool $callOriginalMethods, bool $cloneArguments): array { $class = $this->reflectClass($className); $methods = []; foreach ($class->getMethods() as $method) { if (($method->isPublic() || $method->isAbstract()) && $this->canMethodBeDoubled($method)) { - $methods[] = DoubledMethod::fromReflection($method); + $methods[] = MockMethod::fromReflection($method, $callOriginalMethods, $cloneArguments); } } @@ -298,7 +602,7 @@ final class Generator * @throws ReflectionException * @throws RuntimeException */ - private function getObject(DoubledClass $mockClass, bool $callOriginalConstructor = false, array $arguments = [], bool $returnValueGeneration = true): object + private function getObject(MockType $mockClass, string $type = '', bool $callOriginalConstructor = false, array $arguments = [], bool $callOriginalMethods = false, ?object $proxyTarget = null, bool $returnValueGeneration = true): object { $className = $mockClass->generate(); @@ -316,13 +620,19 @@ final class Generator $reflector = new ReflectionObject($object); - /** - * @noinspection PhpUnhandledExceptionInspection - */ - $reflector->getProperty('__phpunit_state')->setValue( - $object, - new TestDoubleState($mockClass->configurableMethods(), $returnValueGeneration), - ); + if ($object instanceof StubInternal && $mockClass instanceof MockClass) { + /** + * @noinspection PhpUnhandledExceptionInspection + */ + $reflector->getProperty('__phpunit_state')->setValue( + $object, + new TestDoubleState($mockClass->configurableMethods(), $returnValueGeneration), + ); + + if ($callOriginalMethods) { + $this->instantiateProxyTarget($proxyTarget, $object, $type, $arguments); + } + } if ($callOriginalConstructor && $reflector->getConstructor() !== null) { try { @@ -342,16 +652,14 @@ final class Generator } /** - * @param class-string $type * @param ?list $explicitMethods * * @throws ClassIsEnumerationException * @throws ClassIsFinalException - * @throws MethodNamedMethodException * @throws ReflectionException * @throws RuntimeException */ - private function generateCodeForTestDoubleClass(string $type, bool $mockObject, ?array $explicitMethods, string $mockClassName, bool $callOriginalClone): DoubledClass + private function generateCodeForTestDoubleClass(string $type, bool $mockObject, bool $markAsMockObject, ?array $explicitMethods, string $mockClassName, bool $callOriginalClone, bool $callAutoload, bool $cloneArguments, bool $callOriginalMethods): MockClass { $classTemplate = $this->loadTemplate('test_double_class.tpl'); $additionalInterfaces = []; @@ -360,7 +668,8 @@ final class Generator $isClass = false; $isReadonly = false; $isInterface = false; - $mockMethods = new DoubledMethodSet; + $class = null; + $mockMethods = new MockMethodSet; $testDoubleClassPrefix = $mockObject ? 'MockObject_' : 'TestStub_'; $_mockClassName = $this->generateClassName( @@ -369,90 +678,104 @@ final class Generator $testDoubleClassPrefix, ); - if (class_exists($_mockClassName['fullClassName'])) { + if (class_exists($_mockClassName['fullClassName'], $callAutoload)) { $isClass = true; - } elseif (interface_exists($_mockClassName['fullClassName'])) { + } elseif (interface_exists($_mockClassName['fullClassName'], $callAutoload)) { $isInterface = true; } - $class = $this->reflectClass($_mockClassName['fullClassName']); + if (!$isClass && !$isInterface) { + $prologue = 'class ' . $_mockClassName['originalClassName'] . "\n{\n}\n\n"; - if ($class->isEnum()) { - throw new ClassIsEnumerationException($_mockClassName['fullClassName']); - } + if (!empty($_mockClassName['namespaceName'])) { + $prologue = 'namespace ' . $_mockClassName['namespaceName'] . + " {\n\n" . $prologue . "}\n\n" . + "namespace {\n\n"; - if ($class->isFinal()) { - throw new ClassIsFinalException($_mockClassName['fullClassName']); - } + $epilogue = "\n\n}"; + } - if ($class->isReadOnly()) { - $isReadonly = true; - } + $doubledCloneMethod = true; + } else { + $class = $this->reflectClass($_mockClassName['fullClassName']); - // @see https://github.com/sebastianbergmann/phpunit/issues/2995 - if ($isInterface && $class->implementsInterface(Throwable::class)) { - $actualClassName = Exception::class; - $additionalInterfaces[] = $class->getName(); - $isInterface = false; - $class = $this->reflectClass($actualClassName); + if ($class->isEnum()) { + throw new ClassIsEnumerationException($_mockClassName['fullClassName']); + } - foreach ($this->userDefinedInterfaceMethods($_mockClassName['fullClassName']) as $method) { - $methodName = $method->getName(); + if ($class->isFinal()) { + throw new ClassIsFinalException($_mockClassName['fullClassName']); + } - if ($class->hasMethod($methodName)) { - $classMethod = $class->getMethod($methodName); + if ($class->isReadOnly()) { + $isReadonly = true; + } - if (!$this->canMethodBeDoubled($classMethod)) { - continue; + // @see https://github.com/sebastianbergmann/phpunit/issues/2995 + if ($isInterface && $class->implementsInterface(Throwable::class)) { + $actualClassName = Exception::class; + $additionalInterfaces[] = $class->getName(); + $isInterface = false; + $class = $this->reflectClass($actualClassName); + + foreach ($this->userDefinedInterfaceMethods($_mockClassName['fullClassName']) as $method) { + $methodName = $method->getName(); + + if ($class->hasMethod($methodName)) { + $classMethod = $class->getMethod($methodName); + + if (!$this->canMethodBeDoubled($classMethod)) { + continue; + } } + + $mockMethods->addMethods( + MockMethod::fromReflection($method, $callOriginalMethods, $cloneArguments), + ); } - $mockMethods->addMethods( - DoubledMethod::fromReflection($method), + $_mockClassName = $this->generateClassName( + $actualClassName, + $_mockClassName['className'], + $testDoubleClassPrefix, ); } - $_mockClassName = $this->generateClassName( - $actualClassName, - $_mockClassName['className'], - $testDoubleClassPrefix, - ); - } + // @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/103 + if ($isInterface && $class->implementsInterface(Traversable::class) && + !$class->implementsInterface(Iterator::class) && + !$class->implementsInterface(IteratorAggregate::class)) { + $additionalInterfaces[] = Iterator::class; - // @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/103 - if ($isInterface && $class->implementsInterface(Traversable::class) && - !$class->implementsInterface(Iterator::class) && - !$class->implementsInterface(IteratorAggregate::class)) { - $additionalInterfaces[] = Iterator::class; - - $mockMethods->addMethods( - ...$this->mockClassMethods(Iterator::class), - ); - } - - if ($class->hasMethod('__clone')) { - $cloneMethod = $class->getMethod('__clone'); - - if (!$cloneMethod->isFinal()) { - if ($callOriginalClone && !$isInterface) { - $proxiedCloneMethod = true; - } else { - $doubledCloneMethod = true; - } + $mockMethods->addMethods( + ...$this->mockClassMethods(Iterator::class, $callOriginalMethods, $cloneArguments), + ); + } + + if ($class->hasMethod('__clone')) { + $cloneMethod = $class->getMethod('__clone'); + + if (!$cloneMethod->isFinal()) { + if ($callOriginalClone && !$isInterface) { + $proxiedCloneMethod = true; + } else { + $doubledCloneMethod = true; + } + } + } else { + $doubledCloneMethod = true; } - } else { - $doubledCloneMethod = true; } if ($isClass && $explicitMethods === []) { $mockMethods->addMethods( - ...$this->mockClassMethods($_mockClassName['fullClassName']), + ...$this->mockClassMethods($_mockClassName['fullClassName'], $callOriginalMethods, $cloneArguments), ); } if ($isInterface && ($explicitMethods === [] || $explicitMethods === null)) { $mockMethods->addMethods( - ...$this->interfaceMethods($_mockClassName['fullClassName']), + ...$this->interfaceMethods($_mockClassName['fullClassName'], $cloneArguments), ); } @@ -463,14 +786,15 @@ final class Generator if ($this->canMethodBeDoubled($method)) { $mockMethods->addMethods( - DoubledMethod::fromReflection($method), + MockMethod::fromReflection($method, $callOriginalMethods, $cloneArguments), ); } } else { $mockMethods->addMethods( - DoubledMethod::fromName( + MockMethod::fromName( $_mockClassName['fullClassName'], $methodName, + $cloneArguments, ), ); } @@ -487,22 +811,61 @@ final class Generator } /** @var trait-string[] $traits */ - $traits = [StubApi::class]; + $traits = []; + + /** @phpstan-ignore identical.alwaysTrue */ + $isPhp82 = PHP_MAJOR_VERSION === 8 && PHP_MINOR_VERSION === 2; + + if (!$isReadonly && $isPhp82) { + // @codeCoverageIgnoreStart + $traits[] = MutableStubApi::class; + // @codeCoverageIgnoreEnd + } else { + $traits[] = StubApi::class; + } if ($mockObject) { $traits[] = MockObjectApi::class; } - if ($mockMethods->hasMethod('method') || $class->hasMethod('method')) { - throw new MethodNamedMethodException; + if ($markAsMockObject) { + $traits[] = GeneratedAsMockObject::class; + } else { + $traits[] = GeneratedAsTestStub::class; } - $traits[] = Method::class; + if ($mockMethods->hasMethod('method') || (isset($class) && $class->hasMethod('method'))) { + $message = sprintf( + '%s %s has a method named "method". Doubling %s that have a method named "method" is deprecated. Support for this will be removed in PHPUnit 12.', + ($isInterface) ? 'Interface' : 'Class', + isset($class) ? $class->getName() : $type, + ($isInterface) ? 'interfaces' : 'classes', + ); - if ($doubledCloneMethod) { - $traits[] = DoubledCloneMethod::class; - } elseif ($proxiedCloneMethod) { - $traits[] = ProxiedCloneMethod::class; + try { + EventFacade::emitter()->testTriggeredPhpunitDeprecation( + TestMethodBuilder::fromCallStack(), + $message, + ); + } catch (NoTestCaseObjectOnCallStackException) { + EventFacade::emitter()->testRunnerTriggeredDeprecation($message); + } + } + + if (!$mockMethods->hasMethod('method') && (!isset($class) || !$class->hasMethod('method'))) { + $traits[] = Method::class; + } + + if ($isPhp82 && $isReadonly) { + // @codeCoverageIgnoreStart + $traits[] = ErrorCloneMethod::class; + // @codeCoverageIgnoreEnd + } else { + if ($doubledCloneMethod) { + $traits[] = DoubledCloneMethod::class; + } elseif ($proxiedCloneMethod) { + $traits[] = ProxiedCloneMethod::class; + } } $useStatements = ''; @@ -518,6 +881,8 @@ final class Generator $classTemplate->setVar( [ + 'prologue' => $prologue ?? '', + 'epilogue' => $epilogue ?? '', 'class_declaration' => $this->generateTestDoubleClassDeclaration( $mockObject, $_mockClassName, @@ -535,7 +900,7 @@ final class Generator ], ); - return new DoubledClass( + return new MockClass( $classTemplate->render(), $_mockClassName['className'], $configurableMethods, @@ -543,9 +908,7 @@ final class Generator } /** - * @param class-string $type - * - * @return array{className: class-string, originalClassName: class-string, fullClassName: class-string, namespaceName: string} + * @return array{className: non-empty-string, originalClassName: non-empty-string, fullClassName: non-empty-string, namespaceName: string} */ private function generateClassName(string $type, string $className, string $prefix): array { @@ -657,9 +1020,9 @@ final class Generator /** * @throws UnknownTypeException */ - private function ensureKnownType(string $type): void + private function ensureKnownType(string $type, bool $callAutoload): void { - if (!class_exists($type) && !interface_exists($type)) { + if (!class_exists($type, $callAutoload) && !interface_exists($type, $callAutoload)) { throw new UnknownTypeException($type); } } @@ -704,6 +1067,39 @@ final class Generator } } + /** + * @param class-string $type + * @param array $arguments + * + * @throws ReflectionException + */ + private function instantiateProxyTarget(?object $proxyTarget, object $object, string $type, array $arguments): void + { + if (!is_object($proxyTarget)) { + assert(class_exists($type)); + + if (count($arguments) === 0) { + $proxyTarget = new $type; + } else { + $class = new ReflectionClass($type); + + try { + $proxyTarget = $class->newInstanceArgs($arguments); + // @codeCoverageIgnoreStart + } catch (\ReflectionException $e) { + throw new ReflectionException( + $e->getMessage(), + $e->getCode(), + $e, + ); + } + // @codeCoverageIgnoreEnd + } + } + + $object->__phpunit_state()->setProxyTarget($proxyTarget); + } + /** * @param class-string $className * @@ -756,15 +1152,15 @@ final class Generator * * @throws ReflectionException * - * @return list + * @return list */ - private function interfaceMethods(string $interfaceName): array + private function interfaceMethods(string $interfaceName, bool $cloneArguments): array { $class = $this->reflectClass($interfaceName); $methods = []; foreach ($class->getMethods() as $method) { - $methods[] = DoubledMethod::fromReflection($method); + $methods[] = MockMethod::fromReflection($method, false, $cloneArguments); } return $methods; @@ -775,7 +1171,7 @@ final class Generator * * @return list */ - private function configurableMethods(DoubledMethodSet $methods, array $propertiesWithHooks): array + private function configurableMethods(MockMethodSet $methods, array $propertiesWithHooks): array { $configurable = []; diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/HookedPropertyGenerator.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/HookedPropertyGenerator.php index 4fcff6c..91c1daf 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/HookedPropertyGenerator.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/HookedPropertyGenerator.php @@ -21,6 +21,8 @@ final class HookedPropertyGenerator /** * @param class-string $className * @param list $properties + * + * @return non-empty-string */ public function generate(string $className, array $properties): string { @@ -43,7 +45,7 @@ EOT, get { return $this->__phpunit_getInvocationHandler()->invoke( new \PHPUnit\Framework\MockObject\Invocation( - '%s', '$%s::get', [], '%s', $this + '%s', '$%s::get', [], '%s', $this, false ) ); } @@ -62,7 +64,7 @@ EOT, set (%s $value) { $this->__phpunit_getInvocationHandler()->invoke( new \PHPUnit\Framework\MockObject\Invocation( - '%s', '$%s::set', [$value], 'void', $this + '%s', '$%s::set', [$value], 'void', $this, false ) ); } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/MockClass.php similarity index 97% rename from vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php rename to vendor/phpunit/phpunit/src/Framework/MockObject/Generator/MockClass.php index 3d88c72..486979e 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/MockClass.php @@ -17,7 +17,7 @@ use PHPUnit\Framework\MockObject\ConfigurableMethod; * * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final readonly class DoubledClass +final readonly class MockClass implements MockType { private string $classCode; diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledMethod.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/MockMethod.php similarity index 91% rename from vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledMethod.php rename to vendor/phpunit/phpunit/src/Framework/MockObject/Generator/MockMethod.php index 2cf3bb2..b5399d6 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledMethod.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/MockMethod.php @@ -16,6 +16,7 @@ use function is_object; use function is_string; use function preg_match; use function preg_replace; +use function sprintf; use function str_contains; use function strlen; use function strpos; @@ -34,7 +35,7 @@ use SebastianBergmann\Type\UnknownType; * * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class DoubledMethod +final class MockMethod { use TemplateLoader; @@ -47,11 +48,13 @@ final class DoubledMethod * @var non-empty-string */ private readonly string $methodName; + private readonly bool $cloneArguments; private readonly string $modifier; private readonly string $argumentsForDeclaration; private readonly string $argumentsForCall; private readonly Type $returnType; private readonly string $reference; + private readonly bool $callOriginalMethod; private readonly bool $static; private readonly ?string $deprecation; @@ -69,7 +72,7 @@ final class DoubledMethod * @throws ReflectionException * @throws RuntimeException */ - public static function fromReflection(ReflectionMethod $method): self + public static function fromReflection(ReflectionMethod $method, bool $callOriginalMethod, bool $cloneArguments): self { if ($method->isPrivate()) { $modifier = 'private'; @@ -101,6 +104,7 @@ final class DoubledMethod return new self( $method->getDeclaringClass()->getName(), $method->getName(), + $cloneArguments, $modifier, self::methodParametersForDeclaration($method), self::methodParametersForCall($method), @@ -108,6 +112,7 @@ final class DoubledMethod count($method->getParameters()), (new ReflectionMapper)->fromReturnType($method), $reference, + $callOriginalMethod, $method->isStatic(), $deprecation, ); @@ -117,11 +122,12 @@ final class DoubledMethod * @param class-string $className * @param non-empty-string $methodName */ - public static function fromName(string $className, string $methodName): self + public static function fromName(string $className, string $methodName, bool $cloneArguments): self { return new self( $className, $methodName, + $cloneArguments, 'public', '', '', @@ -130,6 +136,7 @@ final class DoubledMethod new UnknownType, '', false, + false, null, ); } @@ -140,10 +147,11 @@ final class DoubledMethod * @param array $defaultParameterValues * @param non-negative-int $numberOfParameters */ - private function __construct(string $className, string $methodName, string $modifier, string $argumentsForDeclaration, string $argumentsForCall, array $defaultParameterValues, int $numberOfParameters, Type $returnType, string $reference, bool $static, ?string $deprecation) + private function __construct(string $className, string $methodName, bool $cloneArguments, string $modifier, string $argumentsForDeclaration, string $argumentsForCall, array $defaultParameterValues, int $numberOfParameters, Type $returnType, string $reference, bool $callOriginalMethod, bool $static, ?string $deprecation) { $this->className = $className; $this->methodName = $methodName; + $this->cloneArguments = $cloneArguments; $this->modifier = $modifier; $this->argumentsForDeclaration = $argumentsForDeclaration; $this->argumentsForCall = $argumentsForCall; @@ -151,6 +159,7 @@ final class DoubledMethod $this->numberOfParameters = $numberOfParameters; $this->returnType = $returnType; $this->reference = $reference; + $this->callOriginalMethod = $callOriginalMethod; $this->static = $static; $this->deprecation = $deprecation; } @@ -171,7 +180,10 @@ final class DoubledMethod if ($this->static) { $templateFile = 'doubled_static_method.tpl'; } else { - $templateFile = 'doubled_method.tpl'; + $templateFile = sprintf( + '%s_method.tpl', + $this->callOriginalMethod ? 'proxied' : 'doubled', + ); } $deprecation = $this->deprecation; @@ -219,7 +231,8 @@ EOT; 'method_name' => $this->methodName, 'modifier' => $this->modifier, 'reference' => $this->reference, - 'deprecation' => $deprecation, + 'clone_arguments' => $this->cloneArguments ? 'true' : 'false', + 'deprecation' => $deprecation ?? '', 'return_result' => $returnResult, ], ); diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledMethodSet.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/MockMethodSet.php similarity index 86% rename from vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledMethodSet.php rename to vendor/phpunit/phpunit/src/Framework/MockObject/Generator/MockMethodSet.php index 6a2d29f..2c4b25f 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledMethodSet.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/MockMethodSet.php @@ -18,14 +18,14 @@ use function strtolower; * * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class DoubledMethodSet +final class MockMethodSet { /** - * @var array + * @var array */ private array $methods = []; - public function addMethods(DoubledMethod ...$methods): void + public function addMethods(MockMethod ...$methods): void { foreach ($methods as $method) { $this->methods[strtolower($method->methodName())] = $method; @@ -33,7 +33,7 @@ final class DoubledMethodSet } /** - * @return list + * @return list */ public function asArray(): array { diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/MockTrait.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/MockTrait.php new file mode 100644 index 0000000..c3d744b --- /dev/null +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/MockTrait.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Framework\MockObject\Generator; + +use function class_exists; + +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5243 + */ +final readonly class MockTrait implements MockType +{ + private string $classCode; + + /** + * @var class-string + */ + private string $mockName; + + /** + * @param class-string $mockName + */ + public function __construct(string $classCode, string $mockName) + { + $this->classCode = $classCode; + $this->mockName = $mockName; + } + + /** + * @return class-string + */ + public function generate(): string + { + if (!class_exists($this->mockName, false)) { + eval($this->classCode); + } + + return $this->mockName; + } +} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/MethodNamedMethodException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/MockType.php similarity index 60% rename from vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/MethodNamedMethodException.php rename to vendor/phpunit/phpunit/src/Framework/MockObject/Generator/MockType.php index 78586fe..fad5220 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/MethodNamedMethodException.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/MockType.php @@ -10,12 +10,14 @@ namespace PHPUnit\Framework\MockObject\Generator; /** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MethodNamedMethodException extends \PHPUnit\Framework\Exception implements Exception +interface MockType { - public function __construct() - { - parent::__construct('Doubling interfaces (or classes) that have a method named "method" is not supported.'); - } + /** + * @return class-string + */ + public function generate(): string; } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/doubled_method.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/doubled_method.tpl index bb6fb76..1b1b663 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/doubled_method.tpl +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/doubled_method.tpl @@ -29,7 +29,7 @@ $__phpunit_result = $this->__phpunit_getInvocationHandler()->invoke( new \PHPUnit\Framework\MockObject\Invocation( - '{class_name}', '{method_name}', $__phpunit_arguments, '{return_type}', $this + '{class_name}', '{method_name}', $__phpunit_arguments, '{return_type}', $this, {clone_arguments} ) );{return_result} } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/proxied_method.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/proxied_method.tpl new file mode 100644 index 0000000..c971b9b --- /dev/null +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/proxied_method.tpl @@ -0,0 +1,37 @@ + + {modifier} function {reference}{method_name}({arguments_decl}){return_declaration} + { + $__phpunit_definedVariables = get_defined_vars(); + $__phpunit_namedVariadicParameters = []; + + foreach ($__phpunit_definedVariables as $__phpunit_definedVariableName => $__phpunit_definedVariableValue) { + if ((new ReflectionParameter([__CLASS__, __FUNCTION__], $__phpunit_definedVariableName))->isVariadic()) { + foreach ($__phpunit_definedVariableValue as $__phpunit_key => $__phpunit_namedValue) { + if (is_string($__phpunit_key)) { + $__phpunit_namedVariadicParameters[$__phpunit_key] = $__phpunit_namedValue; + } + } + } + } + + $__phpunit_arguments = [{arguments_call}]; + $__phpunit_count = func_num_args(); + + if ($__phpunit_count > {arguments_count}) { + $__phpunit_arguments_tmp = func_get_args(); + + for ($__phpunit_i = {arguments_count}; $__phpunit_i < $__phpunit_count; $__phpunit_i++) { + $__phpunit_arguments[] = $__phpunit_arguments_tmp[$__phpunit_i]; + } + } + + $__phpunit_arguments = array_merge($__phpunit_arguments, $__phpunit_namedVariadicParameters); + + $this->__phpunit_getInvocationHandler()->invoke( + new \PHPUnit\Framework\MockObject\Invocation( + '{class_name}', '{method_name}', $__phpunit_arguments, '{return_type}', $this, {clone_arguments}, true + ) + ); + + $__phpunit_result = call_user_func_array([$this->__phpunit_state()->proxyTarget(), "{method_name}"], $__phpunit_arguments);{return_result} + } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/test_double_class.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/test_double_class.tpl index 5d015e3..3a42895 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/test_double_class.tpl +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/test_double_class.tpl @@ -1,5 +1,5 @@ declare(strict_types=1); -{class_declaration} +{prologue}{class_declaration} { -{use_statements}{property_hooks}{methods}} +{use_statements}{property_hooks}{methods}}{epilogue} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/trait_class.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/trait_class.tpl new file mode 100644 index 0000000..a8fe470 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/trait_class.tpl @@ -0,0 +1,6 @@ +declare(strict_types=1); + +{prologue}class {class_name} +{ + use {trait_name}; +} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/wsdl_class.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/wsdl_class.tpl new file mode 100644 index 0000000..b3100b4 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/wsdl_class.tpl @@ -0,0 +1,9 @@ +declare(strict_types=1); + +{namespace}class {class_name} extends \SoapClient +{ + public function __construct($wsdl, array $options) + { + parent::__construct('{wsdl}', $options); + } +{methods}} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/wsdl_method.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/wsdl_method.tpl new file mode 100644 index 0000000..bb16e76 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/wsdl_method.tpl @@ -0,0 +1,4 @@ + + public function {method_name}({arguments}) + { + } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php b/vendor/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php index 7c82fe9..e51ae8c 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php @@ -9,15 +9,22 @@ */ namespace PHPUnit\Framework\MockObject; +use const DEBUG_BACKTRACE_IGNORE_ARGS; use function array_merge; use function assert; +use function debug_backtrace; +use function trait_exists; +use PHPUnit\Event\Facade as EventFacade; +use PHPUnit\Framework\Exception; use PHPUnit\Framework\InvalidArgumentException; +use PHPUnit\Framework\MockObject\Generator\CannotUseAddMethodsException; use PHPUnit\Framework\MockObject\Generator\ClassIsEnumerationException; use PHPUnit\Framework\MockObject\Generator\ClassIsFinalException; use PHPUnit\Framework\MockObject\Generator\DuplicateMethodException; use PHPUnit\Framework\MockObject\Generator\Generator; use PHPUnit\Framework\MockObject\Generator\InvalidMethodNameException; use PHPUnit\Framework\MockObject\Generator\NameAlreadyInUseException; +use PHPUnit\Framework\MockObject\Generator\OriginalConstructorInvocationRequiredException; use PHPUnit\Framework\MockObject\Generator\ReflectionException; use PHPUnit\Framework\MockObject\Generator\RuntimeException; use PHPUnit\Framework\MockObject\Generator\UnknownTypeException; @@ -52,10 +59,15 @@ final class MockBuilder /** * @var array */ - private array $constructorArgs = []; - private bool $originalConstructor = true; - private bool $originalClone = true; - private bool $returnValueGeneration = true; + private array $constructorArgs = []; + private bool $originalConstructor = true; + private bool $originalClone = true; + private bool $autoload = true; + private bool $cloneArguments = false; + private bool $callOriginalMethods = false; + private ?object $proxyTarget = null; + private bool $allowMockingUnknownTypes = true; + private bool $returnValueGeneration = true; private readonly Generator $generator; /** @@ -77,6 +89,7 @@ final class MockBuilder * @throws InvalidArgumentException * @throws InvalidMethodNameException * @throws NameAlreadyInUseException + * @throws OriginalConstructorInvocationRequiredException * @throws ReflectionException * @throws RuntimeException * @throws UnknownTypeException @@ -88,11 +101,17 @@ final class MockBuilder $object = $this->generator->testDouble( $this->type, true, + true, !$this->emptyMethodsArray ? $this->methods : null, $this->constructorArgs, $this->mockClassName ?? '', $this->originalConstructor, $this->originalClone, + $this->autoload, + $this->cloneArguments, + $this->callOriginalMethods, + $this->proxyTarget, + $this->allowMockingUnknownTypes, $this->returnValueGeneration, ); @@ -104,6 +123,80 @@ final class MockBuilder return $object; } + /** + * Creates a mock object for an abstract class using a fluent interface. + * + * @throws Exception + * @throws ReflectionException + * @throws RuntimeException + * + * @return MockedType&MockObject + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5305 + */ + public function getMockForAbstractClass(): MockObject + { + EventFacade::emitter()->testTriggeredPhpunitDeprecation( + $this->testCase->valueObjectForEvents(), + 'MockBuilder::getMockForAbstractClass() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + + $object = $this->generator->mockObjectForAbstractClass( + $this->type, + $this->constructorArgs, + $this->mockClassName ?? '', + $this->originalConstructor, + $this->originalClone, + $this->autoload, + $this->methods, + $this->cloneArguments, + ); + + assert($object instanceof MockObject); + + $this->testCase->registerMockObject($object); + + return $object; + } + + /** + * Creates a mock object for a trait using a fluent interface. + * + * @throws Exception + * @throws ReflectionException + * @throws RuntimeException + * + * @return MockedType&MockObject + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5306 + */ + public function getMockForTrait(): MockObject + { + EventFacade::emitter()->testTriggeredPhpunitDeprecation( + $this->testCase->valueObjectForEvents(), + 'MockBuilder::getMockForTrait() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + + assert(trait_exists($this->type)); + + $object = $this->generator->mockObjectForTrait( + $this->type, + $this->constructorArgs, + $this->mockClassName ?? '', + $this->originalConstructor, + $this->originalClone, + $this->autoload, + $this->methods, + $this->cloneArguments, + ); + + assert($object instanceof MockObject); + + $this->testCase->registerMockObject($object); + + return $object; + } + /** * Specifies the subset of methods to mock, requiring each to exist in the class. * @@ -147,6 +240,57 @@ final class MockBuilder return $this; } + /** + * Specifies methods that don't exist in the class which you want to mock. + * + * @param list $methods + * + * @throws CannotUseAddMethodsException + * @throws ReflectionException + * @throws RuntimeException + * + * @return $this + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5320 + */ + public function addMethods(array $methods): self + { + EventFacade::emitter()->testTriggeredPhpunitDeprecation( + $this->testCase->valueObjectForEvents(), + 'MockBuilder::addMethods() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + + if (empty($methods)) { + $this->emptyMethodsArray = true; + + return $this; + } + + try { + $reflector = new ReflectionClass($this->type); + + // @codeCoverageIgnoreStart + /** @phpstan-ignore catch.neverThrown */ + } catch (\ReflectionException $e) { + throw new ReflectionException( + $e->getMessage(), + $e->getCode(), + $e, + ); + // @codeCoverageIgnoreEnd + } + + foreach ($methods as $method) { + if ($reflector->hasMethod($method)) { + throw new CannotUseAddMethodsException($this->type, $method); + } + } + + $this->methods = array_merge($this->methods, $methods); + + return $this; + } + /** * Specifies the arguments for the constructor. * @@ -223,6 +367,186 @@ final class MockBuilder return $this; } + /** + * Disables the use of class autoloading while creating the mock object. + * + * @return $this + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5309 + * + * @codeCoverageIgnore + */ + public function disableAutoload(): self + { + EventFacade::emitter()->testTriggeredPhpunitDeprecation( + $this->testCase->valueObjectForEvents(), + 'MockBuilder::disableAutoload() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + + $this->autoload = false; + + return $this; + } + + /** + * Enables the use of class autoloading while creating the mock object. + * + * @return $this + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5309 + */ + public function enableAutoload(): self + { + EventFacade::emitter()->testTriggeredPhpunitDeprecation( + $this->testCase->valueObjectForEvents(), + 'MockBuilder::enableAutoload() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + + $this->autoload = true; + + return $this; + } + + /** + * Disables the cloning of arguments passed to mocked methods. + * + * @return $this + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5315 + */ + public function disableArgumentCloning(): self + { + if (!$this->calledFromTestCase()) { + EventFacade::emitter()->testTriggeredPhpunitDeprecation( + $this->testCase->valueObjectForEvents(), + 'MockBuilder::disableArgumentCloning() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + } + + $this->cloneArguments = false; + + return $this; + } + + /** + * Enables the cloning of arguments passed to mocked methods. + * + * @return $this + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5315 + */ + public function enableArgumentCloning(): self + { + EventFacade::emitter()->testTriggeredPhpunitDeprecation( + $this->testCase->valueObjectForEvents(), + 'MockBuilder::enableArgumentCloning() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + + $this->cloneArguments = true; + + return $this; + } + + /** + * Enables the invocation of the original methods. + * + * @return $this + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5307 + * + * @codeCoverageIgnore + */ + public function enableProxyingToOriginalMethods(): self + { + if (!$this->calledFromTestCase()) { + EventFacade::emitter()->testTriggeredPhpunitDeprecation( + $this->testCase->valueObjectForEvents(), + 'MockBuilder::enableProxyingToOriginalMethods() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + } + + $this->callOriginalMethods = true; + + return $this; + } + + /** + * Disables the invocation of the original methods. + * + * @return $this + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5307 + */ + public function disableProxyingToOriginalMethods(): self + { + EventFacade::emitter()->testTriggeredPhpunitDeprecation( + $this->testCase->valueObjectForEvents(), + 'MockBuilder::disableProxyingToOriginalMethods() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + + $this->callOriginalMethods = false; + $this->proxyTarget = null; + + return $this; + } + + /** + * Sets the proxy target. + * + * @return $this + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5307 + * + * @codeCoverageIgnore + */ + public function setProxyTarget(object $object): self + { + EventFacade::emitter()->testTriggeredPhpunitDeprecation( + $this->testCase->valueObjectForEvents(), + 'MockBuilder::setProxyTarget() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + + $this->proxyTarget = $object; + + return $this; + } + + /** + * @return $this + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5308 + */ + public function allowMockingUnknownTypes(): self + { + EventFacade::emitter()->testTriggeredPhpunitDeprecation( + $this->testCase->valueObjectForEvents(), + 'MockBuilder::allowMockingUnknownTypes() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + + $this->allowMockingUnknownTypes = true; + + return $this; + } + + /** + * @return $this + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5308 + */ + public function disallowMockingUnknownTypes(): self + { + if (!$this->calledFromTestCase()) { + EventFacade::emitter()->testTriggeredPhpunitDeprecation( + $this->testCase->valueObjectForEvents(), + 'MockBuilder::disallowMockingUnknownTypes() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + } + + $this->allowMockingUnknownTypes = false; + + return $this; + } + /** * @return $this */ @@ -242,4 +566,11 @@ final class MockBuilder return $this; } + + private function calledFromTestCase(): bool + { + $caller = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, limit: 3)[2]; + + return isset($caller['class']) && $caller['class'] === TestCase::class; + } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/ErrorCloneMethod.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/ErrorCloneMethod.php new file mode 100644 index 0000000..0aaf132 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/ErrorCloneMethod.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Framework\MockObject; + +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @internal This trait is not covered by the backward compatibility promise for PHPUnit + * + * @codeCoverageIgnore + */ +trait ErrorCloneMethod +{ + public function __clone(): void + { + throw new CannotCloneTestDoubleForReadonlyClassException; + } +} diff --git a/vendor/phpunit/php-code-coverage/src/Target/ValidationSuccess.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/GeneratedAsMockObject.php similarity index 53% rename from vendor/phpunit/php-code-coverage/src/Target/ValidationSuccess.php rename to vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/GeneratedAsMockObject.php index 1dffd0d..7239221 100644 --- a/vendor/phpunit/php-code-coverage/src/Target/ValidationSuccess.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/GeneratedAsMockObject.php @@ -1,22 +1,22 @@ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ -namespace SebastianBergmann\CodeCoverage\Test\Target; +namespace PHPUnit\Framework\MockObject; /** - * @immutable + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for phpunit/php-code-coverage + * @internal This trait is not covered by the backward compatibility promise for PHPUnit */ -final readonly class ValidationSuccess extends ValidationResult +trait GeneratedAsMockObject { - public function isSuccess(): true + public function __phpunit_wasGeneratedAsMockObject(): true { return true; } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/GeneratedAsTestStub.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/GeneratedAsTestStub.php new file mode 100644 index 0000000..09b9227 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/GeneratedAsTestStub.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Framework\MockObject; + +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @internal This trait is not covered by the backward compatibility promise for PHPUnit + */ +trait GeneratedAsTestStub +{ + public function __phpunit_wasGeneratedAsMockObject(): false + { + return false; + } +} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/Method.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/Method.php index 35833a6..bed26d9 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/Method.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/Method.php @@ -9,10 +9,10 @@ */ namespace PHPUnit\Framework\MockObject; -use PHPUnit\Framework\Constraint\Constraint; +use function call_user_func_array; +use function func_get_args; use PHPUnit\Framework\MockObject\Builder\InvocationMocker; use PHPUnit\Framework\MockObject\Rule\AnyInvokedCount; -use PHPUnit\Framework\MockObject\Runtime\PropertyHook; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -23,11 +23,13 @@ trait Method { abstract public function __phpunit_getInvocationHandler(): InvocationHandler; - public function method(Constraint|PropertyHook|string $constraint): InvocationMocker + public function method(): InvocationMocker { - return $this - ->__phpunit_getInvocationHandler() - ->expects(new AnyInvokedCount) - ->method($constraint); + $expects = $this->__phpunit_getInvocationHandler()->expects(new AnyInvokedCount); + + return call_user_func_array( + [$expects, 'method'], + func_get_args(), + ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/MockObjectApi.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/MockObjectApi.php index 6589d50..735a991 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/MockObjectApi.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/MockObjectApi.php @@ -9,6 +9,10 @@ */ namespace PHPUnit\Framework\MockObject; +use function assert; +use PHPUnit\Event\Code\NoTestCaseObjectOnCallStackException; +use PHPUnit\Event\Code\TestMethodBuilder; +use PHPUnit\Event\Facade as EventFacade; use PHPUnit\Framework\MockObject\Builder\InvocationMocker as InvocationMockerBuilder; use PHPUnit\Framework\MockObject\Rule\InvocationOrder; @@ -43,6 +47,29 @@ trait MockObjectApi public function expects(InvocationOrder $matcher): InvocationMockerBuilder { + assert($this instanceof StubInternal); + + if (!$this->__phpunit_wasGeneratedAsMockObject()) { + $message = 'Expectations configured on test doubles that are created as test stubs are no longer verified since PHPUnit 10. Test doubles that are created as test stubs will no longer have the expects() method in PHPUnit 12. Update your test code to use createMock() instead of createStub(), for example.'; + + try { + $test = TestMethodBuilder::fromCallStack(); + + if (!$this->__phpunit_state()->wasDeprecationAlreadyEmittedFor($test->id())) { + EventFacade::emitter()->testTriggeredPhpunitDeprecation( + $test, + $message, + ); + + $this->__phpunit_state()->deprecationWasEmittedFor($test->id()); + } + // @codeCoverageIgnoreStart + } catch (NoTestCaseObjectOnCallStackException) { + EventFacade::emitter()->testRunnerTriggeredDeprecation($message); + // @codeCoverageIgnoreEnd + } + } + return $this->__phpunit_getInvocationHandler()->expects($matcher); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/MutableStubApi.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/MutableStubApi.php new file mode 100644 index 0000000..3d3cc8e --- /dev/null +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/MutableStubApi.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Framework\MockObject; + +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @internal This trait is not covered by the backward compatibility promise for PHPUnit + * + * @codeCoverageIgnore + */ +trait MutableStubApi +{ + private TestDoubleState $__phpunit_state; + + public function __phpunit_state(): TestDoubleState + { + return $this->__phpunit_state; + } + + /** @noinspection MagicMethodsValidityInspection */ + public function __phpunit_getInvocationHandler(): InvocationHandler + { + return $this->__phpunit_state()->invocationHandler(); + } + + /** @noinspection MagicMethodsValidityInspection */ + public function __phpunit_unsetInvocationMocker(): void + { + $this->__phpunit_state()->unsetInvocationHandler(); + } +} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/TestDoubleState.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/TestDoubleState.php index 93b10c1..b4547b2 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/TestDoubleState.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/TestDoubleState.php @@ -9,6 +9,8 @@ */ namespace PHPUnit\Framework\MockObject; +use function assert; + /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -16,12 +18,18 @@ namespace PHPUnit\Framework\MockObject; */ final class TestDoubleState { + /** + * @var array + */ + private static array $deprecationEmittedForTest = []; + /** * @var list */ private readonly array $configurableMethods; private readonly bool $generateReturnValues; private ?InvocationHandler $invocationHandler = null; + private ?object $proxyTarget = null; /** * @param list $configurableMethods @@ -60,6 +68,34 @@ final class TestDoubleState $this->invocationHandler = null; } + public function setProxyTarget(object $proxyTarget): void + { + $this->proxyTarget = $proxyTarget; + } + + public function proxyTarget(): object + { + assert($this->proxyTarget !== null); + + return $this->proxyTarget; + } + + /** + * @param non-empty-string $testId + */ + public function deprecationWasEmittedFor(string $testId): void + { + self::$deprecationEmittedForTest[$testId] = true; + } + + /** + * @param non-empty-string $testId + */ + public function wasDeprecationAlreadyEmittedFor(string $testId): bool + { + return isset(self::$deprecationEmittedForTest[$testId]); + } + /** * @return list */ diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/MockObject.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/MockObject.php index 795694d..4096d73 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/MockObject.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/MockObject.php @@ -13,6 +13,8 @@ use PHPUnit\Framework\MockObject\Builder\InvocationMocker; use PHPUnit\Framework\MockObject\Rule\InvocationOrder; /** + * @method InvocationMocker method($constraint) + * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ interface MockObject extends Stub diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/Stub.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/Stub.php index dbbb198..96f84d2 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/Stub.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/Stub.php @@ -9,14 +9,13 @@ */ namespace PHPUnit\Framework\MockObject; -use PHPUnit\Framework\Constraint\Constraint; use PHPUnit\Framework\MockObject\Builder\InvocationStubber; -use PHPUnit\Framework\MockObject\Runtime\PropertyHook; /** + * @method InvocationStubber method($constraint) + * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ interface Stub { - public function method(Constraint|PropertyHook|string $constraint): InvocationStubber; } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/StubInternal.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/StubInternal.php index 6e428ea..ff29a5d 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/StubInternal.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Interface/StubInternal.php @@ -21,4 +21,6 @@ interface StubInternal extends Stub public function __phpunit_getInvocationHandler(): InvocationHandler; public function __phpunit_unsetInvocationMocker(): void; + + public function __phpunit_wasGeneratedAsMockObject(): bool; } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Invocation.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Invocation.php index 8e79232..faf34b4 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Invocation.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Invocation.php @@ -11,11 +11,13 @@ namespace PHPUnit\Framework\MockObject; use function array_map; use function implode; +use function is_object; use function sprintf; use function str_starts_with; use function strtolower; use function substr; use PHPUnit\Framework\SelfDescribing; +use PHPUnit\Util\Cloner; use PHPUnit\Util\Exporter; /** @@ -41,6 +43,7 @@ final readonly class Invocation implements SelfDescribing private array $parameters; private string $returnType; private bool $isReturnTypeNullable; + private bool $proxiedCall; private MockObjectInternal|StubInternal $object; /** @@ -48,12 +51,12 @@ final readonly class Invocation implements SelfDescribing * @param non-empty-string $methodName * @param array $parameters */ - public function __construct(string $className, string $methodName, array $parameters, string $returnType, MockObjectInternal|StubInternal $object) + public function __construct(string $className, string $methodName, array $parameters, string $returnType, MockObjectInternal|StubInternal $object, bool $cloneObjects = false, bool $proxiedCall = false) { - $this->className = $className; - $this->methodName = $methodName; - $this->parameters = $parameters; - $this->object = $object; + $this->className = $className; + $this->methodName = $methodName; + $this->object = $object; + $this->proxiedCall = $proxiedCall; if (strtolower($methodName) === '__tostring') { $returnType = 'string'; @@ -67,6 +70,20 @@ final readonly class Invocation implements SelfDescribing } $this->returnType = $returnType; + + if (!$cloneObjects) { + $this->parameters = $parameters; + + return; + } + + foreach ($parameters as $key => $value) { + if (is_object($value)) { + $parameters[$key] = Cloner::clone($value); + } + } + + $this->parameters = $parameters; } /** @@ -105,7 +122,7 @@ final readonly class Invocation implements SelfDescribing ); } - if ($this->isReturnTypeNullable) { + if ($this->isReturnTypeNullable || $this->proxiedCall) { return null; } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/ReturnValueGenerator.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/ReturnValueGenerator.php index 2dcef0c..fbddc07 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/ReturnValueGenerator.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/ReturnValueGenerator.php @@ -218,7 +218,7 @@ final class ReturnValueGenerator private function testDoubleFor(string $type, string $className, string $methodName): Stub { try { - return (new Generator)->testDouble($type, false, [], [], '', false); + return (new Generator)->testDouble($type, false, false, [], [], '', false); // @codeCoverageIgnoreStart } catch (Throwable $t) { throw new RuntimeException( diff --git a/vendor/phpunit/phpunit/src/Framework/TestBuilder.php b/vendor/phpunit/phpunit/src/Framework/TestBuilder.php index dba8e60..5c3effc 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestBuilder.php +++ b/vendor/phpunit/phpunit/src/Framework/TestBuilder.php @@ -76,7 +76,7 @@ final readonly class TestBuilder /** * @param non-empty-string $methodName * @param class-string $className - * @param array> $data + * @param array> $data * @param array{backupGlobals: ?bool, backupGlobalsExcludeList: list, backupStaticProperties: ?bool, backupStaticPropertiesExcludeList: array>} $backupSettings * @param list $groups */ diff --git a/vendor/phpunit/phpunit/src/Framework/TestCase.php b/vendor/phpunit/phpunit/src/Framework/TestCase.php index 4a9ec98..a237b74 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestCase.php +++ b/vendor/phpunit/phpunit/src/Framework/TestCase.php @@ -9,12 +9,21 @@ */ namespace PHPUnit\Framework; +use const LC_ALL; +use const LC_COLLATE; +use const LC_CTYPE; +use const LC_MONETARY; +use const LC_NUMERIC; +use const LC_TIME; +use const PATHINFO_FILENAME; use const PHP_EOL; +use const PHP_URL_PATH; use function array_keys; use function array_merge; use function array_reverse; use function array_values; use function assert; +use function basename; use function chdir; use function class_exists; use function clearstatcache; @@ -25,6 +34,7 @@ use function explode; use function getcwd; use function implode; use function in_array; +use function ini_set; use function is_array; use function is_callable; use function is_int; @@ -37,11 +47,15 @@ use function ob_get_clean; use function ob_get_contents; use function ob_get_level; use function ob_start; +use function parse_url; +use function pathinfo; use function preg_match; +use function preg_replace; use function restore_error_handler; use function restore_exception_handler; use function set_error_handler; use function set_exception_handler; +use function setlocale; use function sprintf; use function str_contains; use function trim; @@ -65,7 +79,13 @@ use PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount as InvokedAtMostCountMa use PHPUnit\Framework\MockObject\Rule\InvokedCount; use PHPUnit\Framework\MockObject\Rule\InvokedCount as InvokedCountMatcher; use PHPUnit\Framework\MockObject\Stub; +use PHPUnit\Framework\MockObject\Stub\ConsecutiveCalls as ConsecutiveCallsStub; use PHPUnit\Framework\MockObject\Stub\Exception as ExceptionStub; +use PHPUnit\Framework\MockObject\Stub\ReturnArgument as ReturnArgumentStub; +use PHPUnit\Framework\MockObject\Stub\ReturnCallback as ReturnCallbackStub; +use PHPUnit\Framework\MockObject\Stub\ReturnSelf as ReturnSelfStub; +use PHPUnit\Framework\MockObject\Stub\ReturnStub; +use PHPUnit\Framework\MockObject\Stub\ReturnValueMap as ReturnValueMapStub; use PHPUnit\Framework\TestSize\TestSize; use PHPUnit\Framework\TestStatus\TestStatus; use PHPUnit\Metadata\Api\Groups; @@ -98,7 +118,8 @@ use Throwable; */ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, Test { - private ?bool $backupGlobals = null; + private const LOCALE_CATEGORIES = [LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, LC_TIME]; + private ?bool $backupGlobals = null; /** * @var list @@ -161,6 +182,16 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T */ private array $dependencyInput = []; + /** + * @var array + */ + private array $iniSettings = []; + + /** + * @var array + */ + private array $locale = []; + /** * @var list */ @@ -390,8 +421,6 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T /** * @internal This method is not covered by the backward compatibility promise for PHPUnit - * - * @phpstan-assert-if-true non-empty-string $this->output() */ final public function hasUnexpectedOutput(): bool { @@ -623,6 +652,8 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $this->restoreGlobalErrorExceptionHandlers(); $this->restoreGlobalState(); $this->unregisterCustomComparators(); + $this->cleanupIniSettings(); + $this->cleanupLocaleSettings(); libxml_clear_errors(); $this->testValueObjectForEvents = null; @@ -980,11 +1011,110 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T return new InvokedAtMostCountMatcher($allowedInvocations); } + /** + * @deprecated Use $double->willReturn() instead of $double->will($this->returnValue()) + * @see https://github.com/sebastianbergmann/phpunit/issues/5423 + * + * @codeCoverageIgnore + */ + final protected function returnValue(mixed $value): ReturnStub + { + Event\Facade::emitter()->testTriggeredPhpunitDeprecation( + $this->valueObjectForEvents(), + 'returnValue() is deprecated and will be removed in PHPUnit 12. Use $double->willReturn() instead of $double->will($this->returnValue())', + ); + + return new ReturnStub($value); + } + + /** + * @param array $valueMap + * + * @deprecated Use $double->willReturnMap() instead of $double->will($this->returnValueMap()) + * @see https://github.com/sebastianbergmann/phpunit/issues/5423 + * + * @codeCoverageIgnore + */ + final protected function returnValueMap(array $valueMap): ReturnValueMapStub + { + Event\Facade::emitter()->testTriggeredPhpunitDeprecation( + $this->valueObjectForEvents(), + 'returnValueMap() is deprecated and will be removed in PHPUnit 12. Use $double->willReturnMap() instead of $double->will($this->returnValueMap())', + ); + + return new ReturnValueMapStub($valueMap); + } + + /** + * @deprecated Use $double->willReturnArgument() instead of $double->will($this->returnArgument()) + * @see https://github.com/sebastianbergmann/phpunit/issues/5423 + * + * @codeCoverageIgnore + */ + final protected function returnArgument(int $argumentIndex): ReturnArgumentStub + { + Event\Facade::emitter()->testTriggeredPhpunitDeprecation( + $this->valueObjectForEvents(), + 'returnArgument() is deprecated and will be removed in PHPUnit 12. Use $double->willReturnArgument() instead of $double->will($this->returnArgument())', + ); + + return new ReturnArgumentStub($argumentIndex); + } + + /** + * @deprecated Use $double->willReturnCallback() instead of $double->will($this->returnCallback()) + * @see https://github.com/sebastianbergmann/phpunit/issues/5423 + * + * @codeCoverageIgnore + */ + final protected function returnCallback(callable $callback): ReturnCallbackStub + { + Event\Facade::emitter()->testTriggeredPhpunitDeprecation( + $this->valueObjectForEvents(), + 'returnCallback() is deprecated and will be removed in PHPUnit 12. Use $double->willReturnCallback() instead of $double->will($this->returnCallback())', + ); + + return new ReturnCallbackStub($callback); + } + + /** + * @deprecated Use $double->willReturnSelf() instead of $double->will($this->returnSelf()) + * @see https://github.com/sebastianbergmann/phpunit/issues/5423 + * + * @codeCoverageIgnore + */ + final protected function returnSelf(): ReturnSelfStub + { + Event\Facade::emitter()->testTriggeredPhpunitDeprecation( + $this->valueObjectForEvents(), + 'returnSelf() is deprecated and will be removed in PHPUnit 12. Use $double->willReturnSelf() instead of $double->will($this->returnSelf())', + ); + + return new ReturnSelfStub; + } + final protected function throwException(Throwable $exception): ExceptionStub { return new ExceptionStub($exception); } + /** + * @deprecated Use $double->willReturn() instead of $double->will($this->onConsecutiveCalls()) + * @see https://github.com/sebastianbergmann/phpunit/issues/5423 + * @see https://github.com/sebastianbergmann/phpunit/issues/5425 + * + * @codeCoverageIgnore + */ + final protected function onConsecutiveCalls(mixed ...$arguments): ConsecutiveCallsStub + { + Event\Facade::emitter()->testTriggeredPhpunitDeprecation( + $this->valueObjectForEvents(), + 'onConsecutiveCalls() is deprecated and will be removed in PHPUnit 12. Use $double->willReturn() instead of $double->will($this->onConsecutiveCalls())', + ); + + return new ConsecutiveCallsStub($arguments); + } + final protected function getActualOutputForAssertion(): string { $this->outputRetrievedForAssertion = true; @@ -1118,12 +1248,89 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T return $testResult; } + /** + * This method is a wrapper for the ini_set() function that automatically + * resets the modified php.ini setting to its original value after the + * test is run. + * + * @throws Exception + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5214 + * + * @codeCoverageIgnore + */ + final protected function iniSet(string $varName, string $newValue): void + { + Event\Facade::emitter()->testTriggeredPhpunitDeprecation( + $this->valueObjectForEvents(), + 'iniSet() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + + $currentValue = ini_set($varName, $newValue); + + if ($currentValue !== false) { + $this->iniSettings[$varName] = $currentValue; + } else { + throw new Exception( + sprintf( + 'INI setting "%s" could not be set to "%s".', + $varName, + $newValue, + ), + ); + } + } + + /** + * This method is a wrapper for the setlocale() function that automatically + * resets the locale to its original value after the test is run. + * + * @throws Exception + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5216 + * + * @codeCoverageIgnore + */ + final protected function setLocale(mixed ...$arguments): void + { + Event\Facade::emitter()->testTriggeredPhpunitDeprecation( + $this->valueObjectForEvents(), + 'setLocale() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + + if (count($arguments) < 2) { + throw new Exception; + } + + [$category, $locale] = $arguments; + + if (!in_array($category, self::LOCALE_CATEGORIES, true)) { + throw new Exception; + } + + if (!is_array($locale) && !is_string($locale)) { + throw new Exception; + } + + $this->locale[$category] = setlocale($category, '0'); + + $result = setlocale(...$arguments); + + if ($result === false) { + throw new Exception( + 'The locale functionality is not implemented on your platform, ' . + 'the specified locale does not exist or the category name is ' . + 'invalid.', + ); + } + } + /** * Creates a mock object for the specified interface or class. * * @template RealInstanceType of object * - * @param class-string $type + * @param class-string $originalClassName * * @throws InvalidArgumentException * @throws MockObjectException @@ -1131,22 +1338,25 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T * * @return MockObject&RealInstanceType */ - final protected function createMock(string $type): MockObject + final protected function createMock(string $originalClassName): MockObject { $mock = (new MockGenerator)->testDouble( - $type, + $originalClassName, + true, true, callOriginalConstructor: false, callOriginalClone: false, + cloneArguments: false, + allowMockingUnknownTypes: false, returnValueGeneration: self::generateReturnValuesForTestDoubles(), ); - assert($mock instanceof $type); + assert($mock instanceof $originalClassName); assert($mock instanceof MockObject); $this->registerMockObject($mock); - Event\Facade::emitter()->testCreatedMockObject($type); + Event\Facade::emitter()->testCreatedMockObject($originalClassName); return $mock; } @@ -1178,7 +1388,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T * * @template RealInstanceType of object * - * @param class-string $type + * @param class-string $originalClassName * @param array $configuration * * @throws InvalidArgumentException @@ -1187,9 +1397,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T * * @return MockObject&RealInstanceType */ - final protected function createConfiguredMock(string $type, array $configuration): MockObject + final protected function createConfiguredMock(string $originalClassName, array $configuration): MockObject { - $o = $this->createMock($type); + $o = $this->createMock($originalClassName); foreach ($configuration as $method => $return) { $o->method($method)->willReturn($return); @@ -1201,7 +1411,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T /** * Creates a partial mock object for the specified interface or class. * - * @param class-string $type + * @param class-string $originalClassName * @param list $methods * * @template RealInstanceType of object @@ -1211,11 +1421,13 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T * * @return MockObject&RealInstanceType */ - final protected function createPartialMock(string $type, array $methods): MockObject + final protected function createPartialMock(string $originalClassName, array $methods): MockObject { - $mockBuilder = $this->getMockBuilder($type) + $mockBuilder = $this->getMockBuilder($originalClassName) ->disableOriginalConstructor() ->disableOriginalClone() + ->disableArgumentCloning() + ->disallowMockingUnknownTypes() ->onlyMethods($methods); if (!self::generateReturnValuesForTestDoubles()) { @@ -1225,13 +1437,220 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $partialMock = $mockBuilder->getMock(); Event\Facade::emitter()->testCreatedPartialMockObject( - $type, + $originalClassName, ...$methods, ); return $partialMock; } + /** + * Creates a test proxy for the specified class. + * + * @template RealInstanceType of object + * + * @param class-string $originalClassName + * @param array $constructorArguments + * + * @throws InvalidArgumentException + * @throws MockObjectException + * + * @return MockObject&RealInstanceType + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5240 + */ + final protected function createTestProxy(string $originalClassName, array $constructorArguments = []): MockObject + { + Event\Facade::emitter()->testTriggeredPhpunitDeprecation( + $this->valueObjectForEvents(), + 'createTestProxy() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + + $testProxy = $this->getMockBuilder($originalClassName) + ->setConstructorArgs($constructorArguments) + ->enableProxyingToOriginalMethods() + ->getMock(); + + Event\Facade::emitter()->testCreatedTestProxy( + $originalClassName, + $constructorArguments, + ); + + return $testProxy; + } + + /** + * Creates a mock object for the specified abstract class with all abstract + * methods of the class mocked. Concrete methods are not mocked by default. + * To mock concrete methods, use the 7th parameter ($mockedMethods). + * + * @template RealInstanceType of object + * + * @param class-string $originalClassName + * @param array $arguments + * @param list $mockedMethods + * + * @throws InvalidArgumentException + * @throws MockObjectException + * + * @return MockObject&RealInstanceType + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5241 + */ + final protected function getMockForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = false): MockObject + { + Event\Facade::emitter()->testTriggeredPhpunitDeprecation( + $this->valueObjectForEvents(), + 'getMockForAbstractClass() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + + $mockObject = (new MockGenerator)->mockObjectForAbstractClass( + $originalClassName, + $arguments, + $mockClassName, + $callOriginalConstructor, + $callOriginalClone, + $callAutoload, + $mockedMethods, + $cloneArguments, + ); + + $this->registerMockObject($mockObject); + + Event\Facade::emitter()->testCreatedMockObjectForAbstractClass($originalClassName); + + assert($mockObject instanceof $originalClassName); + assert($mockObject instanceof MockObject); + + return $mockObject; + } + + /** + * Creates a mock object based on the given WSDL file. + * + * @param list $methods + * @param list $options + * + * @throws MockObjectException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5242 + */ + final protected function getMockFromWsdl(string $wsdlFile, string $originalClassName = '', string $mockClassName = '', array $methods = [], bool $callOriginalConstructor = true, array $options = []): MockObject + { + Event\Facade::emitter()->testTriggeredPhpunitDeprecation( + $this->valueObjectForEvents(), + 'getMockFromWsdl() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + + if ($originalClassName === '') { + $fileName = pathinfo(basename(parse_url($wsdlFile, PHP_URL_PATH)), PATHINFO_FILENAME); + $originalClassName = preg_replace('/\W/', '', $fileName); + } + + if (!class_exists($originalClassName)) { + eval( + (new MockGenerator)->generateClassFromWsdl( + $wsdlFile, + $originalClassName, + $methods, + $options, + ) + ); + } + + $mockObject = (new MockGenerator)->testDouble( + $originalClassName, + true, + true, + $methods, + ['', $options], + $mockClassName, + $callOriginalConstructor, + false, + false, + ); + + Event\Facade::emitter()->testCreatedMockObjectFromWsdl( + $wsdlFile, + $originalClassName, + $mockClassName, + $methods, + $callOriginalConstructor, + $options, + ); + + assert($mockObject instanceof MockObject); + + $this->registerMockObject($mockObject); + + return $mockObject; + } + + /** + * Creates a mock object for the specified trait with all abstract methods + * of the trait mocked. Concrete methods to mock can be specified with the + * `$mockedMethods` parameter. + * + * @param trait-string $traitName + * @param array $arguments + * @param list $mockedMethods + * + * @throws InvalidArgumentException + * @throws MockObjectException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5243 + */ + final protected function getMockForTrait(string $traitName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = false): MockObject + { + Event\Facade::emitter()->testTriggeredPhpunitDeprecation( + $this->valueObjectForEvents(), + 'getMockForTrait() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + + $mockObject = (new MockGenerator)->mockObjectForTrait( + $traitName, + $arguments, + $mockClassName, + $callOriginalConstructor, + $callOriginalClone, + $callAutoload, + $mockedMethods, + $cloneArguments, + ); + + $this->registerMockObject($mockObject); + + Event\Facade::emitter()->testCreatedMockObjectForTrait($traitName); + + return $mockObject; + } + + /** + * Creates an object that uses the specified trait. + * + * @param trait-string $traitName + * @param array $arguments + * + * @throws MockObjectException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5244 + */ + final protected function getObjectForTrait(string $traitName, array $arguments = [], string $traitClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true): object + { + Event\Facade::emitter()->testTriggeredPhpunitDeprecation( + $this->valueObjectForEvents(), + 'getObjectForTrait() is deprecated and will be removed in PHPUnit 12 without replacement.', + ); + + return (new MockGenerator)->objectForTrait( + $traitName, + $traitClassName, + $callAutoload, + $callOriginalConstructor, + $arguments, + ); + } + protected function transformException(Throwable $t): Throwable { return $t; @@ -1776,6 +2195,24 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $this->customComparators = []; } + private function cleanupIniSettings(): void + { + foreach ($this->iniSettings as $varName => $oldValue) { + ini_set($varName, $oldValue); + } + + $this->iniSettings = []; + } + + private function cleanupLocaleSettings(): void + { + foreach ($this->locale as $category => $locale) { + setlocale($category, $locale); + } + + $this->locale = []; + } + /** * @throws Exception */ @@ -2174,7 +2611,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T * * @template RealInstanceType of object * - * @param class-string $type + * @param class-string $originalClassName * * @throws InvalidArgumentException * @throws MockObjectException @@ -2182,19 +2619,22 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T * * @return RealInstanceType&Stub */ - final protected static function createStub(string $type): Stub + final protected static function createStub(string $originalClassName): Stub { $stub = (new MockGenerator)->testDouble( - $type, + $originalClassName, + true, false, callOriginalConstructor: false, callOriginalClone: false, + cloneArguments: false, + allowMockingUnknownTypes: false, returnValueGeneration: self::generateReturnValuesForTestDoubles(), ); - Event\Facade::emitter()->testCreatedStub($type); + Event\Facade::emitter()->testCreatedStub($originalClassName); - assert($stub instanceof $type); + assert($stub instanceof $originalClassName); assert($stub instanceof Stub); return $stub; @@ -2223,7 +2663,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T * * @template RealInstanceType of object * - * @param class-string $type + * @param class-string $originalClassName * @param array $configuration * * @throws InvalidArgumentException @@ -2232,9 +2672,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T * * @return RealInstanceType&Stub */ - final protected static function createConfiguredStub(string $type, array $configuration): Stub + final protected static function createConfiguredStub(string $originalClassName, array $configuration): Stub { - $o = self::createStub($type); + $o = self::createStub($originalClassName); foreach ($configuration as $method => $return) { $o->method($method)->willReturn($return); diff --git a/vendor/phpunit/phpunit/src/Framework/TestRunner/SeparateProcessTestRunner.php b/vendor/phpunit/phpunit/src/Framework/TestRunner/SeparateProcessTestRunner.php index c203256..ff5bbb5 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestRunner/SeparateProcessTestRunner.php +++ b/vendor/phpunit/phpunit/src/Framework/TestRunner/SeparateProcessTestRunner.php @@ -14,7 +14,6 @@ use function defined; use function file_get_contents; use function get_include_path; use function hrtime; -use function is_array; use function is_file; use function restore_error_handler; use function serialize; @@ -249,24 +248,18 @@ final class SeparateProcessTestRunner implements IsolatedTestRunner } if ($childResult !== false) { - if (!is_array($childResult)) { - $childResult = [$childResult]; - } + Facade::instance()->forward($childResult['events']); + PassedTests::instance()->import($childResult['passedTests']); - foreach ($childResult as $result) { - Facade::instance()->forward($result->events); - PassedTests::instance()->import($result->passedTests); + assert($test instanceof TestCase); - assert($test instanceof TestCase); + $test->setResult($childResult['testResult']); + $test->addToAssertionCount($childResult['numAssertions']); - $test->setResult($result->testResult); - $test->addToAssertionCount($result->numAssertions); - - if (CodeCoverage::instance()->isActive() && $result->codeCoverage instanceof \SebastianBergmann\CodeCoverage\CodeCoverage) { - CodeCoverage::instance()->codeCoverage()->merge( - $result->codeCoverage, - ); - } + if (CodeCoverage::instance()->isActive() && $childResult['codeCoverage'] instanceof \SebastianBergmann\CodeCoverage\CodeCoverage) { + CodeCoverage::instance()->codeCoverage()->merge( + $childResult['codeCoverage'], + ); } } } diff --git a/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php b/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php index 7dbf3b4..15e5503 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php +++ b/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php @@ -135,31 +135,36 @@ final class TestRunner } if ($collectCodeCoverage) { - $append = !$risky && !$incomplete && !$skipped; - $covers = null; - $uses = null; - - if (!$append) { - $covers = false; - } + $append = !$risky && !$incomplete && !$skipped; + $linesToBeCovered = []; + $linesToBeUsed = []; if ($append) { - $covers = $codeCoverageMetadataApi->coversTargets( - $test::class, - $test->name(), - ); + try { + $linesToBeCovered = $codeCoverageMetadataApi->linesToBeCovered( + $test::class, + $test->name(), + ); - $uses = $codeCoverageMetadataApi->usesTargets( - $test::class, - $test->name(), - ); + $linesToBeUsed = $codeCoverageMetadataApi->linesToBeUsed( + $test::class, + $test->name(), + ); + } catch (InvalidCoversTargetException $cce) { + Facade::emitter()->testTriggeredPhpunitWarning( + $test->valueObjectForEvents(), + $cce->getMessage(), + ); + + $append = false; + } } try { CodeCoverage::instance()->stop( $append, - $covers, - $uses, + $linesToBeCovered, + $linesToBeUsed, ); } catch (UnintentionallyCoveredCodeException $cce) { Facade::emitter()->testConsideredRisky( @@ -230,11 +235,7 @@ final class TestRunner private function hasCoverageMetadata(string $className, string $methodName): bool { foreach (MetadataRegistry::parser()->forClassAndMethod($className, $methodName) as $metadata) { - if ($metadata->isCoversNamespace()) { - return true; - } - - if ($metadata->isCoversTrait()) { + if ($metadata->isCovers()) { return true; } @@ -242,11 +243,7 @@ final class TestRunner return true; } - if ($metadata->isCoversClassesThatExtendClass()) { - return true; - } - - if ($metadata->isCoversClassesThatImplementInterface()) { + if ($metadata->isCoversTrait()) { return true; } diff --git a/vendor/phpunit/phpunit/src/Framework/TestRunner/templates/class.tpl b/vendor/phpunit/phpunit/src/Framework/TestRunner/templates/class.tpl index d73716f..2067b1e 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestRunner/templates/class.tpl +++ b/vendor/phpunit/phpunit/src/Framework/TestRunner/templates/class.tpl @@ -104,7 +104,7 @@ function __phpunit_run_isolated_test() file_put_contents( '{processResultFile}', serialize( - (object)[ + [ 'testResult' => $test->result(), 'codeCoverage' => {collectCodeCoverageInformation} ? CodeCoverage::instance()->codeCoverage() : null, 'numAssertions' => $test->numberOfAssertionsPerformed(), diff --git a/vendor/phpunit/phpunit/src/Framework/TestRunner/templates/method.tpl b/vendor/phpunit/phpunit/src/Framework/TestRunner/templates/method.tpl index 3ea7fbf..c0130ea 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestRunner/templates/method.tpl +++ b/vendor/phpunit/phpunit/src/Framework/TestRunner/templates/method.tpl @@ -104,7 +104,7 @@ function __phpunit_run_isolated_test() file_put_contents( '{processResultFile}', serialize( - (object)[ + [ 'testResult' => $test->result(), 'codeCoverage' => {collectCodeCoverageInformation} ? CodeCoverage::instance()->codeCoverage() : null, 'numAssertions' => $test->numberOfAssertionsPerformed(), diff --git a/vendor/phpunit/phpunit/src/Logging/EventLogger.php b/vendor/phpunit/phpunit/src/Logging/EventLogger.php index ab3a30c..e7f029a 100644 --- a/vendor/phpunit/phpunit/src/Logging/EventLogger.php +++ b/vendor/phpunit/phpunit/src/Logging/EventLogger.php @@ -41,7 +41,7 @@ final readonly class EventLogger implements Tracer { $telemetryInfo = $this->telemetryInfo($event); $indentation = PHP_EOL . str_repeat(' ', strlen($telemetryInfo)); - $lines = preg_split('/\r\n|\r|\n/', $event->asString()) ?: []; + $lines = preg_split('/\r\n|\r|\n/', $event->asString()); $flags = FILE_APPEND; diff --git a/vendor/phpunit/phpunit/src/Logging/JUnit/JunitXmlLogger.php b/vendor/phpunit/phpunit/src/Logging/JUnit/JunitXmlLogger.php index 43499f3..5a5884f 100644 --- a/vendor/phpunit/phpunit/src/Logging/JUnit/JunitXmlLogger.php +++ b/vendor/phpunit/phpunit/src/Logging/JUnit/JunitXmlLogger.php @@ -104,7 +104,7 @@ final class JunitXmlLogger public function flush(): void { - $this->printer->print($this->document->saveXML() ?: ''); + $this->printer->print($this->document->saveXML()); $this->printer->flush(); } @@ -285,7 +285,7 @@ final class JunitXmlLogger ); $this->testSuiteTests[$this->testSuiteLevel]++; - $this->testSuiteTimes[$this->testSuiteLevel] += (int) $time; + $this->testSuiteTimes[$this->testSuiteLevel] += $time; $this->currentTestCase = null; $this->time = null; diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/HtmlRenderer.php b/vendor/phpunit/phpunit/src/Logging/TestDox/HtmlRenderer.php index 3d74d59..ccf9f9b 100644 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/HtmlRenderer.php +++ b/vendor/phpunit/phpunit/src/Logging/TestDox/HtmlRenderer.php @@ -18,7 +18,10 @@ use function sprintf; */ final readonly class HtmlRenderer { - private const string PAGE_HEADER = <<<'EOT' + /** + * @var string + */ + private const PAGE_HEADER = <<<'EOT' @@ -73,16 +76,28 @@ final readonly class HtmlRenderer EOT; - private const string CLASS_HEADER = <<<'EOT' + + /** + * @var string + */ + private const CLASS_HEADER = <<<'EOT'

%s

    EOT; - private const string CLASS_FOOTER = <<<'EOT' + + /** + * @var string + */ + private const CLASS_FOOTER = <<<'EOT'
EOT; - private const string PAGE_FOOTER = <<<'EOT' + + /** + * @var string + */ + private const PAGE_FOOTER = <<<'EOT' diff --git a/vendor/phpunit/phpunit/src/Metadata/After.php b/vendor/phpunit/phpunit/src/Metadata/After.php index 7009d01..5ad3fef 100644 --- a/vendor/phpunit/phpunit/src/Metadata/After.php +++ b/vendor/phpunit/phpunit/src/Metadata/After.php @@ -22,7 +22,7 @@ final readonly class After extends Metadata private int $priority; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param non-negative-int $priority */ protected function __construct(int $level, int $priority) diff --git a/vendor/phpunit/phpunit/src/Metadata/AfterClass.php b/vendor/phpunit/phpunit/src/Metadata/AfterClass.php index 48885bf..7b18ac0 100644 --- a/vendor/phpunit/phpunit/src/Metadata/AfterClass.php +++ b/vendor/phpunit/phpunit/src/Metadata/AfterClass.php @@ -22,7 +22,7 @@ final readonly class AfterClass extends Metadata private int $priority; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param non-negative-int $priority */ protected function __construct(int $level, int $priority) diff --git a/vendor/phpunit/phpunit/src/Metadata/Api/CodeCoverage.php b/vendor/phpunit/phpunit/src/Metadata/Api/CodeCoverage.php index e9ac476..ef2f243 100644 --- a/vendor/phpunit/phpunit/src/Metadata/Api/CodeCoverage.php +++ b/vendor/phpunit/phpunit/src/Metadata/Api/CodeCoverage.php @@ -10,23 +10,32 @@ namespace PHPUnit\Metadata\Api; use function assert; +use function class_exists; +use function count; +use function interface_exists; +use function sprintf; +use function str_starts_with; +use function trait_exists; +use PHPUnit\Framework\CodeCoverageException; +use PHPUnit\Framework\InvalidCoversTargetException; +use PHPUnit\Metadata\Covers; use PHPUnit\Metadata\CoversClass; -use PHPUnit\Metadata\CoversClassesThatExtendClass; -use PHPUnit\Metadata\CoversClassesThatImplementInterface; +use PHPUnit\Metadata\CoversDefaultClass; use PHPUnit\Metadata\CoversFunction; use PHPUnit\Metadata\CoversMethod; -use PHPUnit\Metadata\CoversNamespace; use PHPUnit\Metadata\CoversTrait; use PHPUnit\Metadata\Parser\Registry; +use PHPUnit\Metadata\Uses; use PHPUnit\Metadata\UsesClass; -use PHPUnit\Metadata\UsesClassesThatExtendClass; -use PHPUnit\Metadata\UsesClassesThatImplementInterface; +use PHPUnit\Metadata\UsesDefaultClass; use PHPUnit\Metadata\UsesFunction; use PHPUnit\Metadata\UsesMethod; -use PHPUnit\Metadata\UsesNamespace; use PHPUnit\Metadata\UsesTrait; -use SebastianBergmann\CodeCoverage\Test\Target\Target; -use SebastianBergmann\CodeCoverage\Test\Target\TargetCollection; +use ReflectionClass; +use SebastianBergmann\CodeUnit\CodeUnitCollection; +use SebastianBergmann\CodeUnit\Exception as CodeUnitException; +use SebastianBergmann\CodeUnit\InvalidCodeUnitException; +use SebastianBergmann\CodeUnit\Mapper; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -35,114 +44,162 @@ use SebastianBergmann\CodeCoverage\Test\Target\TargetCollection; */ final class CodeCoverage { + /** + * @var array> + */ + private array $withParents = []; + /** * @param class-string $className * @param non-empty-string $methodName + * + * @throws CodeCoverageException + * + * @return array>|false */ - public function coversTargets(string $className, string $methodName): TargetCollection + public function linesToBeCovered(string $className, string $methodName): array|false { - $targets = []; + if (!$this->shouldCodeCoverageBeCollectedFor($className, $methodName)) { + return false; + } + + $metadataForClass = Registry::parser()->forClass($className); + $classShortcut = null; + + if ($metadataForClass->isCoversDefaultClass()->isNotEmpty()) { + if (count($metadataForClass->isCoversDefaultClass()) > 1) { + throw new CodeCoverageException( + sprintf( + 'More than one @coversDefaultClass annotation for class or interface "%s"', + $className, + ), + ); + } + + $metadata = $metadataForClass->isCoversDefaultClass()->asArray()[0]; + + assert($metadata instanceof CoversDefaultClass); + + $classShortcut = $metadata->className(); + } + + $codeUnits = CodeUnitCollection::fromList(); + $mapper = new Mapper; foreach (Registry::parser()->forClassAndMethod($className, $methodName) as $metadata) { - if ($metadata->isCoversNamespace()) { - assert($metadata instanceof CoversNamespace); - - $targets[] = Target::forNamespace($metadata->namespace()); + if (!$metadata->isCoversClass() && !$metadata->isCoversTrait() && !$metadata->isCoversMethod() && !$metadata->isCoversFunction() && !$metadata->isCovers()) { + continue; } - if ($metadata->isCoversClass()) { - assert($metadata instanceof CoversClass); + /** @phpstan-ignore booleanOr.alwaysTrue */ + assert($metadata instanceof CoversClass || $metadata instanceof CoversTrait || $metadata instanceof CoversMethod || $metadata instanceof CoversFunction || $metadata instanceof Covers); - $targets[] = Target::forClass($metadata->className()); - } + if ($metadata->isCoversClass() || $metadata->isCoversTrait() || $metadata->isCoversMethod() || $metadata->isCoversFunction()) { + $codeUnits = $codeUnits->mergeWith($this->mapToCodeUnits($metadata)); + } elseif ($metadata->isCovers()) { + assert($metadata instanceof Covers); - if ($metadata->isCoversClassesThatExtendClass()) { - assert($metadata instanceof CoversClassesThatExtendClass); + $target = $metadata->target(); - $targets[] = Target::forClassesThatExtendClass($metadata->className()); - } + if (interface_exists($target)) { + throw new InvalidCoversTargetException( + sprintf( + 'Trying to @cover interface "%s".', + $target, + ), + ); + } - if ($metadata->isCoversClassesThatImplementInterface()) { - assert($metadata instanceof CoversClassesThatImplementInterface); + if ($classShortcut !== null && str_starts_with($target, '::')) { + $target = $classShortcut . $target; + } - $targets[] = Target::forClassesThatImplementInterface($metadata->interfaceName()); - } - - if ($metadata->isCoversMethod()) { - assert($metadata instanceof CoversMethod); - - $targets[] = Target::forMethod($metadata->className(), $metadata->methodName()); - } - - if ($metadata->isCoversFunction()) { - assert($metadata instanceof CoversFunction); - - $targets[] = Target::forFunction($metadata->functionName()); - } - - if ($metadata->isCoversTrait()) { - assert($metadata instanceof CoversTrait); - - $targets[] = Target::forTrait($metadata->traitName()); + try { + $codeUnits = $codeUnits->mergeWith($mapper->stringToCodeUnits($target)); + } catch (InvalidCodeUnitException $e) { + throw new InvalidCoversTargetException( + sprintf( + '"@covers %s" is invalid', + $target, + ), + $e->getCode(), + $e, + ); + } } } - return TargetCollection::fromArray($targets); + return $mapper->codeUnitsToSourceLines($codeUnits); } /** * @param class-string $className * @param non-empty-string $methodName + * + * @throws CodeCoverageException + * + * @return array> */ - public function usesTargets(string $className, string $methodName): TargetCollection + public function linesToBeUsed(string $className, string $methodName): array { - $targets = []; + $metadataForClass = Registry::parser()->forClass($className); + $classShortcut = null; + + if ($metadataForClass->isUsesDefaultClass()->isNotEmpty()) { + if (count($metadataForClass->isUsesDefaultClass()) > 1) { + throw new CodeCoverageException( + sprintf( + 'More than one @usesDefaultClass annotation for class or interface "%s"', + $className, + ), + ); + } + + $metadata = $metadataForClass->isUsesDefaultClass()->asArray()[0]; + + assert($metadata instanceof UsesDefaultClass); + + $classShortcut = $metadata->className(); + } + + $codeUnits = CodeUnitCollection::fromList(); + $mapper = new Mapper; foreach (Registry::parser()->forClassAndMethod($className, $methodName) as $metadata) { - if ($metadata->isUsesNamespace()) { - assert($metadata instanceof UsesNamespace); - - $targets[] = Target::forNamespace($metadata->namespace()); + if (!$metadata->isUsesClass() && !$metadata->isUsesTrait() && !$metadata->isUsesMethod() && !$metadata->isUsesFunction() && !$metadata->isUses()) { + continue; } - if ($metadata->isUsesClass()) { - assert($metadata instanceof UsesClass); + /** @phpstan-ignore booleanOr.alwaysTrue */ + assert($metadata instanceof UsesClass || $metadata instanceof UsesTrait || $metadata instanceof UsesMethod || $metadata instanceof UsesFunction || $metadata instanceof Uses); - $targets[] = Target::forClass($metadata->className()); - } + if ($metadata->isUsesClass() || $metadata->isUsesTrait() || $metadata->isUsesMethod() || $metadata->isUsesFunction()) { + $codeUnits = $codeUnits->mergeWith($this->mapToCodeUnits($metadata)); + } elseif ($metadata->isUses()) { + assert($metadata instanceof Uses); - if ($metadata->isUsesClassesThatExtendClass()) { - assert($metadata instanceof UsesClassesThatExtendClass); + $target = $metadata->target(); - $targets[] = Target::forClassesThatExtendClass($metadata->className()); - } + if ($classShortcut !== null && str_starts_with($target, '::')) { + $target = $classShortcut . $target; + } - if ($metadata->isUsesClassesThatImplementInterface()) { - assert($metadata instanceof UsesClassesThatImplementInterface); - - $targets[] = Target::forClassesThatImplementInterface($metadata->interfaceName()); - } - - if ($metadata->isUsesMethod()) { - assert($metadata instanceof UsesMethod); - - $targets[] = Target::forMethod($metadata->className(), $metadata->methodName()); - } - - if ($metadata->isUsesFunction()) { - assert($metadata instanceof UsesFunction); - - $targets[] = Target::forFunction($metadata->functionName()); - } - - if ($metadata->isUsesTrait()) { - assert($metadata instanceof UsesTrait); - - $targets[] = Target::forTrait($metadata->traitName()); + try { + $codeUnits = $codeUnits->mergeWith($mapper->stringToCodeUnits($target)); + } catch (InvalidCodeUnitException $e) { + throw new InvalidCoversTargetException( + sprintf( + '"@uses %s" is invalid', + $target, + ), + $e->getCode(), + $e, + ); + } } } - return TargetCollection::fromArray($targets); + return $mapper->codeUnitsToSourceLines($codeUnits); } /** @@ -158,10 +215,101 @@ final class CodeCoverage return false; } + if ($metadataForMethod->isCovers()->isNotEmpty() || + $metadataForMethod->isCoversClass()->isNotEmpty() || + $metadataForMethod->isCoversFunction()->isNotEmpty()) { + return true; + } + if ($metadataForClass->isCoversNothing()->isNotEmpty()) { return false; } return true; } + + /** + * @throws InvalidCoversTargetException + */ + private function mapToCodeUnits(CoversClass|CoversFunction|CoversMethod|CoversTrait|UsesClass|UsesFunction|UsesMethod|UsesTrait $metadata): CodeUnitCollection + { + $mapper = new Mapper; + $names = $this->names($metadata); + + try { + if (count($names) === 1) { + return $mapper->stringToCodeUnits($names[0]); + } + + $codeUnits = CodeUnitCollection::fromList(); + + foreach ($names as $name) { + $codeUnits = $codeUnits->mergeWith( + $mapper->stringToCodeUnits($name), + ); + } + + return $codeUnits; + } catch (CodeUnitException $e) { + throw new InvalidCoversTargetException( + sprintf( + '%s is not a valid target for code coverage', + $metadata->asStringForCodeUnitMapper(), + ), + $e->getCode(), + $e, + ); + } + } + + /** + * @throws InvalidCoversTargetException + * + * @return non-empty-list + */ + private function names(CoversClass|CoversFunction|CoversMethod|CoversTrait|UsesClass|UsesFunction|UsesMethod|UsesTrait $metadata): array + { + $name = $metadata->asStringForCodeUnitMapper(); + $names = [$name]; + + if ($metadata->isCoversClass() || $metadata->isUsesClass()) { + if (isset($this->withParents[$name])) { + return $this->withParents[$name]; + } + + if (interface_exists($name)) { + throw new InvalidCoversTargetException( + sprintf( + 'Interface "%s" is not a valid target for code coverage', + $name, + ), + ); + } + + if (!(class_exists($name) || trait_exists($name))) { + throw new InvalidCoversTargetException( + sprintf( + '"%s" is not a valid target for code coverage', + $name, + ), + ); + } + + assert(class_exists($names[0]) || trait_exists($names[0])); + + $reflector = new ReflectionClass($name); + + while ($reflector = $reflector->getParentClass()) { + if (!$reflector->isUserDefined()) { + break; + } + + $names[] = $reflector->getName(); + } + + $this->withParents[$name] = $names; + } + + return $names; + } } diff --git a/vendor/phpunit/phpunit/src/Metadata/Api/DataProvider.php b/vendor/phpunit/phpunit/src/Metadata/Api/DataProvider.php index f53a92c..1f3c1e6 100644 --- a/vendor/phpunit/phpunit/src/Metadata/Api/DataProvider.php +++ b/vendor/phpunit/phpunit/src/Metadata/Api/DataProvider.php @@ -9,13 +9,26 @@ */ namespace PHPUnit\Metadata\Api; +use const JSON_ERROR_NONE; +use const PREG_OFFSET_CAPTURE; use function array_key_exists; use function assert; +use function explode; use function get_debug_type; use function is_array; use function is_int; use function is_string; +use function json_decode; +use function json_last_error; +use function json_last_error_msg; +use function preg_match; +use function preg_replace; +use function rtrim; use function sprintf; +use function str_replace; +use function strlen; +use function substr; +use function trim; use PHPUnit\Event; use PHPUnit\Framework\InvalidDataProviderException; use PHPUnit\Metadata\DataProvider as DataProviderMetadata; @@ -23,6 +36,7 @@ use PHPUnit\Metadata\MetadataCollection; use PHPUnit\Metadata\Parser\Registry as MetadataRegistry; use PHPUnit\Metadata\TestWith; use ReflectionClass; +use ReflectionMethod; use Throwable; /** @@ -46,7 +60,7 @@ final readonly class DataProvider $testWith = MetadataRegistry::parser()->forMethod($className, $methodName)->isTestWith(); if ($dataProvider->isEmpty() && $testWith->isEmpty()) { - return null; + return $this->dataProvidedByTestWithAnnotation($className, $methodName); } if ($dataProvider->isNotEmpty()) { @@ -172,14 +186,12 @@ final readonly class DataProvider $result[$key] = $value; } else { - // @codeCoverageIgnoreStart throw new InvalidDataProviderException( sprintf( 'The key must be an integer or a string, %s given', get_debug_type($key), ), ); - // @codeCoverageIgnoreEnd } } } @@ -222,4 +234,59 @@ final readonly class DataProvider return $result; } + + /** + * @param class-string $className + * + * @throws InvalidDataProviderException + * + * @return ?array> + */ + private function dataProvidedByTestWithAnnotation(string $className, string $methodName): ?array + { + $docComment = (new ReflectionMethod($className, $methodName))->getDocComment(); + + if ($docComment === false) { + return null; + } + + $docComment = str_replace("\r\n", "\n", $docComment); + $docComment = preg_replace('/\n\s*\*\s?/', "\n", $docComment); + $docComment = substr($docComment, 0, -1); + $docComment = rtrim($docComment, "\n"); + + if (!preg_match('/@testWith\s+/', $docComment, $matches, PREG_OFFSET_CAPTURE)) { + return null; + } + + $offset = strlen($matches[0][0]) + (int) $matches[0][1]; + $annotationContent = substr($docComment, $offset); + $data = []; + + foreach (explode("\n", $annotationContent) as $candidateRow) { + $candidateRow = trim($candidateRow); + + if ($candidateRow === '' || $candidateRow[0] !== '[') { + break; + } + + $dataSet = json_decode($candidateRow, true); + + if (json_last_error() !== JSON_ERROR_NONE) { + throw new InvalidDataProviderException( + 'The data set for the @testWith annotation cannot be parsed: ' . json_last_error_msg(), + ); + } + + $data[] = $dataSet; + } + + if (!$data) { + throw new InvalidDataProviderException( + 'The data set for the @testWith annotation cannot be parsed.', + ); + } + + return $data; + } } diff --git a/vendor/phpunit/phpunit/src/Metadata/Api/Groups.php b/vendor/phpunit/phpunit/src/Metadata/Api/Groups.php index aa2cbf4..e5615ab 100644 --- a/vendor/phpunit/phpunit/src/Metadata/Api/Groups.php +++ b/vendor/phpunit/phpunit/src/Metadata/Api/Groups.php @@ -13,14 +13,17 @@ use function array_flip; use function array_key_exists; use function array_unique; use function assert; +use function ltrim; use function strtolower; use function trim; use PHPUnit\Framework\TestSize\TestSize; +use PHPUnit\Metadata\Covers; use PHPUnit\Metadata\CoversClass; use PHPUnit\Metadata\CoversFunction; use PHPUnit\Metadata\Group; use PHPUnit\Metadata\Parser\Registry; use PHPUnit\Metadata\RequiresPhpExtension; +use PHPUnit\Metadata\Uses; use PHPUnit\Metadata\UsesClass; use PHPUnit\Metadata\UsesFunction; @@ -63,36 +66,36 @@ final class Groups } foreach (Registry::parser()->forClassAndMethod($className, $methodName) as $metadata) { - if ($metadata->isCoversClass()) { - assert($metadata instanceof CoversClass); + if ($metadata->isCoversClass() || $metadata->isCoversFunction()) { + /** @phpstan-ignore booleanOr.alwaysTrue */ + assert($metadata instanceof CoversClass || $metadata instanceof CoversFunction); - $groups[] = '__phpunit_covers_' . $this->canonicalizeName($metadata->className()); + $groups[] = '__phpunit_covers_' . $this->canonicalizeName(ltrim($metadata->asStringForCodeUnitMapper(), ':')); continue; } - if ($metadata->isCoversFunction()) { - assert($metadata instanceof CoversFunction); + if ($metadata->isCovers()) { + assert($metadata instanceof Covers); - $groups[] = '__phpunit_covers_' . $this->canonicalizeName($metadata->functionName()); + $groups[] = '__phpunit_covers_' . $this->canonicalizeName($metadata->target()); continue; } - if ($metadata->isUsesClass()) { - assert($metadata instanceof UsesClass); + if ($metadata->isUsesClass() || $metadata->isUsesFunction()) { + /** @phpstan-ignore booleanOr.alwaysTrue */ + assert($metadata instanceof UsesClass || $metadata instanceof UsesFunction); - $groups[] = '__phpunit_uses_' . $this->canonicalizeName($metadata->className()); + $groups[] = '__phpunit_uses_' . $this->canonicalizeName(ltrim($metadata->asStringForCodeUnitMapper(), ':')); continue; } - if ($metadata->isUsesFunction()) { - assert($metadata instanceof UsesFunction); + if ($metadata->isUses()) { + assert($metadata instanceof Uses); - $groups[] = '__phpunit_uses_' . $this->canonicalizeName($metadata->functionName()); - - continue; + $groups[] = '__phpunit_uses_' . $this->canonicalizeName($metadata->target()); } if ($metadata->isRequiresPhpExtension()) { @@ -102,7 +105,9 @@ final class Groups } } - return self::$groupCache[$key] = array_unique($groups); + self::$groupCache[$key] = array_unique($groups); + + return self::$groupCache[$key]; } /** diff --git a/vendor/phpunit/phpunit/src/Metadata/Api/Requirements.php b/vendor/phpunit/phpunit/src/Metadata/Api/Requirements.php index 32ec095..96951f6 100644 --- a/vendor/phpunit/phpunit/src/Metadata/Api/Requirements.php +++ b/vendor/phpunit/phpunit/src/Metadata/Api/Requirements.php @@ -14,7 +14,6 @@ use const PHP_OS_FAMILY; use const PHP_VERSION; use function addcslashes; use function array_column; -use function array_key_exists; use function assert; use function extension_loaded; use function function_exists; @@ -25,7 +24,6 @@ use function phpversion; use function preg_match; use function sprintf; use PHPUnit\Metadata\Parser\Registry; -use PHPUnit\Metadata\RequiresEnvironmentVariable; use PHPUnit\Metadata\RequiresFunction; use PHPUnit\Metadata\RequiresMethod; use PHPUnit\Metadata\RequiresOperatingSystem; @@ -72,7 +70,7 @@ final readonly class Requirements if (!extension_loaded($metadata->extension()) || ($metadata->hasVersionRequirement() && - !$metadata->versionRequirement()->isSatisfiedBy(phpversion($metadata->extension()) ?: ''))) { + !$metadata->versionRequirement()->isSatisfiedBy(phpversion($metadata->extension())))) { $notSatisfied[] = sprintf( 'PHP extension %s%s is required.', $metadata->extension(), @@ -107,25 +105,6 @@ final readonly class Requirements } } - if ($metadata->isRequiresEnvironmentVariable()) { - assert($metadata instanceof RequiresEnvironmentVariable); - - if (!array_key_exists($metadata->environmentVariableName(), $_ENV) || - $metadata->value() === null && $_ENV[$metadata->environmentVariableName()] === '') { - $notSatisfied[] = sprintf('Environment variable "%s" is required.', $metadata->environmentVariableName()); - - continue; - } - - if ($metadata->value() !== null && $_ENV[$metadata->environmentVariableName()] !== $metadata->value()) { - $notSatisfied[] = sprintf( - 'Environment variable "%s" is required to be "%s".', - $metadata->environmentVariableName(), - $metadata->value(), - ); - } - } - if ($metadata->isRequiresOperatingSystemFamily()) { assert($metadata instanceof RequiresOperatingSystemFamily); diff --git a/vendor/phpunit/phpunit/src/Metadata/BackupGlobals.php b/vendor/phpunit/phpunit/src/Metadata/BackupGlobals.php index 5d94784..2a340e6 100644 --- a/vendor/phpunit/phpunit/src/Metadata/BackupGlobals.php +++ b/vendor/phpunit/phpunit/src/Metadata/BackupGlobals.php @@ -19,7 +19,7 @@ final readonly class BackupGlobals extends Metadata private bool $enabled; /** - * @param int<0, 1> $level + * @param 0|1 $level */ protected function __construct(int $level, bool $enabled) { diff --git a/vendor/phpunit/phpunit/src/Metadata/BackupStaticProperties.php b/vendor/phpunit/phpunit/src/Metadata/BackupStaticProperties.php index a07698e..32f1644 100644 --- a/vendor/phpunit/phpunit/src/Metadata/BackupStaticProperties.php +++ b/vendor/phpunit/phpunit/src/Metadata/BackupStaticProperties.php @@ -19,7 +19,7 @@ final readonly class BackupStaticProperties extends Metadata private bool $enabled; /** - * @param int<0, 1> $level + * @param 0|1 $level */ protected function __construct(int $level, bool $enabled) { diff --git a/vendor/phpunit/phpunit/src/Metadata/Before.php b/vendor/phpunit/phpunit/src/Metadata/Before.php index 2c78a9e..4e201d6 100644 --- a/vendor/phpunit/phpunit/src/Metadata/Before.php +++ b/vendor/phpunit/phpunit/src/Metadata/Before.php @@ -22,7 +22,7 @@ final readonly class Before extends Metadata private int $priority; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param non-negative-int $priority */ protected function __construct(int $level, int $priority) diff --git a/vendor/phpunit/phpunit/src/Metadata/BeforeClass.php b/vendor/phpunit/phpunit/src/Metadata/BeforeClass.php index a31b9cd..5732856 100644 --- a/vendor/phpunit/phpunit/src/Metadata/BeforeClass.php +++ b/vendor/phpunit/phpunit/src/Metadata/BeforeClass.php @@ -22,7 +22,7 @@ final readonly class BeforeClass extends Metadata private int $priority; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param non-negative-int $priority */ protected function __construct(int $level, int $priority) diff --git a/vendor/phpunit/phpunit/src/Metadata/UsesNamespace.php b/vendor/phpunit/phpunit/src/Metadata/Covers.php similarity index 58% rename from vendor/phpunit/phpunit/src/Metadata/UsesNamespace.php rename to vendor/phpunit/phpunit/src/Metadata/Covers.php index f5e5d01..d9714be 100644 --- a/vendor/phpunit/phpunit/src/Metadata/UsesNamespace.php +++ b/vendor/phpunit/phpunit/src/Metadata/Covers.php @@ -14,34 +14,34 @@ namespace PHPUnit\Metadata; * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final readonly class UsesNamespace extends Metadata +final readonly class Covers extends Metadata { /** * @var non-empty-string */ - private string $namespace; + private string $target; /** - * @param int<0, 1> $level - * @param non-empty-string $namespace + * @param 0|1 $level + * @param non-empty-string $target */ - protected function __construct(int $level, string $namespace) + protected function __construct(int $level, string $target) { parent::__construct($level); - $this->namespace = $namespace; + $this->target = $target; } - public function isUsesNamespace(): true + public function isCovers(): true { return true; } /** - * @return class-string + * @return non-empty-string */ - public function namespace(): string + public function target(): string { - return $this->namespace; + return $this->target; } } diff --git a/vendor/phpunit/phpunit/src/Metadata/CoversClass.php b/vendor/phpunit/phpunit/src/Metadata/CoversClass.php index e573952..cf379cd 100644 --- a/vendor/phpunit/phpunit/src/Metadata/CoversClass.php +++ b/vendor/phpunit/phpunit/src/Metadata/CoversClass.php @@ -22,7 +22,7 @@ final readonly class CoversClass extends Metadata private string $className; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param class-string $className */ protected function __construct(int $level, string $className) @@ -44,4 +44,14 @@ final readonly class CoversClass extends Metadata { return $this->className; } + + /** + * @return class-string + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function asStringForCodeUnitMapper(): string + { + return $this->className; + } } diff --git a/vendor/phpunit/phpunit/src/Metadata/CoversClassesThatImplementInterface.php b/vendor/phpunit/phpunit/src/Metadata/CoversClassesThatImplementInterface.php deleted file mode 100644 index e980801..0000000 --- a/vendor/phpunit/phpunit/src/Metadata/CoversClassesThatImplementInterface.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class CoversClassesThatImplementInterface extends Metadata -{ - /** - * @var class-string - */ - private string $interfaceName; - - /** - * @param int<0, 1> $level - * @param class-string $interfaceName - */ - protected function __construct(int $level, string $interfaceName) - { - parent::__construct($level); - - $this->interfaceName = $interfaceName; - } - - public function isCoversClassesThatImplementInterface(): true - { - return true; - } - - /** - * @return class-string - */ - public function interfaceName(): string - { - return $this->interfaceName; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/UsesClassesThatExtendClass.php b/vendor/phpunit/phpunit/src/Metadata/CoversDefaultClass.php similarity index 84% rename from vendor/phpunit/phpunit/src/Metadata/UsesClassesThatExtendClass.php rename to vendor/phpunit/phpunit/src/Metadata/CoversDefaultClass.php index baddfeb..84d0c7c 100644 --- a/vendor/phpunit/phpunit/src/Metadata/UsesClassesThatExtendClass.php +++ b/vendor/phpunit/phpunit/src/Metadata/CoversDefaultClass.php @@ -14,7 +14,7 @@ namespace PHPUnit\Metadata; * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final readonly class UsesClassesThatExtendClass extends Metadata +final readonly class CoversDefaultClass extends Metadata { /** * @var class-string @@ -22,7 +22,7 @@ final readonly class UsesClassesThatExtendClass extends Metadata private string $className; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param class-string $className */ protected function __construct(int $level, string $className) @@ -32,7 +32,7 @@ final readonly class UsesClassesThatExtendClass extends Metadata $this->className = $className; } - public function isUsesClassesThatExtendClass(): true + public function isCoversDefaultClass(): true { return true; } diff --git a/vendor/phpunit/phpunit/src/Metadata/CoversFunction.php b/vendor/phpunit/phpunit/src/Metadata/CoversFunction.php index 4e95360..f6dbb0d 100644 --- a/vendor/phpunit/phpunit/src/Metadata/CoversFunction.php +++ b/vendor/phpunit/phpunit/src/Metadata/CoversFunction.php @@ -22,7 +22,7 @@ final readonly class CoversFunction extends Metadata private string $functionName; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param non-empty-string $functionName */ protected function __construct(int $level, string $functionName) @@ -44,4 +44,12 @@ final readonly class CoversFunction extends Metadata { return $this->functionName; } + + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function asStringForCodeUnitMapper(): string + { + return '::' . $this->functionName; + } } diff --git a/vendor/phpunit/phpunit/src/Metadata/CoversMethod.php b/vendor/phpunit/phpunit/src/Metadata/CoversMethod.php index 73092ff..7534863 100644 --- a/vendor/phpunit/phpunit/src/Metadata/CoversMethod.php +++ b/vendor/phpunit/phpunit/src/Metadata/CoversMethod.php @@ -27,7 +27,7 @@ final readonly class CoversMethod extends Metadata private string $methodName; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param class-string $className * @param non-empty-string $methodName */ @@ -59,4 +59,14 @@ final readonly class CoversMethod extends Metadata { return $this->methodName; } + + /** + * @return non-empty-string + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function asStringForCodeUnitMapper(): string + { + return $this->className . '::' . $this->methodName; + } } diff --git a/vendor/phpunit/phpunit/src/Metadata/CoversTrait.php b/vendor/phpunit/phpunit/src/Metadata/CoversTrait.php index 2cad9df..68fafa1 100644 --- a/vendor/phpunit/phpunit/src/Metadata/CoversTrait.php +++ b/vendor/phpunit/phpunit/src/Metadata/CoversTrait.php @@ -44,4 +44,14 @@ final readonly class CoversTrait extends Metadata { return $this->traitName; } + + /** + * @return trait-string + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function asStringForCodeUnitMapper(): string + { + return $this->traitName; + } } diff --git a/vendor/phpunit/phpunit/src/Metadata/DataProvider.php b/vendor/phpunit/phpunit/src/Metadata/DataProvider.php index 57b821e..58aab52 100644 --- a/vendor/phpunit/phpunit/src/Metadata/DataProvider.php +++ b/vendor/phpunit/phpunit/src/Metadata/DataProvider.php @@ -27,7 +27,7 @@ final readonly class DataProvider extends Metadata private string $methodName; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param class-string $className * @param non-empty-string $methodName */ diff --git a/vendor/phpunit/phpunit/src/Metadata/DependsOnClass.php b/vendor/phpunit/phpunit/src/Metadata/DependsOnClass.php index fbc40fd..ba02c4d 100644 --- a/vendor/phpunit/phpunit/src/Metadata/DependsOnClass.php +++ b/vendor/phpunit/phpunit/src/Metadata/DependsOnClass.php @@ -24,7 +24,7 @@ final readonly class DependsOnClass extends Metadata private bool $shallowClone; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param class-string $className */ protected function __construct(int $level, string $className, bool $deepClone, bool $shallowClone) diff --git a/vendor/phpunit/phpunit/src/Metadata/DependsOnMethod.php b/vendor/phpunit/phpunit/src/Metadata/DependsOnMethod.php index 82056a9..433d263 100644 --- a/vendor/phpunit/phpunit/src/Metadata/DependsOnMethod.php +++ b/vendor/phpunit/phpunit/src/Metadata/DependsOnMethod.php @@ -29,7 +29,7 @@ final readonly class DependsOnMethod extends Metadata private bool $shallowClone; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param class-string $className * @param non-empty-string $methodName */ diff --git a/vendor/phpunit/phpunit/src/Metadata/Exception/AnnotationsAreNotSupportedForInternalClassesException.php b/vendor/phpunit/phpunit/src/Metadata/Exception/AnnotationsAreNotSupportedForInternalClassesException.php new file mode 100644 index 0000000..bd02bac --- /dev/null +++ b/vendor/phpunit/phpunit/src/Metadata/Exception/AnnotationsAreNotSupportedForInternalClassesException.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Metadata; + +use function sprintf; +use PHPUnit\Exception; +use RuntimeException; + +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class AnnotationsAreNotSupportedForInternalClassesException extends RuntimeException implements Exception +{ + /** + * @param class-string $className + */ + public function __construct(string $className) + { + parent::__construct( + sprintf( + 'Annotations can only be parsed for user-defined classes, trying to parse annotations for class "%s"', + $className, + ), + ); + } +} diff --git a/vendor/phpunit/phpunit/src/Metadata/Exception/ReflectionException.php b/vendor/phpunit/phpunit/src/Metadata/Exception/ReflectionException.php new file mode 100644 index 0000000..04e0d22 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Metadata/Exception/ReflectionException.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Metadata; + +use PHPUnit\Exception; +use RuntimeException; + +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class ReflectionException extends RuntimeException implements Exception +{ +} diff --git a/vendor/phpunit/phpunit/src/Metadata/ExcludeGlobalVariableFromBackup.php b/vendor/phpunit/phpunit/src/Metadata/ExcludeGlobalVariableFromBackup.php index 4f646db..65a606e 100644 --- a/vendor/phpunit/phpunit/src/Metadata/ExcludeGlobalVariableFromBackup.php +++ b/vendor/phpunit/phpunit/src/Metadata/ExcludeGlobalVariableFromBackup.php @@ -22,7 +22,7 @@ final readonly class ExcludeGlobalVariableFromBackup extends Metadata private string $globalVariableName; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param non-empty-string $globalVariableName */ protected function __construct(int $level, string $globalVariableName) diff --git a/vendor/phpunit/phpunit/src/Metadata/ExcludeStaticPropertyFromBackup.php b/vendor/phpunit/phpunit/src/Metadata/ExcludeStaticPropertyFromBackup.php index 21725e9..ff170da 100644 --- a/vendor/phpunit/phpunit/src/Metadata/ExcludeStaticPropertyFromBackup.php +++ b/vendor/phpunit/phpunit/src/Metadata/ExcludeStaticPropertyFromBackup.php @@ -27,7 +27,7 @@ final readonly class ExcludeStaticPropertyFromBackup extends Metadata private string $propertyName; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param class-string $className * @param non-empty-string $propertyName */ diff --git a/vendor/phpunit/phpunit/src/Metadata/Group.php b/vendor/phpunit/phpunit/src/Metadata/Group.php index 2ee2784..da269f3 100644 --- a/vendor/phpunit/phpunit/src/Metadata/Group.php +++ b/vendor/phpunit/phpunit/src/Metadata/Group.php @@ -22,7 +22,7 @@ final readonly class Group extends Metadata private string $groupName; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param non-empty-string $groupName */ protected function __construct(int $level, string $groupName) diff --git a/vendor/phpunit/phpunit/src/Metadata/Metadata.php b/vendor/phpunit/phpunit/src/Metadata/Metadata.php index 4d69d61..6db6b70 100644 --- a/vendor/phpunit/phpunit/src/Metadata/Metadata.php +++ b/vendor/phpunit/phpunit/src/Metadata/Metadata.php @@ -19,11 +19,11 @@ use PHPUnit\Runner\Extension\Extension; */ abstract readonly class Metadata { - private const int CLASS_LEVEL = 0; - private const int METHOD_LEVEL = 1; + private const CLASS_LEVEL = 0; + private const METHOD_LEVEL = 1; /** - * @var int<0, 1> + * @var 0|1 */ private int $level; @@ -79,14 +79,6 @@ abstract readonly class Metadata return new BeforeClass(self::METHOD_LEVEL, $priority); } - /** - * @param non-empty-string $namespace - */ - public static function coversNamespace(string $namespace): CoversNamespace - { - return new CoversNamespace(self::CLASS_LEVEL, $namespace); - } - /** * @param class-string $className */ @@ -95,22 +87,6 @@ abstract readonly class Metadata return new CoversClass(self::CLASS_LEVEL, $className); } - /** - * @param class-string $className - */ - public static function coversClassesThatExtendClass(string $className): CoversClassesThatExtendClass - { - return new CoversClassesThatExtendClass(self::CLASS_LEVEL, $className); - } - - /** - * @param class-string $interfaceName - */ - public static function coversClassesThatImplementInterface(string $interfaceName): CoversClassesThatImplementInterface - { - return new CoversClassesThatImplementInterface(self::CLASS_LEVEL, $interfaceName); - } - /** * @param trait-string $traitName */ @@ -136,6 +112,30 @@ abstract readonly class Metadata return new CoversFunction(self::CLASS_LEVEL, $functionName); } + /** + * @param non-empty-string $target + */ + public static function coversOnClass(string $target): Covers + { + return new Covers(self::CLASS_LEVEL, $target); + } + + /** + * @param non-empty-string $target + */ + public static function coversOnMethod(string $target): Covers + { + return new Covers(self::METHOD_LEVEL, $target); + } + + /** + * @param class-string $className + */ + public static function coversDefaultClass(string $className): CoversDefaultClass + { + return new CoversDefaultClass(self::CLASS_LEVEL, $className); + } + public static function coversNothingOnClass(): CoversNothing { return new CoversNothing(self::CLASS_LEVEL); @@ -407,16 +407,6 @@ abstract readonly class Metadata return new RequiresPhpunitExtension(self::METHOD_LEVEL, $extensionClass); } - public static function requiresEnvironmentVariableOnClass(string $environmentVariableName, null|string $value): RequiresEnvironmentVariable - { - return new RequiresEnvironmentVariable(self::CLASS_LEVEL, $environmentVariableName, $value); - } - - public static function requiresEnvironmentVariableOnMethod(string $environmentVariableName, null|string $value): RequiresEnvironmentVariable - { - return new RequiresEnvironmentVariable(self::METHOD_LEVEL, $environmentVariableName, $value); - } - /** * @param non-empty-string $setting * @param non-empty-string $value @@ -480,14 +470,6 @@ abstract readonly class Metadata return new TestWith(self::METHOD_LEVEL, $data, $name); } - /** - * @param non-empty-string $namespace - */ - public static function usesNamespace(string $namespace): UsesNamespace - { - return new UsesNamespace(self::CLASS_LEVEL, $namespace); - } - /** * @param class-string $className */ @@ -496,22 +478,6 @@ abstract readonly class Metadata return new UsesClass(self::CLASS_LEVEL, $className); } - /** - * @param class-string $className - */ - public static function usesClassesThatExtendClass(string $className): UsesClassesThatExtendClass - { - return new UsesClassesThatExtendClass(self::CLASS_LEVEL, $className); - } - - /** - * @param class-string $interfaceName - */ - public static function usesClassesThatImplementInterface(string $interfaceName): UsesClassesThatImplementInterface - { - return new UsesClassesThatImplementInterface(self::CLASS_LEVEL, $interfaceName); - } - /** * @param trait-string $traitName */ @@ -537,13 +503,37 @@ abstract readonly class Metadata return new UsesMethod(self::CLASS_LEVEL, $className, $methodName); } + /** + * @param non-empty-string $target + */ + public static function usesOnClass(string $target): Uses + { + return new Uses(self::CLASS_LEVEL, $target); + } + + /** + * @param non-empty-string $target + */ + public static function usesOnMethod(string $target): Uses + { + return new Uses(self::METHOD_LEVEL, $target); + } + + /** + * @param class-string $className + */ + public static function usesDefaultClass(string $className): UsesDefaultClass + { + return new UsesDefaultClass(self::CLASS_LEVEL, $className); + } + public static function withoutErrorHandler(): WithoutErrorHandler { return new WithoutErrorHandler(self::METHOD_LEVEL); } /** - * @param int<0, 1> $level + * @param 0|1 $level */ protected function __construct(int $level) { @@ -609,9 +599,9 @@ abstract readonly class Metadata } /** - * @phpstan-assert-if-true CoversNamespace $this + * @phpstan-assert-if-true Covers $this */ - public function isCoversNamespace(): bool + public function isCovers(): bool { return false; } @@ -625,17 +615,9 @@ abstract readonly class Metadata } /** - * @phpstan-assert-if-true CoversClassesThatExtendClass $this + * @phpstan-assert-if-true CoversDefaultClass $this */ - public function isCoversClassesThatExtendClass(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true CoversClassesThatImplementInterface $this - */ - public function isCoversClassesThatImplementInterface(): bool + public function isCoversDefaultClass(): bool { return false; } @@ -874,14 +856,6 @@ abstract readonly class Metadata return false; } - /** - * @phpstan-assert-if-true RequiresEnvironmentVariable $this - */ - public function isRequiresEnvironmentVariable(): bool - { - return false; - } - /** * @phpstan-assert-if-true RequiresSetting $this */ @@ -907,9 +881,9 @@ abstract readonly class Metadata } /** - * @phpstan-assert-if-true UsesNamespace $this + * @phpstan-assert-if-true Uses $this */ - public function isUsesNamespace(): bool + public function isUses(): bool { return false; } @@ -923,17 +897,9 @@ abstract readonly class Metadata } /** - * @phpstan-assert-if-true UsesClassesThatExtendClass $this + * @phpstan-assert-if-true UsesDefaultClass $this */ - public function isUsesClassesThatExtendClass(): bool - { - return false; - } - - /** - * @phpstan-assert-if-true UsesClassesThatImplementInterface $this - */ - public function isUsesClassesThatImplementInterface(): bool + public function isUsesDefaultClass(): bool { return false; } diff --git a/vendor/phpunit/phpunit/src/Metadata/MetadataCollection.php b/vendor/phpunit/phpunit/src/Metadata/MetadataCollection.php index 529cad4..44094b8 100644 --- a/vendor/phpunit/phpunit/src/Metadata/MetadataCollection.php +++ b/vendor/phpunit/phpunit/src/Metadata/MetadataCollection.php @@ -160,12 +160,12 @@ final readonly class MetadataCollection implements Countable, IteratorAggregate ); } - public function isCoversNamespace(): self + public function isCovers(): self { return new self( ...array_filter( $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isCoversNamespace(), + static fn (Metadata $metadata): bool => $metadata->isCovers(), ), ); } @@ -180,22 +180,12 @@ final readonly class MetadataCollection implements Countable, IteratorAggregate ); } - public function isCoversClassesThatExtendClass(): self + public function isCoversDefaultClass(): self { return new self( ...array_filter( $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isCoversClassesThatExtendClass(), - ), - ); - } - - public function isCoversClassesThatImplementInterface(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isCoversClassesThatImplementInterface(), + static fn (Metadata $metadata): bool => $metadata->isCoversDefaultClass(), ), ); } @@ -503,16 +493,6 @@ final readonly class MetadataCollection implements Countable, IteratorAggregate ); } - public function isRequiresEnvironmentVariable(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isRequiresEnvironmentVariable(), - ), - ); - } - public function isRequiresSetting(): self { return new self( @@ -543,12 +523,12 @@ final readonly class MetadataCollection implements Countable, IteratorAggregate ); } - public function isUsesNamespace(): self + public function isUses(): self { return new self( ...array_filter( $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isUsesNamespace(), + static fn (Metadata $metadata): bool => $metadata->isUses(), ), ); } @@ -563,22 +543,12 @@ final readonly class MetadataCollection implements Countable, IteratorAggregate ); } - public function isUsesClassesThatExtendClass(): self + public function isUsesDefaultClass(): self { return new self( ...array_filter( $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isUsesClassesThatExtendClass(), - ), - ); - } - - public function isUsesClassesThatImplementInterface(): self - { - return new self( - ...array_filter( - $this->metadata, - static fn (Metadata $metadata): bool => $metadata->isUsesClassesThatImplementInterface(), + static fn (Metadata $metadata): bool => $metadata->isUsesDefaultClass(), ), ); } diff --git a/vendor/phpunit/phpunit/src/Metadata/Parser/Annotation/DocBlock.php b/vendor/phpunit/phpunit/src/Metadata/Parser/Annotation/DocBlock.php new file mode 100644 index 0000000..c4421c9 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Metadata/Parser/Annotation/DocBlock.php @@ -0,0 +1,277 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Metadata\Annotation\Parser; + +use function array_filter; +use function array_map; +use function array_merge; +use function array_values; +use function count; +use function preg_match; +use function preg_match_all; +use function preg_replace; +use function preg_split; +use function realpath; +use function substr; +use function trim; +use PharIo\Version\Exception as PharIoVersionException; +use PharIo\Version\VersionConstraintParser; +use PHPUnit\Metadata\AnnotationsAreNotSupportedForInternalClassesException; +use PHPUnit\Metadata\InvalidVersionRequirementException; +use ReflectionClass; +use ReflectionFunctionAbstract; +use ReflectionMethod; + +/** + * This is an abstraction around a PHPUnit-specific docBlock, + * allowing us to ask meaningful questions about a specific + * reflection symbol. + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class DocBlock +{ + private const REGEX_REQUIRES_VERSION = '/@requires\s+(?PPHP(?:Unit)?)\s+(?P[<>=!]{0,2})\s*(?P[\d\.-]+(dev|(RC|alpha|beta)[\d\.])?)[ \t]*\r?$/m'; + private const REGEX_REQUIRES_VERSION_CONSTRAINT = '/@requires\s+(?PPHP(?:Unit)?)\s+(?P[\d\t \-.|~^]+)[ \t]*\r?$/m'; + private const REGEX_REQUIRES_OS = '/@requires\s+(?POS(?:FAMILY)?)\s+(?P.+?)[ \t]*\r?$/m'; + private const REGEX_REQUIRES_SETTING = '/@requires\s+(?Psetting)\s+(?P([^ ]+?))\s*(?P[\w\.-]+[\w\.]?)?[ \t]*\r?$/m'; + private const REGEX_REQUIRES = '/@requires\s+(?Pfunction|extension)\s+(?P([^\s<>=!]+))\s*(?P[<>=!]{0,2})\s*(?P[\d\.-]+[\d\.]?)?[ \t]*\r?$/m'; + private readonly string $docComment; + + /** + * @var array> pre-parsed annotations indexed by name and occurrence index + */ + private readonly array $symbolAnnotations; + + /** + * @psalm-var null|(array{ + * __OFFSET: array&array{__FILE: string}, + * setting?: array, + * extension_versions?: array + * }&array< + * string, + * string|array{version: string, operator: string}|array{constraint: string}|array + * >) + * + * @phpstan-ignore missingType.iterableValue + */ + private ?array $parsedRequirements = null; + private readonly int $startLine; + private readonly string $fileName; + + /** + * @throws AnnotationsAreNotSupportedForInternalClassesException + * + * @phpstan-ignore missingType.generics + */ + public static function ofClass(ReflectionClass $class): self + { + if ($class->isInternal()) { + throw new AnnotationsAreNotSupportedForInternalClassesException($class->getName()); + } + + return new self( + (string) $class->getDocComment(), + self::extractAnnotationsFromReflector($class), + $class->getStartLine(), + $class->getFileName(), + ); + } + + /** + * @throws AnnotationsAreNotSupportedForInternalClassesException + */ + public static function ofMethod(ReflectionMethod $method): self + { + if ($method->getDeclaringClass()->isInternal()) { + throw new AnnotationsAreNotSupportedForInternalClassesException($method->getDeclaringClass()->getName()); + } + + return new self( + (string) $method->getDocComment(), + self::extractAnnotationsFromReflector($method), + $method->getStartLine(), + $method->getFileName(), + ); + } + + /** + * Note: we do not preserve an instance of the reflection object, since it cannot be safely (de-)serialized. + * + * @param array> $symbolAnnotations + */ + private function __construct(string $docComment, array $symbolAnnotations, int $startLine, string $fileName) + { + $this->docComment = $docComment; + $this->symbolAnnotations = $symbolAnnotations; + $this->startLine = $startLine; + $this->fileName = $fileName; + } + + /** + * @psalm-return array{ + * __OFFSET: array&array{__FILE: string}, + * setting?: array, + * extension_versions?: array + * }&array< + * string, + * string|array{version: string, operator: string}|array{constraint: string}|array + * > + * + * @phpstan-ignore missingType.iterableValue + */ + public function requirements(): array + { + if ($this->parsedRequirements !== null) { + return $this->parsedRequirements; + } + + $offset = $this->startLine; + $requires = []; + $recordedSettings = []; + $extensionVersions = []; + $recordedOffsets = [ + '__FILE' => realpath($this->fileName), + ]; + + // Trim docblock markers, split it into lines and rewind offset to start of docblock + $lines = preg_replace(['#^/\*{2}#', '#\*/$#'], '', preg_split('/\r\n|\r|\n/', $this->docComment)); + $offset -= count($lines); + + foreach ($lines as $line) { + if (preg_match(self::REGEX_REQUIRES_OS, $line, $matches)) { + $requires[$matches['name']] = $matches['value']; + $recordedOffsets[$matches['name']] = $offset; + } + + if (preg_match(self::REGEX_REQUIRES_VERSION, $line, $matches)) { + $requires[$matches['name']] = [ + 'version' => $matches['version'], + 'operator' => $matches['operator'], + ]; + + $recordedOffsets[$matches['name']] = $offset; + } + + if (preg_match(self::REGEX_REQUIRES_VERSION_CONSTRAINT, $line, $matches)) { + if (!empty($requires[$matches['name']])) { + $offset++; + + continue; + } + + try { + $versionConstraintParser = new VersionConstraintParser; + + $requires[$matches['name'] . '_constraint'] = [ + 'constraint' => $versionConstraintParser->parse(trim($matches['constraint'])), + ]; + + $recordedOffsets[$matches['name'] . '_constraint'] = $offset; + } catch (PharIoVersionException $e) { + throw new InvalidVersionRequirementException( + $e->getMessage(), + $e->getCode(), + $e, + ); + } + } + + if (preg_match(self::REGEX_REQUIRES_SETTING, $line, $matches)) { + $recordedSettings[$matches['setting']] = $matches['value']; + $recordedOffsets['__SETTING_' . $matches['setting']] = $offset; + } + + if (preg_match(self::REGEX_REQUIRES, $line, $matches)) { + $name = $matches['name'] . 's'; + + if (!isset($requires[$name])) { + $requires[$name] = []; + } + + $requires[$name][] = $matches['value']; + $recordedOffsets[$matches['name'] . '_' . $matches['value']] = $offset; + + if ($name === 'extensions' && !empty($matches['version'])) { + $extensionVersions[$matches['value']] = [ + 'version' => $matches['version'], + 'operator' => $matches['operator'], + ]; + } + } + + $offset++; + } + + return $this->parsedRequirements = array_merge( + $requires, + ['__OFFSET' => $recordedOffsets], + array_filter( + [ + 'setting' => $recordedSettings, + 'extension_versions' => $extensionVersions, + ], + ), + ); + } + + /** + * @return array> + */ + public function symbolAnnotations(): array + { + return $this->symbolAnnotations; + } + + /** + * @return array> + */ + private static function parseDocBlock(string $docBlock): array + { + // Strip away the docblock header and footer to ease parsing of one line annotations + $docBlock = substr($docBlock, 3, -2); + $annotations = []; + + if (preg_match_all('/@(?P[A-Za-z_-]+)(?:[ \t]+(?P.*?))?[ \t]*\r?$/m', $docBlock, $matches)) { + $numMatches = count($matches[0]); + + for ($i = 0; $i < $numMatches; $i++) { + $annotations[$matches['name'][$i]][] = $matches['value'][$i]; + } + } + + return $annotations; + } + + /** + * @phpstan-ignore missingType.iterableValue, missingType.generics + */ + private static function extractAnnotationsFromReflector(ReflectionClass|ReflectionFunctionAbstract $reflector): array + { + $annotations = []; + + if ($reflector instanceof ReflectionClass) { + $annotations = array_merge( + $annotations, + ...array_map( + static fn (ReflectionClass $trait): array => self::parseDocBlock((string) $trait->getDocComment()), + array_values($reflector->getTraits()), + ), + ); + } + + return array_merge( + $annotations, + self::parseDocBlock((string) $reflector->getDocComment()), + ); + } +} diff --git a/vendor/phpunit/phpunit/src/Metadata/Parser/Annotation/Registry.php b/vendor/phpunit/phpunit/src/Metadata/Parser/Annotation/Registry.php new file mode 100644 index 0000000..eb8a1b5 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Metadata/Parser/Annotation/Registry.php @@ -0,0 +1,100 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Metadata\Annotation\Parser; + +use function array_key_exists; +use PHPUnit\Metadata\AnnotationsAreNotSupportedForInternalClassesException; +use PHPUnit\Metadata\ReflectionException; +use ReflectionClass; +use ReflectionMethod; + +/** + * Reflection information, and therefore DocBlock information, is static within + * a single PHP process. It is therefore okay to use a Singleton registry here. + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class Registry +{ + private static ?Registry $instance = null; + + /** + * @var array indexed by class name + */ + private array $classDocBlocks = []; + + /** + * @var array> indexed by class name and method name + */ + private array $methodDocBlocks = []; + + public static function getInstance(): self + { + return self::$instance ?? self::$instance = new self; + } + + /** + * @param class-string $class + * + * @throws AnnotationsAreNotSupportedForInternalClassesException + * @throws ReflectionException + */ + public function forClassName(string $class): DocBlock + { + if (array_key_exists($class, $this->classDocBlocks)) { + return $this->classDocBlocks[$class]; + } + + try { + $reflection = new ReflectionClass($class); + + // @codeCoverageIgnoreStart + /** @phpstan-ignore catch.neverThrown */ + } catch (\ReflectionException $e) { + throw new ReflectionException( + $e->getMessage(), + $e->getCode(), + $e, + ); + } + // @codeCoverageIgnoreEnd + + return $this->classDocBlocks[$class] = DocBlock::ofClass($reflection); + } + + /** + * @param class-string $classInHierarchy + * + * @throws AnnotationsAreNotSupportedForInternalClassesException + * @throws ReflectionException + */ + public function forMethod(string $classInHierarchy, string $method): DocBlock + { + if (isset($this->methodDocBlocks[$classInHierarchy][$method])) { + return $this->methodDocBlocks[$classInHierarchy][$method]; + } + + try { + $reflection = new ReflectionMethod($classInHierarchy, $method); + // @codeCoverageIgnoreStart + } catch (\ReflectionException $e) { + throw new ReflectionException( + $e->getMessage(), + $e->getCode(), + $e, + ); + } + // @codeCoverageIgnoreEnd + + return $this->methodDocBlocks[$classInHierarchy][$method] = DocBlock::ofMethod($reflection); + } +} diff --git a/vendor/phpunit/phpunit/src/Metadata/Parser/AnnotationParser.php b/vendor/phpunit/phpunit/src/Metadata/Parser/AnnotationParser.php new file mode 100644 index 0000000..0623f8a --- /dev/null +++ b/vendor/phpunit/phpunit/src/Metadata/Parser/AnnotationParser.php @@ -0,0 +1,607 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Metadata\Parser; + +use function array_merge; +use function assert; +use function class_exists; +use function count; +use function explode; +use function method_exists; +use function preg_replace; +use function rtrim; +use function sprintf; +use function str_contains; +use function str_starts_with; +use function strlen; +use function substr; +use function trim; +use PHPUnit\Event\Facade as EventFacade; +use PHPUnit\Metadata\Annotation\Parser\Registry as AnnotationRegistry; +use PHPUnit\Metadata\AnnotationsAreNotSupportedForInternalClassesException; +use PHPUnit\Metadata\InvalidVersionRequirementException; +use PHPUnit\Metadata\Metadata; +use PHPUnit\Metadata\MetadataCollection; +use PHPUnit\Metadata\ReflectionException; +use PHPUnit\Metadata\Version\ComparisonRequirement; +use PHPUnit\Metadata\Version\ConstraintRequirement; +use PHPUnit\Util\InvalidVersionOperatorException; +use PHPUnit\Util\VersionComparisonOperator; + +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class AnnotationParser implements Parser +{ + /** + * @var array + */ + private static array $deprecationEmittedForClass = []; + + /** + * @var array + */ + private static array $deprecationEmittedForMethod = []; + + /** + * @param class-string $className + * + * @throws AnnotationsAreNotSupportedForInternalClassesException + * @throws InvalidVersionOperatorException + * @throws ReflectionException + */ + public function forClass(string $className): MetadataCollection + { + assert(class_exists($className)); + + $result = []; + + foreach (AnnotationRegistry::getInstance()->forClassName($className)->symbolAnnotations() as $annotation => $values) { + switch ($annotation) { + case 'backupGlobals': + $result[] = Metadata::backupGlobalsOnClass($this->stringToBool($values[0])); + + break; + + case 'backupStaticAttributes': + case 'backupStaticProperties': + $result[] = Metadata::backupStaticPropertiesOnClass($this->stringToBool($values[0])); + + break; + + case 'covers': + foreach ($values as $value) { + $value = $this->cleanUpCoversOrUsesTarget($value); + + $result[] = Metadata::coversOnClass($value); + } + + break; + + case 'coversDefaultClass': + foreach ($values as $value) { + $result[] = Metadata::coversDefaultClass($value); + } + + break; + + case 'coversNothing': + $result[] = Metadata::coversNothingOnClass(); + + break; + + case 'doesNotPerformAssertions': + $result[] = Metadata::doesNotPerformAssertionsOnClass(); + + break; + + case 'group': + case 'ticket': + foreach ($values as $value) { + $result[] = Metadata::groupOnClass($value); + } + + break; + + case 'large': + $result[] = Metadata::groupOnClass('large'); + + break; + + case 'medium': + $result[] = Metadata::groupOnClass('medium'); + + break; + + case 'preserveGlobalState': + $result[] = Metadata::preserveGlobalStateOnClass($this->stringToBool($values[0])); + + break; + + case 'runClassInSeparateProcess': + $result[] = Metadata::runClassInSeparateProcess(); + + break; + + case 'runTestsInSeparateProcesses': + $result[] = Metadata::runTestsInSeparateProcesses(); + + break; + + case 'small': + $result[] = Metadata::groupOnClass('small'); + + break; + + case 'testdox': + $result[] = Metadata::testDoxOnClass($values[0]); + + break; + + case 'uses': + foreach ($values as $value) { + $value = $this->cleanUpCoversOrUsesTarget($value); + + $result[] = Metadata::usesOnClass($value); + } + + break; + + case 'usesDefaultClass': + foreach ($values as $value) { + $result[] = Metadata::usesDefaultClass($value); + } + + break; + } + } + + try { + $result = array_merge( + $result, + $this->parseRequirements( + AnnotationRegistry::getInstance()->forClassName($className)->requirements(), + 'class', + ), + ); + } catch (InvalidVersionRequirementException $e) { + EventFacade::emitter()->testRunnerTriggeredWarning( + sprintf( + 'Class %s is annotated using an invalid version requirement: %s', + $className, + $e->getMessage(), + ), + ); + } + + if (!empty($result) && + !isset(self::$deprecationEmittedForClass[$className]) && + !str_starts_with($className, 'PHPUnit\TestFixture')) { + EventFacade::emitter()->testRunnerTriggeredDeprecation( + sprintf( + 'Metadata found in doc-comment for class %s. Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.', + $className, + ), + ); + + self::$deprecationEmittedForClass[$className] = true; + } + + return MetadataCollection::fromArray($result); + } + + /** + * @param class-string $className + * @param non-empty-string $methodName + * + * @throws AnnotationsAreNotSupportedForInternalClassesException + * @throws InvalidVersionOperatorException + * @throws ReflectionException + */ + public function forMethod(string $className, string $methodName): MetadataCollection + { + assert(class_exists($className)); + assert(method_exists($className, $methodName)); + + $result = []; + + foreach (AnnotationRegistry::getInstance()->forMethod($className, $methodName)->symbolAnnotations() as $annotation => $values) { + switch ($annotation) { + case 'after': + $result[] = Metadata::after(0); + + break; + + case 'afterClass': + $result[] = Metadata::afterClass(0); + + break; + + case 'backupGlobals': + $result[] = Metadata::backupGlobalsOnMethod($this->stringToBool($values[0])); + + break; + + case 'backupStaticAttributes': + case 'backupStaticProperties': + $result[] = Metadata::backupStaticPropertiesOnMethod($this->stringToBool($values[0])); + + break; + + case 'before': + $result[] = Metadata::before(0); + + break; + + case 'beforeClass': + $result[] = Metadata::beforeClass(0); + + break; + + case 'covers': + foreach ($values as $value) { + $value = $this->cleanUpCoversOrUsesTarget($value); + + $result[] = Metadata::coversOnMethod($value); + } + + break; + + case 'coversNothing': + $result[] = Metadata::coversNothingOnMethod(); + + break; + + case 'dataProvider': + foreach ($values as $value) { + $value = rtrim($value, " ()\n\r\t\v\x00"); + + if (str_contains($value, '::')) { + $result[] = Metadata::dataProvider(...explode('::', $value)); + + continue; + } + + $result[] = Metadata::dataProvider($className, $value); + } + + break; + + case 'depends': + foreach ($values as $value) { + $deepClone = false; + $shallowClone = false; + + if (str_starts_with($value, 'clone ')) { + $deepClone = true; + $value = substr($value, strlen('clone ')); + } elseif (str_starts_with($value, '!clone ')) { + $value = substr($value, strlen('!clone ')); + } elseif (str_starts_with($value, 'shallowClone ')) { + $shallowClone = true; + $value = substr($value, strlen('shallowClone ')); + } elseif (str_starts_with($value, '!shallowClone ')) { + $value = substr($value, strlen('!shallowClone ')); + } + + if (str_contains($value, '::')) { + [$_className, $_methodName] = explode('::', $value); + + assert($_className !== ''); + assert($_methodName !== ''); + + if ($_methodName === 'class') { + $result[] = Metadata::dependsOnClass($_className, $deepClone, $shallowClone); + + continue; + } + + $result[] = Metadata::dependsOnMethod($_className, $_methodName, $deepClone, $shallowClone); + + continue; + } + + $result[] = Metadata::dependsOnMethod($className, $value, $deepClone, $shallowClone); + } + + break; + + case 'doesNotPerformAssertions': + $result[] = Metadata::doesNotPerformAssertionsOnMethod(); + + break; + + case 'excludeGlobalVariableFromBackup': + foreach ($values as $value) { + $result[] = Metadata::excludeGlobalVariableFromBackupOnMethod($value); + } + + break; + + case 'excludeStaticPropertyFromBackup': + foreach ($values as $value) { + $tmp = explode(' ', $value); + + if (count($tmp) !== 2) { + continue; + } + + $result[] = Metadata::excludeStaticPropertyFromBackupOnMethod( + trim($tmp[0]), + trim($tmp[1]), + ); + } + + break; + + case 'group': + case 'ticket': + foreach ($values as $value) { + $result[] = Metadata::groupOnMethod($value); + } + + break; + + case 'large': + $result[] = Metadata::groupOnMethod('large'); + + break; + + case 'medium': + $result[] = Metadata::groupOnMethod('medium'); + + break; + + case 'postCondition': + $result[] = Metadata::postCondition(0); + + break; + + case 'preCondition': + $result[] = Metadata::preCondition(0); + + break; + + case 'preserveGlobalState': + $result[] = Metadata::preserveGlobalStateOnMethod($this->stringToBool($values[0])); + + break; + + case 'runInSeparateProcess': + $result[] = Metadata::runInSeparateProcess(); + + break; + + case 'small': + $result[] = Metadata::groupOnMethod('small'); + + break; + + case 'test': + $result[] = Metadata::test(); + + break; + + case 'testdox': + $result[] = Metadata::testDoxOnMethod($values[0]); + + break; + + case 'uses': + foreach ($values as $value) { + $value = $this->cleanUpCoversOrUsesTarget($value); + + $result[] = Metadata::usesOnMethod($value); + } + + break; + } + } + + if (method_exists($className, $methodName)) { + try { + $result = array_merge( + $result, + $this->parseRequirements( + AnnotationRegistry::getInstance()->forMethod($className, $methodName)->requirements(), + 'method', + ), + ); + } catch (InvalidVersionRequirementException $e) { + EventFacade::emitter()->testRunnerTriggeredWarning( + sprintf( + 'Method %s::%s is annotated using an invalid version requirement: %s', + $className, + $methodName, + $e->getMessage(), + ), + ); + } + } + + if (!empty($result) && + !isset(self::$deprecationEmittedForMethod[$className . '::' . $methodName]) && + !str_starts_with($className, 'PHPUnit\TestFixture')) { + EventFacade::emitter()->testRunnerTriggeredDeprecation( + sprintf( + 'Metadata found in doc-comment for method %s::%s(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.', + $className, + $methodName, + ), + ); + + self::$deprecationEmittedForMethod[$className . '::' . $methodName] = true; + } + + return MetadataCollection::fromArray($result); + } + + /** + * @param class-string $className + * @param non-empty-string $methodName + * + * @throws AnnotationsAreNotSupportedForInternalClassesException + * @throws InvalidVersionOperatorException + * @throws ReflectionException + */ + public function forClassAndMethod(string $className, string $methodName): MetadataCollection + { + return $this->forClass($className)->mergeWith( + $this->forMethod($className, $methodName), + ); + } + + private function stringToBool(string $value): bool + { + if ($value === 'enabled') { + return true; + } + + return false; + } + + private function cleanUpCoversOrUsesTarget(string $value): string + { + $value = preg_replace('/[\s()]+$/', '', $value); + + return explode(' ', $value, 2)[0]; + } + + /** + * @throws InvalidVersionOperatorException + * + * @return list + * + * @phpstan-ignore missingType.iterableValue + */ + private function parseRequirements(array $requirements, string $level): array + { + $result = []; + + if (!empty($requirements['PHP'])) { + $versionRequirement = new ComparisonRequirement( + $requirements['PHP']['version'], + new VersionComparisonOperator(empty($requirements['PHP']['operator']) ? '>=' : $requirements['PHP']['operator']), + ); + + if ($level === 'class') { + $result[] = Metadata::requiresPhpOnClass($versionRequirement); + } else { + $result[] = Metadata::requiresPhpOnMethod($versionRequirement); + } + } elseif (!empty($requirements['PHP_constraint'])) { + $versionRequirement = new ConstraintRequirement($requirements['PHP_constraint']['constraint']); + + if ($level === 'class') { + $result[] = Metadata::requiresPhpOnClass($versionRequirement); + } else { + $result[] = Metadata::requiresPhpOnMethod($versionRequirement); + } + } + + if (!empty($requirements['extensions'])) { + foreach ($requirements['extensions'] as $extension) { + if (isset($requirements['extension_versions'][$extension])) { + continue; + } + + if ($level === 'class') { + $result[] = Metadata::requiresPhpExtensionOnClass($extension, null); + } else { + $result[] = Metadata::requiresPhpExtensionOnMethod($extension, null); + } + } + } + + if (!empty($requirements['extension_versions'])) { + foreach ($requirements['extension_versions'] as $extension => $version) { + $versionRequirement = new ComparisonRequirement( + $version['version'], + new VersionComparisonOperator(empty($version['operator']) ? '>=' : $version['operator']), + ); + + if ($level === 'class') { + $result[] = Metadata::requiresPhpExtensionOnClass($extension, $versionRequirement); + } else { + $result[] = Metadata::requiresPhpExtensionOnMethod($extension, $versionRequirement); + } + } + } + + if (!empty($requirements['PHPUnit'])) { + $versionRequirement = new ComparisonRequirement( + $requirements['PHPUnit']['version'], + new VersionComparisonOperator(empty($requirements['PHPUnit']['operator']) ? '>=' : $requirements['PHPUnit']['operator']), + ); + + if ($level === 'class') { + $result[] = Metadata::requiresPhpunitOnClass($versionRequirement); + } else { + $result[] = Metadata::requiresPhpunitOnMethod($versionRequirement); + } + } elseif (!empty($requirements['PHPUnit_constraint'])) { + $versionRequirement = new ConstraintRequirement($requirements['PHPUnit_constraint']['constraint']); + + if ($level === 'class') { + $result[] = Metadata::requiresPhpunitOnClass($versionRequirement); + } else { + $result[] = Metadata::requiresPhpunitOnMethod($versionRequirement); + } + } + + if (!empty($requirements['OSFAMILY'])) { + if ($level === 'class') { + $result[] = Metadata::requiresOperatingSystemFamilyOnClass($requirements['OSFAMILY']); + } else { + $result[] = Metadata::requiresOperatingSystemFamilyOnMethod($requirements['OSFAMILY']); + } + } + + if (!empty($requirements['OS'])) { + if ($level === 'class') { + $result[] = Metadata::requiresOperatingSystemOnClass($requirements['OS']); + } else { + $result[] = Metadata::requiresOperatingSystemOnMethod($requirements['OS']); + } + } + + if (!empty($requirements['functions'])) { + foreach ($requirements['functions'] as $function) { + $pieces = explode('::', $function); + + if (count($pieces) === 2) { + if ($level === 'class') { + $result[] = Metadata::requiresMethodOnClass($pieces[0], $pieces[1]); + } else { + $result[] = Metadata::requiresMethodOnMethod($pieces[0], $pieces[1]); + } + } elseif ($level === 'class') { + $result[] = Metadata::requiresFunctionOnClass($function); + } else { + $result[] = Metadata::requiresFunctionOnMethod($function); + } + } + } + + if (!empty($requirements['setting'])) { + foreach ($requirements['setting'] as $setting => $value) { + if ($level === 'class') { + $result[] = Metadata::requiresSettingOnClass($setting, $value); + } else { + $result[] = Metadata::requiresSettingOnMethod($setting, $value); + } + } + } + + return $result; + } +} diff --git a/vendor/phpunit/phpunit/src/Metadata/Parser/AttributeParser.php b/vendor/phpunit/phpunit/src/Metadata/Parser/AttributeParser.php index 734f1c6..0afe260 100644 --- a/vendor/phpunit/phpunit/src/Metadata/Parser/AttributeParser.php +++ b/vendor/phpunit/phpunit/src/Metadata/Parser/AttributeParser.php @@ -26,11 +26,8 @@ use PHPUnit\Framework\Attributes\BackupStaticProperties; use PHPUnit\Framework\Attributes\Before; use PHPUnit\Framework\Attributes\BeforeClass; use PHPUnit\Framework\Attributes\CoversClass; -use PHPUnit\Framework\Attributes\CoversClassesThatExtendClass; -use PHPUnit\Framework\Attributes\CoversClassesThatImplementInterface; use PHPUnit\Framework\Attributes\CoversFunction; use PHPUnit\Framework\Attributes\CoversMethod; -use PHPUnit\Framework\Attributes\CoversNamespace; use PHPUnit\Framework\Attributes\CoversNothing; use PHPUnit\Framework\Attributes\CoversTrait; use PHPUnit\Framework\Attributes\DataProvider; @@ -56,7 +53,6 @@ use PHPUnit\Framework\Attributes\Medium; use PHPUnit\Framework\Attributes\PostCondition; use PHPUnit\Framework\Attributes\PreCondition; use PHPUnit\Framework\Attributes\PreserveGlobalState; -use PHPUnit\Framework\Attributes\RequiresEnvironmentVariable; use PHPUnit\Framework\Attributes\RequiresFunction; use PHPUnit\Framework\Attributes\RequiresMethod; use PHPUnit\Framework\Attributes\RequiresOperatingSystem; @@ -76,11 +72,8 @@ use PHPUnit\Framework\Attributes\TestWith; use PHPUnit\Framework\Attributes\TestWithJson; use PHPUnit\Framework\Attributes\Ticket; use PHPUnit\Framework\Attributes\UsesClass; -use PHPUnit\Framework\Attributes\UsesClassesThatExtendClass; -use PHPUnit\Framework\Attributes\UsesClassesThatImplementInterface; use PHPUnit\Framework\Attributes\UsesFunction; use PHPUnit\Framework\Attributes\UsesMethod; -use PHPUnit\Framework\Attributes\UsesNamespace; use PHPUnit\Framework\Attributes\UsesTrait; use PHPUnit\Framework\Attributes\WithoutErrorHandler; use PHPUnit\Metadata\Metadata; @@ -131,13 +124,6 @@ final readonly class AttributeParser implements Parser break; - case CoversNamespace::class: - assert($attributeInstance instanceof CoversNamespace); - - $result[] = Metadata::coversNamespace($attributeInstance->namespace()); - - break; - case CoversClass::class: assert($attributeInstance instanceof CoversClass); @@ -145,20 +131,6 @@ final readonly class AttributeParser implements Parser break; - case CoversClassesThatExtendClass::class: - assert($attributeInstance instanceof CoversClassesThatExtendClass); - - $result[] = Metadata::coversClassesThatExtendClass($attributeInstance->className()); - - break; - - case CoversClassesThatImplementInterface::class: - assert($attributeInstance instanceof CoversClassesThatImplementInterface); - - $result[] = Metadata::coversClassesThatImplementInterface($attributeInstance->interfaceName()); - - break; - case CoversTrait::class: assert($attributeInstance instanceof CoversTrait); @@ -334,16 +306,6 @@ final readonly class AttributeParser implements Parser break; - case RequiresEnvironmentVariable::class: - assert($attributeInstance instanceof RequiresEnvironmentVariable); - - $result[] = Metadata::requiresEnvironmentVariableOnClass( - $attributeInstance->environmentVariableName(), - $attributeInstance->value(), - ); - - break; - case RequiresSetting::class: assert($attributeInstance instanceof RequiresSetting); @@ -383,13 +345,6 @@ final readonly class AttributeParser implements Parser break; - case UsesNamespace::class: - assert($attributeInstance instanceof UsesNamespace); - - $result[] = Metadata::usesNamespace($attributeInstance->namespace()); - - break; - case UsesClass::class: assert($attributeInstance instanceof UsesClass); @@ -397,20 +352,6 @@ final readonly class AttributeParser implements Parser break; - case UsesClassesThatExtendClass::class: - assert($attributeInstance instanceof UsesClassesThatExtendClass); - - $result[] = Metadata::usesClassesThatExtendClass($attributeInstance->className()); - - break; - - case UsesClassesThatImplementInterface::class: - assert($attributeInstance instanceof UsesClassesThatImplementInterface); - - $result[] = Metadata::usesClassesThatImplementInterface($attributeInstance->interfaceName()); - - break; - case UsesTrait::class: assert($attributeInstance instanceof UsesTrait); @@ -734,16 +675,6 @@ final readonly class AttributeParser implements Parser break; - case RequiresEnvironmentVariable::class: - assert($attributeInstance instanceof RequiresEnvironmentVariable); - - $result[] = Metadata::requiresEnvironmentVariableOnMethod( - $attributeInstance->environmentVariableName(), - $attributeInstance->value(), - ); - - break; - case RequiresSetting::class: assert($attributeInstance instanceof RequiresSetting); diff --git a/vendor/phpunit/phpunit/src/Metadata/Parser/ParserChain.php b/vendor/phpunit/phpunit/src/Metadata/Parser/ParserChain.php new file mode 100644 index 0000000..e19e0b0 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Metadata/Parser/ParserChain.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Metadata\Parser; + +use function assert; +use function class_exists; +use function method_exists; +use PHPUnit\Metadata\MetadataCollection; + +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final readonly class ParserChain implements Parser +{ + private Parser $attributeReader; + private Parser $annotationReader; + + public function __construct(Parser $attributeReader, Parser $annotationReader) + { + $this->attributeReader = $attributeReader; + $this->annotationReader = $annotationReader; + } + + /** + * @param class-string $className + */ + public function forClass(string $className): MetadataCollection + { + assert(class_exists($className)); + + $metadata = $this->attributeReader->forClass($className); + + if (!$metadata->isEmpty()) { + return $metadata; + } + + return $this->annotationReader->forClass($className); + } + + /** + * @param class-string $className + * @param non-empty-string $methodName + */ + public function forMethod(string $className, string $methodName): MetadataCollection + { + assert(class_exists($className)); + assert(method_exists($className, $methodName)); + + $metadata = $this->attributeReader->forMethod($className, $methodName); + + if (!$metadata->isEmpty()) { + return $metadata; + } + + return $this->annotationReader->forMethod($className, $methodName); + } + + /** + * @param class-string $className + * @param non-empty-string $methodName + */ + public function forClassAndMethod(string $className, string $methodName): MetadataCollection + { + return $this->forClass($className)->mergeWith( + $this->forMethod($className, $methodName), + ); + } +} diff --git a/vendor/phpunit/phpunit/src/Metadata/Parser/Registry.php b/vendor/phpunit/phpunit/src/Metadata/Parser/Registry.php index 0b30782..a68ab01 100644 --- a/vendor/phpunit/phpunit/src/Metadata/Parser/Registry.php +++ b/vendor/phpunit/phpunit/src/Metadata/Parser/Registry.php @@ -10,7 +10,7 @@ namespace PHPUnit\Metadata\Parser; /** - * Attribute information is static within a single PHP process. + * Attribute and annotation information is static within a single PHP process. * It is therefore okay to use a Singleton registry here. * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -28,6 +28,11 @@ final class Registry private static function build(): Parser { - return new CachingParser(new AttributeParser); + return new CachingParser( + new ParserChain( + new AttributeParser, + new AnnotationParser, + ), + ); } } diff --git a/vendor/phpunit/phpunit/src/Metadata/PostCondition.php b/vendor/phpunit/phpunit/src/Metadata/PostCondition.php index d6b6ece..ff87eca 100644 --- a/vendor/phpunit/phpunit/src/Metadata/PostCondition.php +++ b/vendor/phpunit/phpunit/src/Metadata/PostCondition.php @@ -22,7 +22,7 @@ final readonly class PostCondition extends Metadata private int $priority; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param non-negative-int $priority */ protected function __construct(int $level, int $priority) diff --git a/vendor/phpunit/phpunit/src/Metadata/PreCondition.php b/vendor/phpunit/phpunit/src/Metadata/PreCondition.php index 3a568c1..3a4af8e 100644 --- a/vendor/phpunit/phpunit/src/Metadata/PreCondition.php +++ b/vendor/phpunit/phpunit/src/Metadata/PreCondition.php @@ -22,7 +22,7 @@ final readonly class PreCondition extends Metadata private int $priority; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param non-negative-int $priority */ protected function __construct(int $level, int $priority) diff --git a/vendor/phpunit/phpunit/src/Metadata/PreserveGlobalState.php b/vendor/phpunit/phpunit/src/Metadata/PreserveGlobalState.php index f888119..2d23410 100644 --- a/vendor/phpunit/phpunit/src/Metadata/PreserveGlobalState.php +++ b/vendor/phpunit/phpunit/src/Metadata/PreserveGlobalState.php @@ -19,7 +19,7 @@ final readonly class PreserveGlobalState extends Metadata private bool $enabled; /** - * @param int<0, 1> $level + * @param 0|1 $level */ protected function __construct(int $level, bool $enabled) { diff --git a/vendor/phpunit/phpunit/src/Metadata/RequiresEnvironmentVariable.php b/vendor/phpunit/phpunit/src/Metadata/RequiresEnvironmentVariable.php deleted file mode 100644 index 0888c29..0000000 --- a/vendor/phpunit/phpunit/src/Metadata/RequiresEnvironmentVariable.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class RequiresEnvironmentVariable extends Metadata -{ - private string $environmentVariableName; - private null|string $value; - - public function __construct(int $level, string $environmentVariableName, null|string $value) - { - parent::__construct($level); - - $this->environmentVariableName = $environmentVariableName; - $this->value = $value; - } - - public function isRequiresEnvironmentVariable(): true - { - return true; - } - - public function environmentVariableName(): string - { - return $this->environmentVariableName; - } - - public function value(): null|string - { - return $this->value; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/RequiresFunction.php b/vendor/phpunit/phpunit/src/Metadata/RequiresFunction.php index f66c518..55fa4a9 100644 --- a/vendor/phpunit/phpunit/src/Metadata/RequiresFunction.php +++ b/vendor/phpunit/phpunit/src/Metadata/RequiresFunction.php @@ -22,7 +22,7 @@ final readonly class RequiresFunction extends Metadata private string $functionName; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param non-empty-string $functionName */ protected function __construct(int $level, string $functionName) diff --git a/vendor/phpunit/phpunit/src/Metadata/RequiresMethod.php b/vendor/phpunit/phpunit/src/Metadata/RequiresMethod.php index 2ad7fbb..5ed7a0a 100644 --- a/vendor/phpunit/phpunit/src/Metadata/RequiresMethod.php +++ b/vendor/phpunit/phpunit/src/Metadata/RequiresMethod.php @@ -27,7 +27,7 @@ final readonly class RequiresMethod extends Metadata private string $methodName; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param class-string $className * @param non-empty-string $methodName */ diff --git a/vendor/phpunit/phpunit/src/Metadata/RequiresOperatingSystem.php b/vendor/phpunit/phpunit/src/Metadata/RequiresOperatingSystem.php index 8719d29..c1e692f 100644 --- a/vendor/phpunit/phpunit/src/Metadata/RequiresOperatingSystem.php +++ b/vendor/phpunit/phpunit/src/Metadata/RequiresOperatingSystem.php @@ -22,7 +22,7 @@ final readonly class RequiresOperatingSystem extends Metadata private string $operatingSystem; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param non-empty-string $operatingSystem */ public function __construct(int $level, string $operatingSystem) diff --git a/vendor/phpunit/phpunit/src/Metadata/RequiresOperatingSystemFamily.php b/vendor/phpunit/phpunit/src/Metadata/RequiresOperatingSystemFamily.php index 4481dcf..ca57905 100644 --- a/vendor/phpunit/phpunit/src/Metadata/RequiresOperatingSystemFamily.php +++ b/vendor/phpunit/phpunit/src/Metadata/RequiresOperatingSystemFamily.php @@ -22,7 +22,7 @@ final readonly class RequiresOperatingSystemFamily extends Metadata private string $operatingSystemFamily; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param non-empty-string $operatingSystemFamily */ protected function __construct(int $level, string $operatingSystemFamily) diff --git a/vendor/phpunit/phpunit/src/Metadata/RequiresPhp.php b/vendor/phpunit/phpunit/src/Metadata/RequiresPhp.php index c64a396..792ca7d 100644 --- a/vendor/phpunit/phpunit/src/Metadata/RequiresPhp.php +++ b/vendor/phpunit/phpunit/src/Metadata/RequiresPhp.php @@ -21,7 +21,7 @@ final readonly class RequiresPhp extends Metadata private Requirement $versionRequirement; /** - * @param int<0, 1> $level + * @param 0|1 $level */ protected function __construct(int $level, Requirement $versionRequirement) { diff --git a/vendor/phpunit/phpunit/src/Metadata/RequiresPhpExtension.php b/vendor/phpunit/phpunit/src/Metadata/RequiresPhpExtension.php index 5c547ea..fe021c1 100644 --- a/vendor/phpunit/phpunit/src/Metadata/RequiresPhpExtension.php +++ b/vendor/phpunit/phpunit/src/Metadata/RequiresPhpExtension.php @@ -25,7 +25,7 @@ final readonly class RequiresPhpExtension extends Metadata private ?Requirement $versionRequirement; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param non-empty-string $extension */ protected function __construct(int $level, string $extension, ?Requirement $versionRequirement) diff --git a/vendor/phpunit/phpunit/src/Metadata/RequiresPhpunit.php b/vendor/phpunit/phpunit/src/Metadata/RequiresPhpunit.php index dc8ae80..1fd9646 100644 --- a/vendor/phpunit/phpunit/src/Metadata/RequiresPhpunit.php +++ b/vendor/phpunit/phpunit/src/Metadata/RequiresPhpunit.php @@ -21,7 +21,7 @@ final readonly class RequiresPhpunit extends Metadata private Requirement $versionRequirement; /** - * @param int<0, 1> $level + * @param 0|1 $level */ protected function __construct(int $level, Requirement $versionRequirement) { diff --git a/vendor/phpunit/phpunit/src/Metadata/RequiresSetting.php b/vendor/phpunit/phpunit/src/Metadata/RequiresSetting.php index 0d0b023..2ba9444 100644 --- a/vendor/phpunit/phpunit/src/Metadata/RequiresSetting.php +++ b/vendor/phpunit/phpunit/src/Metadata/RequiresSetting.php @@ -27,7 +27,7 @@ final readonly class RequiresSetting extends Metadata private string $value; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param non-empty-string $setting * @param non-empty-string $value */ diff --git a/vendor/phpunit/phpunit/src/Metadata/TestDox.php b/vendor/phpunit/phpunit/src/Metadata/TestDox.php index 6e2944e..8b6a6db 100644 --- a/vendor/phpunit/phpunit/src/Metadata/TestDox.php +++ b/vendor/phpunit/phpunit/src/Metadata/TestDox.php @@ -22,7 +22,7 @@ final readonly class TestDox extends Metadata private string $text; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param non-empty-string $text */ protected function __construct(int $level, string $text) diff --git a/vendor/phpunit/phpunit/src/Metadata/TestWith.php b/vendor/phpunit/phpunit/src/Metadata/TestWith.php index d7cd190..b309cfa 100644 --- a/vendor/phpunit/phpunit/src/Metadata/TestWith.php +++ b/vendor/phpunit/phpunit/src/Metadata/TestWith.php @@ -27,7 +27,7 @@ final readonly class TestWith extends Metadata private ?string $name; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param array> $data * @param ?non-empty-string $name */ diff --git a/vendor/phpunit/phpunit/src/Metadata/CoversNamespace.php b/vendor/phpunit/phpunit/src/Metadata/Uses.php similarity index 58% rename from vendor/phpunit/phpunit/src/Metadata/CoversNamespace.php rename to vendor/phpunit/phpunit/src/Metadata/Uses.php index ef7452a..af68897 100644 --- a/vendor/phpunit/phpunit/src/Metadata/CoversNamespace.php +++ b/vendor/phpunit/phpunit/src/Metadata/Uses.php @@ -14,34 +14,34 @@ namespace PHPUnit\Metadata; * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final readonly class CoversNamespace extends Metadata +final readonly class Uses extends Metadata { /** * @var non-empty-string */ - private string $namespace; + private string $target; /** - * @param int<0, 1> $level - * @param non-empty-string $namespace + * @param 0|1 $level + * @param non-empty-string $target */ - protected function __construct(int $level, string $namespace) + protected function __construct(int $level, string $target) { parent::__construct($level); - $this->namespace = $namespace; + $this->target = $target; } - public function isCoversNamespace(): true + public function isUses(): true { return true; } /** - * @return class-string + * @return non-empty-string */ - public function namespace(): string + public function target(): string { - return $this->namespace; + return $this->target; } } diff --git a/vendor/phpunit/phpunit/src/Metadata/UsesClass.php b/vendor/phpunit/phpunit/src/Metadata/UsesClass.php index edbd03a..592999b 100644 --- a/vendor/phpunit/phpunit/src/Metadata/UsesClass.php +++ b/vendor/phpunit/phpunit/src/Metadata/UsesClass.php @@ -22,7 +22,7 @@ final readonly class UsesClass extends Metadata private string $className; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param class-string $className */ protected function __construct(int $level, string $className) @@ -44,4 +44,14 @@ final readonly class UsesClass extends Metadata { return $this->className; } + + /** + * @return class-string + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function asStringForCodeUnitMapper(): string + { + return $this->className; + } } diff --git a/vendor/phpunit/phpunit/src/Metadata/UsesClassesThatImplementInterface.php b/vendor/phpunit/phpunit/src/Metadata/UsesClassesThatImplementInterface.php deleted file mode 100644 index 5cdc6f6..0000000 --- a/vendor/phpunit/phpunit/src/Metadata/UsesClassesThatImplementInterface.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Metadata; - -/** - * @immutable - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - */ -final readonly class UsesClassesThatImplementInterface extends Metadata -{ - /** - * @var class-string - */ - private string $interfaceName; - - /** - * @param int<0, 1> $level - * @param class-string $interfaceName - */ - protected function __construct(int $level, string $interfaceName) - { - parent::__construct($level); - - $this->interfaceName = $interfaceName; - } - - public function isUsesClassesThatImplementInterface(): true - { - return true; - } - - /** - * @return class-string - */ - public function interfaceName(): string - { - return $this->interfaceName; - } -} diff --git a/vendor/phpunit/phpunit/src/Metadata/CoversClassesThatExtendClass.php b/vendor/phpunit/phpunit/src/Metadata/UsesDefaultClass.php similarity index 84% rename from vendor/phpunit/phpunit/src/Metadata/CoversClassesThatExtendClass.php rename to vendor/phpunit/phpunit/src/Metadata/UsesDefaultClass.php index 7feb40d..9a58d4c 100644 --- a/vendor/phpunit/phpunit/src/Metadata/CoversClassesThatExtendClass.php +++ b/vendor/phpunit/phpunit/src/Metadata/UsesDefaultClass.php @@ -14,7 +14,7 @@ namespace PHPUnit\Metadata; * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ -final readonly class CoversClassesThatExtendClass extends Metadata +final readonly class UsesDefaultClass extends Metadata { /** * @var class-string @@ -22,7 +22,7 @@ final readonly class CoversClassesThatExtendClass extends Metadata private string $className; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param class-string $className */ protected function __construct(int $level, string $className) @@ -32,7 +32,7 @@ final readonly class CoversClassesThatExtendClass extends Metadata $this->className = $className; } - public function isCoversClassesThatExtendClass(): true + public function isUsesDefaultClass(): true { return true; } diff --git a/vendor/phpunit/phpunit/src/Metadata/UsesFunction.php b/vendor/phpunit/phpunit/src/Metadata/UsesFunction.php index ec6cafe..f09d364 100644 --- a/vendor/phpunit/phpunit/src/Metadata/UsesFunction.php +++ b/vendor/phpunit/phpunit/src/Metadata/UsesFunction.php @@ -22,7 +22,7 @@ final readonly class UsesFunction extends Metadata private string $functionName; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param non-empty-string $functionName */ public function __construct(int $level, string $functionName) @@ -44,4 +44,12 @@ final readonly class UsesFunction extends Metadata { return $this->functionName; } + + /** + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function asStringForCodeUnitMapper(): string + { + return '::' . $this->functionName; + } } diff --git a/vendor/phpunit/phpunit/src/Metadata/UsesMethod.php b/vendor/phpunit/phpunit/src/Metadata/UsesMethod.php index 6fc78f8..382b4e2 100644 --- a/vendor/phpunit/phpunit/src/Metadata/UsesMethod.php +++ b/vendor/phpunit/phpunit/src/Metadata/UsesMethod.php @@ -27,7 +27,7 @@ final readonly class UsesMethod extends Metadata private string $methodName; /** - * @param int<0, 1> $level + * @param 0|1 $level * @param class-string $className * @param non-empty-string $methodName */ @@ -59,4 +59,14 @@ final readonly class UsesMethod extends Metadata { return $this->methodName; } + + /** + * @return non-empty-string + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function asStringForCodeUnitMapper(): string + { + return $this->className . '::' . $this->methodName; + } } diff --git a/vendor/phpunit/phpunit/src/Metadata/UsesTrait.php b/vendor/phpunit/phpunit/src/Metadata/UsesTrait.php index 19490f2..47f45cd 100644 --- a/vendor/phpunit/phpunit/src/Metadata/UsesTrait.php +++ b/vendor/phpunit/phpunit/src/Metadata/UsesTrait.php @@ -44,4 +44,14 @@ final readonly class UsesTrait extends Metadata { return $this->traitName; } + + /** + * @return trait-string + * + * @internal This method is not covered by the backward compatibility promise for PHPUnit + */ + public function asStringForCodeUnitMapper(): string + { + return $this->traitName; + } } diff --git a/vendor/phpunit/phpunit/src/Metadata/Version/Requirement.php b/vendor/phpunit/phpunit/src/Metadata/Version/Requirement.php index 6a18beb..391ccde 100644 --- a/vendor/phpunit/phpunit/src/Metadata/Version/Requirement.php +++ b/vendor/phpunit/phpunit/src/Metadata/Version/Requirement.php @@ -23,7 +23,7 @@ use PHPUnit\Util\VersionComparisonOperator; */ abstract readonly class Requirement { - private const string VERSION_COMPARISON = "/(?P!=|<|<=|<>|=|==|>|>=)?\s*(?P[\d\.-]+(dev|(RC|alpha|beta)[\d\.])?)[ \t]*\r?$/m"; + private const VERSION_COMPARISON = '/(?P[<>=!]{0,2})\s*(?P[\d\.-]+(dev|(RC|alpha|beta)[\d\.])?)[ \t]*\r?$/m'; /** * @throws InvalidVersionOperatorException diff --git a/vendor/phpunit/phpunit/src/Runner/Baseline/Baseline.php b/vendor/phpunit/phpunit/src/Runner/Baseline/Baseline.php index 1e9e530..733fca5 100644 --- a/vendor/phpunit/phpunit/src/Runner/Baseline/Baseline.php +++ b/vendor/phpunit/phpunit/src/Runner/Baseline/Baseline.php @@ -16,7 +16,7 @@ namespace PHPUnit\Runner\Baseline; */ final class Baseline { - public const int VERSION = 1; + public const VERSION = 1; /** * @var array>> diff --git a/vendor/phpunit/phpunit/src/Runner/Baseline/Generator.php b/vendor/phpunit/phpunit/src/Runner/Baseline/Generator.php index 31b7ac4..4595a28 100644 --- a/vendor/phpunit/phpunit/src/Runner/Baseline/Generator.php +++ b/vendor/phpunit/phpunit/src/Runner/Baseline/Generator.php @@ -90,7 +90,7 @@ final readonly class Generator return $this->source->restrictNotices(); } - return false; + return $this->source->restrictDeprecations(); } private function isSuppressionIgnored(DeprecationTriggered|NoticeTriggered|PhpDeprecationTriggered|PhpNoticeTriggered|PhpWarningTriggered|WarningTriggered $event): bool diff --git a/vendor/phpunit/phpunit/src/Runner/CodeCoverage.php b/vendor/phpunit/phpunit/src/Runner/CodeCoverage.php index dcf6a26..79634f9 100644 --- a/vendor/phpunit/phpunit/src/Runner/CodeCoverage.php +++ b/vendor/phpunit/phpunit/src/Runner/CodeCoverage.php @@ -9,7 +9,6 @@ */ namespace PHPUnit\Runner; -use function assert; use function file_put_contents; use function sprintf; use PHPUnit\Event\Facade as EventFacade; @@ -31,8 +30,6 @@ use SebastianBergmann\CodeCoverage\Report\PHP as PhpReport; use SebastianBergmann\CodeCoverage\Report\Text as TextReport; use SebastianBergmann\CodeCoverage\Report\Thresholds; use SebastianBergmann\CodeCoverage\Report\Xml\Facade as XmlReport; -use SebastianBergmann\CodeCoverage\Test\Target\TargetCollection; -use SebastianBergmann\CodeCoverage\Test\Target\ValidationFailure; use SebastianBergmann\CodeCoverage\Test\TestSize\TestSize; use SebastianBergmann\CodeCoverage\Test\TestStatus\TestStatus; use SebastianBergmann\Comparator\Comparator; @@ -100,6 +97,12 @@ final class CodeCoverage $this->codeCoverage()->enableAnnotationsForIgnoringCode(); } + if ($configuration->includeUncoveredFiles()) { + $this->codeCoverage()->includeUncoveredFiles(); + } else { + $this->codeCoverage()->excludeUncoveredFiles(); + } + if ($codeCoverageFilterRegistry->get()->isEmpty()) { if (!$codeCoverageFilterRegistry->configured()) { EventFacade::emitter()->testRunnerTriggeredWarning( @@ -159,7 +162,11 @@ final class CodeCoverage $this->collecting = true; } - public function stop(bool $append, null|false|TargetCollection $covers = null, ?TargetCollection $uses = null): void + /** + * @param array>|false $linesToBeCovered + * @param array> $linesToBeUsed + */ + public function stop(bool $append, array|false $linesToBeCovered = [], array $linesToBeUsed = []): void { if (!$this->collecting) { return; @@ -175,37 +182,8 @@ final class CodeCoverage } } - if ($covers instanceof TargetCollection) { - $result = $this->codeCoverage->validate($covers); - - if ($result->isFailure()) { - assert($result instanceof ValidationFailure); - - EventFacade::emitter()->testTriggeredPhpunitWarning( - $this->test->valueObjectForEvents(), - $result->message(), - ); - - $append = false; - } - } - - if ($uses instanceof TargetCollection) { - $result = $this->codeCoverage->validate($uses); - - if ($result->isFailure()) { - assert($result instanceof ValidationFailure); - - EventFacade::emitter()->testTriggeredPhpunitWarning( - $this->test->valueObjectForEvents(), - $result->message(), - ); - - $append = false; - } - } - - $this->codeCoverage->stop($append, $status, $covers, $uses); + /* @noinspection UnusedFunctionResultInspection */ + $this->codeCoverage->stop($append, $status, $linesToBeCovered, $linesToBeUsed); $this->test = null; $this->collecting = false; diff --git a/vendor/phpunit/phpunit/src/Runner/ErrorHandler.php b/vendor/phpunit/phpunit/src/Runner/ErrorHandler.php index 54f35aa..f8c8ea4 100644 --- a/vendor/phpunit/phpunit/src/Runner/ErrorHandler.php +++ b/vendor/phpunit/phpunit/src/Runner/ErrorHandler.php @@ -51,8 +51,8 @@ use PHPUnit\Util\ExcludeList; */ final class ErrorHandler { - private const int UNHANDLEABLE_LEVELS = E_ERROR | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING; - private const int INSUPPRESSIBLE_LEVELS = E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR; + private const UNHANDLEABLE_LEVELS = E_ERROR | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING; + private const INSUPPRESSIBLE_LEVELS = E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR; private static ?self $instance = null; private ?Baseline $baseline = null; private bool $enabled = false; diff --git a/vendor/phpunit/phpunit/src/Runner/IssueFilter.php b/vendor/phpunit/phpunit/src/Runner/IssueFilter.php index 445c15b..b54c159 100644 --- a/vendor/phpunit/phpunit/src/Runner/IssueFilter.php +++ b/vendor/phpunit/phpunit/src/Runner/IssueFilter.php @@ -60,6 +60,10 @@ final readonly class IssueFilter if (!$this->source->ignoreSuppressionOfDeprecations() && $event->wasSuppressed()) { return false; } + + if ($this->source->restrictDeprecations() && !SourceFilter::instance()->includes($event->file())) { + return false; + } } if ($event instanceof NoticeTriggered) { diff --git a/vendor/phpunit/phpunit/src/Runner/PHPT/PhptTestCase.php b/vendor/phpunit/phpunit/src/Runner/PHPT/PhptTestCase.php index 51311bb..db603ba 100644 --- a/vendor/phpunit/phpunit/src/Runner/PHPT/PhptTestCase.php +++ b/vendor/phpunit/phpunit/src/Runner/PHPT/PhptTestCase.php @@ -76,8 +76,6 @@ use Throwable; * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * * @internal This class is not covered by the backward compatibility promise for PHPUnit - * - * @see https://qa.php.net/phpt_details.php */ final class PhptTestCase implements Reorderable, SelfDescribing, Test { diff --git a/vendor/phpunit/phpunit/src/Runner/ResultCache/DefaultResultCache.php b/vendor/phpunit/phpunit/src/Runner/ResultCache/DefaultResultCache.php index ab53c8f..667e4dd 100644 --- a/vendor/phpunit/phpunit/src/Runner/ResultCache/DefaultResultCache.php +++ b/vendor/phpunit/phpunit/src/Runner/ResultCache/DefaultResultCache.php @@ -33,8 +33,15 @@ use PHPUnit\Util\Filesystem; */ final class DefaultResultCache implements ResultCache { - private const int VERSION = 1; - private const string DEFAULT_RESULT_CACHE_FILENAME = '.phpunit.result.cache'; + /** + * @var int + */ + private const VERSION = 1; + + /** + * @var string + */ + private const DEFAULT_RESULT_CACHE_FILENAME = '.phpunit.result.cache'; private readonly string $cacheFilename; /** diff --git a/vendor/phpunit/phpunit/src/Runner/TestSuiteSorter.php b/vendor/phpunit/phpunit/src/Runner/TestSuiteSorter.php index 2aab5b1..b2af1e6 100644 --- a/vendor/phpunit/phpunit/src/Runner/TestSuiteSorter.php +++ b/vendor/phpunit/phpunit/src/Runner/TestSuiteSorter.php @@ -33,17 +33,37 @@ use PHPUnit\Runner\ResultCache\ResultCache; */ final class TestSuiteSorter { - public const int ORDER_DEFAULT = 0; - public const int ORDER_RANDOMIZED = 1; - public const int ORDER_REVERSED = 2; - public const int ORDER_DEFECTS_FIRST = 3; - public const int ORDER_DURATION = 4; - public const int ORDER_SIZE = 5; + /** + * @var int + */ + public const ORDER_DEFAULT = 0; /** - * @var non-empty-array + * @var int */ - private const array SIZE_SORT_WEIGHT = [ + public const ORDER_RANDOMIZED = 1; + + /** + * @var int + */ + public const ORDER_REVERSED = 2; + + /** + * @var int + */ + public const ORDER_DEFECTS_FIRST = 3; + + /** + * @var int + */ + public const ORDER_DURATION = 4; + + /** + * @var int + */ + public const ORDER_SIZE = 5; + + private const SIZE_SORT_WEIGHT = [ 'small' => 1, 'medium' => 2, 'large' => 3, @@ -315,9 +335,9 @@ final class TestSuiteSorter * 3. If the test has dependencies but none left to do: mark done, start again from the top * 4. When we reach the end add any leftover tests to the end. These will be marked 'skipped' during execution. * - * @param array $tests + * @param array $tests * - * @return array + * @return array */ private function resolveDependencies(array $tests): array { diff --git a/vendor/phpunit/phpunit/src/Runner/Version.php b/vendor/phpunit/phpunit/src/Runner/Version.php index a1731ce..cc9ac0a 100644 --- a/vendor/phpunit/phpunit/src/Runner/Version.php +++ b/vendor/phpunit/phpunit/src/Runner/Version.php @@ -34,7 +34,7 @@ final class Version } if (self::$version === '') { - self::$version = (new VersionId('12.0', dirname(__DIR__, 2)))->asString(); + self::$version = (new VersionId('11.5.6', dirname(__DIR__, 2)))->asString(); } return self::$version; diff --git a/vendor/phpunit/phpunit/src/TextUI/Command/Result.php b/vendor/phpunit/phpunit/src/TextUI/Command/Result.php index ae4a3e2..9f53755 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Command/Result.php +++ b/vendor/phpunit/phpunit/src/TextUI/Command/Result.php @@ -18,10 +18,10 @@ namespace PHPUnit\TextUI\Command; */ final readonly class Result { - public const int SUCCESS = 0; - public const int FAILURE = 1; - public const int EXCEPTION = 2; - public const int CRASH = 255; + public const SUCCESS = 0; + public const FAILURE = 1; + public const EXCEPTION = 2; + public const CRASH = 255; private string $output; private int $shellExitCode; diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Builder.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Builder.php index a2218cd..f178b04 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Builder.php +++ b/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Builder.php @@ -10,6 +10,8 @@ namespace PHPUnit\TextUI\CliArguments; use const DIRECTORY_SEPARATOR; +use function array_map; +use function array_merge; use function assert; use function basename; use function explode; @@ -17,6 +19,7 @@ use function getcwd; use function is_file; use function is_numeric; use function sprintf; +use function str_contains; use function strtolower; use PHPUnit\Event\Facade as EventFacade; use PHPUnit\Runner\TestSuiteSorter; @@ -31,10 +34,7 @@ use SebastianBergmann\CliParser\Parser as CliParser; */ final class Builder { - /** - * @var non-empty-list - */ - private const array LONG_OPTIONS = [ + private const LONG_OPTIONS = [ 'atleast-version=', 'bootstrap=', 'cache-result', @@ -140,8 +140,7 @@ final class Builder 'debug', 'extension=', ]; - - private const string SHORT_OPTIONS = 'd:c:h'; + private const SHORT_OPTIONS = 'd:c:h'; /** * @var array @@ -455,44 +454,68 @@ final class Builder break; case '--group': + if (str_contains($option[1], ',')) { + EventFacade::emitter()->testRunnerTriggeredWarning( + 'Using comma-separated values with --group is deprecated and will no longer work in PHPUnit 12. You can use --group multiple times instead.', + ); + } + if ($groups === null) { $groups = []; } - $groups[] = $option[1]; + $groups = array_merge($groups, explode(',', $option[1])); $optionAllowedMultipleTimes = true; break; case '--exclude-group': + if (str_contains($option[1], ',')) { + EventFacade::emitter()->testRunnerTriggeredWarning( + 'Using comma-separated values with --exclude-group is deprecated and will no longer work in PHPUnit 12. You can use --exclude-group multiple times instead.', + ); + } + if ($excludeGroups === null) { $excludeGroups = []; } - $excludeGroups[] = $option[1]; + $excludeGroups = array_merge($excludeGroups, explode(',', $option[1])); $optionAllowedMultipleTimes = true; break; case '--covers': + if (str_contains($option[1], ',')) { + EventFacade::emitter()->testRunnerTriggeredWarning( + 'Using comma-separated values with --covers is deprecated and will no longer work in PHPUnit 12. You can use --covers multiple times instead.', + ); + } + if ($testsCovering === null) { $testsCovering = []; } - $testsCovering[] = strtolower($option[1]); + $testsCovering = array_merge($testsCovering, array_map('strtolower', explode(',', $option[1]))); $optionAllowedMultipleTimes = true; break; case '--uses': + if (str_contains($option[1], ',')) { + EventFacade::emitter()->testRunnerTriggeredWarning( + 'Using comma-separated values with --uses is deprecated and will no longer work in PHPUnit 12. You can use --uses multiple times instead.', + ); + } + if ($testsUsing === null) { $testsUsing = []; } - $testsUsing[] = strtolower($option[1]); + $testsUsing = array_merge($testsUsing, array_map('strtolower', explode(',', $option[1]))); $optionAllowedMultipleTimes = true; @@ -510,11 +533,17 @@ final class Builder break; case '--test-suffix': + if (str_contains($option[1], ',')) { + EventFacade::emitter()->testRunnerTriggeredWarning( + 'Using comma-separated values with --test-suffix is deprecated and will no longer work in PHPUnit 12. You can use --test-suffix multiple times instead.', + ); + } + if ($testSuffixes === null) { $testSuffixes = []; } - $testSuffixes[] = $option[1]; + $testSuffixes = array_merge($testSuffixes, explode(',', $option[1])); $optionAllowedMultipleTimes = true; diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Configuration.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Configuration.php index 83d2e49..6af2842 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Configuration.php +++ b/vendor/phpunit/phpunit/src/TextUI/Configuration/Configuration.php @@ -16,10 +16,10 @@ namespace PHPUnit\TextUI\Configuration; */ final readonly class Configuration { - public const string COLOR_NEVER = 'never'; - public const string COLOR_AUTO = 'auto'; - public const string COLOR_ALWAYS = 'always'; - public const string COLOR_DEFAULT = self::COLOR_NEVER; + public const COLOR_NEVER = 'never'; + public const COLOR_AUTO = 'auto'; + public const COLOR_ALWAYS = 'always'; + public const COLOR_DEFAULT = self::COLOR_NEVER; /** * @var list @@ -149,6 +149,7 @@ final readonly class Configuration */ private array $excludeGroups; private int $randomOrderSeed; + private bool $includeUncoveredFiles; private TestSuiteCollection $testSuite; private string $includeTestSuite; private string $excludeTestSuite; @@ -161,10 +162,6 @@ final readonly class Configuration private Php $php; private bool $controlGarbageCollector; private int $numberOfTestsBeforeGarbageCollection; - - /** - * @var null|non-empty-string - */ private ?string $generateBaseline; private bool $debug; @@ -183,10 +180,9 @@ final readonly class Configuration * @param list $groups * @param list $excludeGroups * @param non-empty-list $testSuffixes - * @param null|non-empty-string $generateBaseline * @param non-negative-int $shortenArraysForExportThreshold */ - public function __construct(array $cliArguments, ?string $configurationFile, ?string $bootstrap, bool $cacheResult, ?string $cacheDirectory, ?string $coverageCacheDirectory, Source $source, string $testResultCacheFile, ?string $coverageClover, ?string $coverageCobertura, ?string $coverageCrap4j, int $coverageCrap4jThreshold, ?string $coverageHtml, int $coverageHtmlLowUpperBound, int $coverageHtmlHighLowerBound, string $coverageHtmlColorSuccessLow, string $coverageHtmlColorSuccessMedium, string $coverageHtmlColorSuccessHigh, string $coverageHtmlColorWarning, string $coverageHtmlColorDanger, ?string $coverageHtmlCustomCssFile, ?string $coveragePhp, ?string $coverageText, bool $coverageTextShowUncoveredFiles, bool $coverageTextShowOnlySummary, ?string $coverageXml, bool $pathCoverage, bool $ignoreDeprecatedCodeUnitsFromCodeCoverage, bool $disableCodeCoverageIgnore, bool $failOnDeprecation, bool $failOnPhpunitDeprecation, bool $failOnEmptyTestSuite, bool $failOnIncomplete, bool $failOnNotice, bool $failOnRisky, bool $failOnSkipped, bool $failOnWarning, bool $stopOnDefect, bool $stopOnDeprecation, ?string $specificDeprecationToStopOn, bool $stopOnError, bool $stopOnFailure, bool $stopOnIncomplete, bool $stopOnNotice, bool $stopOnRisky, bool $stopOnSkipped, bool $stopOnWarning, bool $outputToStandardErrorStream, int $columns, bool $noExtensions, ?string $pharExtensionDirectory, array $extensionBootstrappers, bool $backupGlobals, bool $backupStaticProperties, bool $beStrictAboutChangesToGlobalState, bool $colors, bool $processIsolation, bool $enforceTimeLimit, int $defaultTimeLimit, int $timeoutForSmallTests, int $timeoutForMediumTests, int $timeoutForLargeTests, bool $reportUselessTests, bool $strictCoverage, bool $disallowTestOutput, bool $displayDetailsOnIncompleteTests, bool $displayDetailsOnSkippedTests, bool $displayDetailsOnTestsThatTriggerDeprecations, bool $displayDetailsOnPhpunitDeprecations, bool $displayDetailsOnTestsThatTriggerErrors, bool $displayDetailsOnTestsThatTriggerNotices, bool $displayDetailsOnTestsThatTriggerWarnings, bool $reverseDefectList, bool $requireCoverageMetadata, bool $noProgress, bool $noResults, bool $noOutput, int $executionOrder, int $executionOrderDefects, bool $resolveDependencies, ?string $logfileTeamcity, ?string $logfileJunit, ?string $logfileTestdoxHtml, ?string $logfileTestdoxText, ?string $logEventsText, ?string $logEventsVerboseText, bool $teamCityOutput, bool $testDoxOutput, bool $testDoxOutputSummary, ?array $testsCovering, ?array $testsUsing, ?array $testsRequiringPhpExtension, ?string $filter, ?string $excludeFilter, array $groups, array $excludeGroups, int $randomOrderSeed, TestSuiteCollection $testSuite, string $includeTestSuite, string $excludeTestSuite, ?string $defaultTestSuite, array $testSuffixes, Php $php, bool $controlGarbageCollector, int $numberOfTestsBeforeGarbageCollection, ?string $generateBaseline, bool $debug, int $shortenArraysForExportThreshold) + public function __construct(array $cliArguments, ?string $configurationFile, ?string $bootstrap, bool $cacheResult, ?string $cacheDirectory, ?string $coverageCacheDirectory, Source $source, string $testResultCacheFile, ?string $coverageClover, ?string $coverageCobertura, ?string $coverageCrap4j, int $coverageCrap4jThreshold, ?string $coverageHtml, int $coverageHtmlLowUpperBound, int $coverageHtmlHighLowerBound, string $coverageHtmlColorSuccessLow, string $coverageHtmlColorSuccessMedium, string $coverageHtmlColorSuccessHigh, string $coverageHtmlColorWarning, string $coverageHtmlColorDanger, ?string $coverageHtmlCustomCssFile, ?string $coveragePhp, ?string $coverageText, bool $coverageTextShowUncoveredFiles, bool $coverageTextShowOnlySummary, ?string $coverageXml, bool $pathCoverage, bool $ignoreDeprecatedCodeUnitsFromCodeCoverage, bool $disableCodeCoverageIgnore, bool $failOnDeprecation, bool $failOnPhpunitDeprecation, bool $failOnEmptyTestSuite, bool $failOnIncomplete, bool $failOnNotice, bool $failOnRisky, bool $failOnSkipped, bool $failOnWarning, bool $stopOnDefect, bool $stopOnDeprecation, ?string $specificDeprecationToStopOn, bool $stopOnError, bool $stopOnFailure, bool $stopOnIncomplete, bool $stopOnNotice, bool $stopOnRisky, bool $stopOnSkipped, bool $stopOnWarning, bool $outputToStandardErrorStream, int|string $columns, bool $noExtensions, ?string $pharExtensionDirectory, array $extensionBootstrappers, bool $backupGlobals, bool $backupStaticProperties, bool $beStrictAboutChangesToGlobalState, bool $colors, bool $processIsolation, bool $enforceTimeLimit, int $defaultTimeLimit, int $timeoutForSmallTests, int $timeoutForMediumTests, int $timeoutForLargeTests, bool $reportUselessTests, bool $strictCoverage, bool $disallowTestOutput, bool $displayDetailsOnIncompleteTests, bool $displayDetailsOnSkippedTests, bool $displayDetailsOnTestsThatTriggerDeprecations, bool $displayDetailsOnPhpunitDeprecations, bool $displayDetailsOnTestsThatTriggerErrors, bool $displayDetailsOnTestsThatTriggerNotices, bool $displayDetailsOnTestsThatTriggerWarnings, bool $reverseDefectList, bool $requireCoverageMetadata, bool $noProgress, bool $noResults, bool $noOutput, int $executionOrder, int $executionOrderDefects, bool $resolveDependencies, ?string $logfileTeamcity, ?string $logfileJunit, ?string $logfileTestdoxHtml, ?string $logfileTestdoxText, ?string $logEventsText, ?string $logEventsVerboseText, bool $teamCityOutput, bool $testDoxOutput, bool $testDoxOutputSummary, ?array $testsCovering, ?array $testsUsing, ?array $testsRequiringPhpExtension, ?string $filter, ?string $excludeFilter, array $groups, array $excludeGroups, int $randomOrderSeed, bool $includeUncoveredFiles, TestSuiteCollection $testSuite, string $includeTestSuite, string $excludeTestSuite, ?string $defaultTestSuite, array $testSuffixes, Php $php, bool $controlGarbageCollector, int $numberOfTestsBeforeGarbageCollection, ?string $generateBaseline, bool $debug, int $shortenArraysForExportThreshold) { $this->cliArguments = $cliArguments; $this->configurationFile = $configurationFile; @@ -285,6 +281,7 @@ final readonly class Configuration $this->groups = $groups; $this->excludeGroups = $excludeGroups; $this->randomOrderSeed = $randomOrderSeed; + $this->includeUncoveredFiles = $includeUncoveredFiles; $this->testSuite = $testSuite; $this->includeTestSuite = $includeTestSuite; $this->excludeTestSuite = $excludeTestSuite; @@ -1225,6 +1222,11 @@ final readonly class Configuration return $this->randomOrderSeed; } + public function includeUncoveredFiles(): bool + { + return $this->includeUncoveredFiles; + } + public function testSuite(): TestSuiteCollection { return $this->testSuite; @@ -1293,8 +1295,6 @@ final readonly class Configuration /** * @throws NoBaselineException - * - * @return non-empty-string */ public function generateBaseline(): string { diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Merger.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Merger.php index 7b6863b..adc1baa 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Merger.php +++ b/vendor/phpunit/phpunit/src/TextUI/Configuration/Merger.php @@ -671,6 +671,8 @@ final readonly class Merger } } + $includeUncoveredFiles = $xmlConfiguration->codeCoverage()->includeUncoveredFiles(); + $includePaths = []; if ($cliConfiguration->hasIncludePath()) { @@ -785,6 +787,7 @@ final readonly class Merger $sourceIncludeFiles, $sourceExcludeDirectories, $sourceExcludeFiles, + $xmlConfiguration->source()->restrictDeprecations(), $xmlConfiguration->source()->restrictNotices(), $xmlConfiguration->source()->restrictWarnings(), $xmlConfiguration->source()->ignoreSuppressionOfDeprecations(), @@ -889,6 +892,7 @@ final readonly class Merger $groups, $excludeGroups, $randomOrderSeed, + $includeUncoveredFiles, $xmlConfiguration->testSuite(), $includeTestSuite, $excludeTestSuite, diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Source.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Source.php index b6f61eb..6825363 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Source.php +++ b/vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Source.php @@ -25,6 +25,7 @@ final readonly class Source private FileCollection $includeFiles; private FilterDirectoryCollection $excludeDirectories; private FileCollection $excludeFiles; + private bool $restrictDeprecations; private bool $restrictNotices; private bool $restrictWarnings; private bool $ignoreSuppressionOfDeprecations; @@ -47,7 +48,7 @@ final readonly class Source * @param non-empty-string $baseline * @param array{functions: list, methods: list} $deprecationTriggers */ - public function __construct(?string $baseline, bool $ignoreBaseline, FilterDirectoryCollection $includeDirectories, FileCollection $includeFiles, FilterDirectoryCollection $excludeDirectories, FileCollection $excludeFiles, bool $restrictNotices, bool $restrictWarnings, bool $ignoreSuppressionOfDeprecations, bool $ignoreSuppressionOfPhpDeprecations, bool $ignoreSuppressionOfErrors, bool $ignoreSuppressionOfNotices, bool $ignoreSuppressionOfPhpNotices, bool $ignoreSuppressionOfWarnings, bool $ignoreSuppressionOfPhpWarnings, array $deprecationTriggers, bool $ignoreSelfDeprecations, bool $ignoreDirectDeprecations, bool $ignoreIndirectDeprecations) + public function __construct(?string $baseline, bool $ignoreBaseline, FilterDirectoryCollection $includeDirectories, FileCollection $includeFiles, FilterDirectoryCollection $excludeDirectories, FileCollection $excludeFiles, bool $restrictDeprecations, bool $restrictNotices, bool $restrictWarnings, bool $ignoreSuppressionOfDeprecations, bool $ignoreSuppressionOfPhpDeprecations, bool $ignoreSuppressionOfErrors, bool $ignoreSuppressionOfNotices, bool $ignoreSuppressionOfPhpNotices, bool $ignoreSuppressionOfWarnings, bool $ignoreSuppressionOfPhpWarnings, array $deprecationTriggers, bool $ignoreSelfDeprecations, bool $ignoreDirectDeprecations, bool $ignoreIndirectDeprecations) { $this->baseline = $baseline; $this->ignoreBaseline = $ignoreBaseline; @@ -55,6 +56,7 @@ final readonly class Source $this->includeFiles = $includeFiles; $this->excludeDirectories = $excludeDirectories; $this->excludeFiles = $excludeFiles; + $this->restrictDeprecations = $restrictDeprecations; $this->restrictNotices = $restrictNotices; $this->restrictWarnings = $restrictWarnings; $this->ignoreSuppressionOfDeprecations = $ignoreSuppressionOfDeprecations; @@ -125,6 +127,11 @@ final readonly class Source return $this->includeDirectories->notEmpty() || $this->includeFiles->notEmpty(); } + public function restrictDeprecations(): bool + { + return $this->restrictDeprecations; + } + public function restrictNotices(): bool { return $this->restrictNotices; diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/CodeCoverage.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/CodeCoverage.php index c7a4ac7..c3975a8 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/CodeCoverage.php +++ b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/CodeCoverage.php @@ -28,6 +28,7 @@ use PHPUnit\TextUI\XmlConfiguration\Exception; final readonly class CodeCoverage { private bool $pathCoverage; + private bool $includeUncoveredFiles; private bool $ignoreDeprecatedCodeUnits; private bool $disableCodeCoverageIgnore; private ?Clover $clover; @@ -38,9 +39,10 @@ final readonly class CodeCoverage private ?Text $text; private ?Xml $xml; - public function __construct(bool $pathCoverage, bool $ignoreDeprecatedCodeUnits, bool $disableCodeCoverageIgnore, ?Clover $clover, ?Cobertura $cobertura, ?Crap4j $crap4j, ?Html $html, ?Php $php, ?Text $text, ?Xml $xml) + public function __construct(bool $pathCoverage, bool $includeUncoveredFiles, bool $ignoreDeprecatedCodeUnits, bool $disableCodeCoverageIgnore, ?Clover $clover, ?Cobertura $cobertura, ?Crap4j $crap4j, ?Html $html, ?Php $php, ?Text $text, ?Xml $xml) { $this->pathCoverage = $pathCoverage; + $this->includeUncoveredFiles = $includeUncoveredFiles; $this->ignoreDeprecatedCodeUnits = $ignoreDeprecatedCodeUnits; $this->disableCodeCoverageIgnore = $disableCodeCoverageIgnore; $this->clover = $clover; @@ -57,6 +59,11 @@ final readonly class CodeCoverage return $this->pathCoverage; } + public function includeUncoveredFiles(): bool + { + return $this->includeUncoveredFiles; + } + public function ignoreDeprecatedCodeUnits(): bool { return $this->ignoreDeprecatedCodeUnits; diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/DefaultConfiguration.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/DefaultConfiguration.php index 897cf4b..221ac4a 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/DefaultConfiguration.php +++ b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/DefaultConfiguration.php @@ -53,6 +53,7 @@ final readonly class DefaultConfiguration extends Configuration false, false, false, + false, [ 'functions' => [], 'methods' => [], @@ -63,6 +64,7 @@ final readonly class DefaultConfiguration extends Configuration ), new CodeCoverage( false, + true, false, false, null, @@ -150,7 +152,7 @@ final readonly class DefaultConfiguration extends Configuration false, false, 100, - 10, + 0, ), TestSuiteCollection::fromArray([]), ); diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Generator.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Generator.php index 4fc4ca2..4e4a71f 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Generator.php +++ b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Generator.php @@ -21,13 +21,14 @@ final readonly class Generator /** * @var string */ - private const string TEMPLATE = <<<'EOT' + private const TEMPLATE = <<<'EOT' toAbsolutePath($filename, $baseline); } + $restrictDeprecations = $this->getBooleanAttribute($element, 'restrictDeprecations', false); $restrictNotices = $this->getBooleanAttribute($element, 'restrictNotices', false); $restrictWarnings = $this->getBooleanAttribute($element, 'restrictWarnings', false); $ignoreSuppressionOfDeprecations = $this->getBooleanAttribute($element, 'ignoreSuppressionOfDeprecations', false); @@ -332,6 +334,7 @@ final readonly class Loader $this->readFilterFiles($filename, $xpath, 'source/include/file'), $this->readFilterDirectories($filename, $xpath, 'source/exclude/directory'), $this->readFilterFiles($filename, $xpath, 'source/exclude/file'), + $restrictDeprecations, $restrictNotices, $restrictWarnings, $ignoreSuppressionOfDeprecations, @@ -351,6 +354,7 @@ final readonly class Loader private function codeCoverage(string $filename, DOMXPath $xpath): CodeCoverage { $pathCoverage = false; + $includeUncoveredFiles = true; $ignoreDeprecatedCodeUnits = false; $disableCodeCoverageIgnore = false; @@ -363,6 +367,12 @@ final readonly class Loader false, ); + $includeUncoveredFiles = $this->getBooleanAttribute( + $element, + 'includeUncoveredFiles', + true, + ); + $ignoreDeprecatedCodeUnits = $this->getBooleanAttribute( $element, 'ignoreDeprecatedCodeUnits', @@ -490,6 +500,7 @@ final readonly class Loader return new CodeCoverage( $pathCoverage, + $includeUncoveredFiles, $ignoreDeprecatedCodeUnits, $disableCodeCoverageIgnore, $clover, @@ -853,7 +864,7 @@ final readonly class Loader $beStrictAboutCoverageMetadata = $this->getBooleanAttribute($document->documentElement, 'beStrictAboutCoverageMetadata', false); } - $shortenArraysForExportThreshold = $this->getIntegerAttribute($document->documentElement, 'shortenArraysForExportThreshold', 10); + $shortenArraysForExportThreshold = $this->getIntegerAttribute($document->documentElement, 'shortenArraysForExportThreshold', 0); if ($shortenArraysForExportThreshold < 0) { $shortenArraysForExportThreshold = 0; diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/MigrationBuilder.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/MigrationBuilder.php index 02f3cd6..47a5b84 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/MigrationBuilder.php +++ b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/MigrationBuilder.php @@ -18,10 +18,7 @@ use function version_compare; */ final readonly class MigrationBuilder { - /** - * @var non-empty-array> - */ - private const array AVAILABLE_MIGRATIONS = [ + private const AVAILABLE_MIGRATIONS = [ '8.5' => [ RemoveLogTypes::class, ], diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/UpdateSchemaLocation.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/UpdateSchemaLocation.php index 35c8abe..4e73344 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/UpdateSchemaLocation.php +++ b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/UpdateSchemaLocation.php @@ -22,8 +22,8 @@ use PHPUnit\Runner\Version; */ final readonly class UpdateSchemaLocation implements Migration { - private const string NAMESPACE_URI = 'http://www.w3.org/2001/XMLSchema-instance'; - private const string LOCAL_NAME_SCHEMA_LOCATION = 'noNamespaceSchemaLocation'; + private const NAMESPACE_URI = 'http://www.w3.org/2001/XMLSchema-instance'; + private const LOCAL_NAME_SCHEMA_LOCATION = 'noNamespaceSchemaLocation'; public function migrate(DOMDocument $document): void { diff --git a/vendor/phpunit/phpunit/src/TextUI/Help.php b/vendor/phpunit/phpunit/src/TextUI/Help.php index 72d6137..2a69afc 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Help.php +++ b/vendor/phpunit/phpunit/src/TextUI/Help.php @@ -29,7 +29,7 @@ use SebastianBergmann\Environment\Console; */ final class Help { - private const string LEFT_MARGIN = ' '; + private const LEFT_MARGIN = ' '; private int $lengthOfLongestOptionName = 0; private readonly int $columnsAvailableForDescription; private bool $hasColor; diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/ProgressPrinter.php b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/ProgressPrinter.php index 857ed23..417cb95 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/ProgressPrinter.php +++ b/vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/ProgressPrinter.php @@ -154,6 +154,11 @@ final class ProgressPrinter return; } + if ($this->source->restrictDeprecations() && + !SourceFilter::instance()->includes($event->file())) { + return; + } + if (!$this->source->ignoreSuppressionOfDeprecations() && $event->wasSuppressed()) { return; } @@ -180,6 +185,11 @@ final class ProgressPrinter return; } + if ($this->source->restrictDeprecations() && + !SourceFilter::instance()->includes($event->file())) { + return; + } + if (!$this->source->ignoreSuppressionOfPhpDeprecations() && $event->wasSuppressed()) { return; } diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/TestDox/ResultPrinter.php b/vendor/phpunit/phpunit/src/TextUI/Output/TestDox/ResultPrinter.php index f0a7af9..394a3fa 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Output/TestDox/ResultPrinter.php +++ b/vendor/phpunit/phpunit/src/TextUI/Output/TestDox/ResultPrinter.php @@ -306,7 +306,7 @@ final readonly class ResultPrinter PHP_EOL, array_map( static fn (string $line) => ' ' . $prefix . ($line ? ' ' . $line : ''), - preg_split('/\r\n|\r|\n/', $message) ?: [], + preg_split('/\r\n|\r|\n/', $message), ), ); } diff --git a/vendor/phpunit/phpunit/src/TextUI/ShellExitCodeCalculator.php b/vendor/phpunit/phpunit/src/TextUI/ShellExitCodeCalculator.php index 89ffcba..fd942dc 100644 --- a/vendor/phpunit/phpunit/src/TextUI/ShellExitCodeCalculator.php +++ b/vendor/phpunit/phpunit/src/TextUI/ShellExitCodeCalculator.php @@ -18,9 +18,9 @@ use PHPUnit\TestRunner\TestResult\TestResult; */ final readonly class ShellExitCodeCalculator { - private const int SUCCESS_EXIT = 0; - private const int FAILURE_EXIT = 1; - private const int EXCEPTION_EXIT = 2; + private const SUCCESS_EXIT = 0; + private const FAILURE_EXIT = 1; + private const EXCEPTION_EXIT = 2; public function calculate(bool $failOnDeprecation, bool $failOnPhpunitDeprecation, bool $failOnEmptyTestSuite, bool $failOnIncomplete, bool $failOnNotice, bool $failOnRisky, bool $failOnSkipped, bool $failOnWarning, TestResult $result): int { diff --git a/vendor/phpunit/phpunit/src/Util/Cloner.php b/vendor/phpunit/phpunit/src/Util/Cloner.php new file mode 100644 index 0000000..ca8a6b4 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Util/Cloner.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Util; + +use Throwable; + +/** + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final readonly class Cloner +{ + /** + * @template OriginalType of object + * + * @param OriginalType $original + * + * @return OriginalType + */ + public static function clone(object $original): object + { + try { + return clone $original; + + /** @phpstan-ignore catch.neverThrown */ + } catch (Throwable) { + return $original; + } + } +} diff --git a/vendor/phpunit/phpunit/src/Util/Color.php b/vendor/phpunit/phpunit/src/Util/Color.php index de15928..6cfbb7b 100644 --- a/vendor/phpunit/phpunit/src/Util/Color.php +++ b/vendor/phpunit/phpunit/src/Util/Color.php @@ -34,17 +34,17 @@ use function trim; final class Color { /** - * @var non-empty-array + * @var array */ - private const array WHITESPACE_MAP = [ + private const WHITESPACE_MAP = [ ' ' => '·', "\t" => '⇥', ]; /** - * @var non-empty-array + * @var array */ - private const array WHITESPACE_EOL_MAP = [ + private const WHITESPACE_EOL_MAP = [ ' ' => '·', "\t" => '⇥', "\n" => '↵', @@ -52,9 +52,9 @@ final class Color ]; /** - * @var non-empty-array + * @var array */ - private const array ANSI_CODES = [ + private static array $ansiCodes = [ 'reset' => '0', 'bold' => '1', 'dim' => '2', @@ -90,8 +90,8 @@ final class Color $styles = []; foreach ($codes as $code) { - if (isset(self::ANSI_CODES[$code])) { - $styles[] = self::ANSI_CODES[$code]; + if (isset(self::$ansiCodes[$code])) { + $styles[] = self::$ansiCodes[$code]; } } diff --git a/vendor/phpunit/phpunit/src/Util/ExcludeList.php b/vendor/phpunit/phpunit/src/Util/ExcludeList.php index 7ec8d42..e935ae8 100644 --- a/vendor/phpunit/phpunit/src/Util/ExcludeList.php +++ b/vendor/phpunit/phpunit/src/Util/ExcludeList.php @@ -10,7 +10,6 @@ namespace PHPUnit\Util; use const PHP_OS_FAMILY; -use function assert; use function class_exists; use function defined; use function dirname; @@ -27,6 +26,8 @@ use PHPUnit\Framework\TestCase; use ReflectionClass; use SebastianBergmann\CliParser\Parser as CliParser; use SebastianBergmann\CodeCoverage\CodeCoverage; +use SebastianBergmann\CodeUnit\CodeUnit; +use SebastianBergmann\CodeUnitReverseLookup\Wizard; use SebastianBergmann\Comparator\Comparator; use SebastianBergmann\Complexity\Calculator; use SebastianBergmann\Diff\Diff; @@ -52,9 +53,9 @@ use TheSeer\Tokenizer\Tokenizer; final class ExcludeList { /** - * @var non-empty-array + * @var array */ - private const array EXCLUDED_CLASS_NAMES = [ + private const EXCLUDED_CLASS_NAMES = [ // composer ClassLoader::class => 1, @@ -91,6 +92,12 @@ final class ExcludeList // sebastian/cli-parser CliParser::class => 1, + // sebastian/code-unit + CodeUnit::class => 1, + + // sebastian/code-unit-reverse-lookup + Wizard::class => 1, + // sebastian/comparator Comparator::class => 1, @@ -152,11 +159,7 @@ final class ExcludeList throw new InvalidDirectoryException($directory); } - $directory = realpath($directory); - - assert($directory !== false); - - self::$directories[] = $directory; + self::$directories[] = realpath($directory); } public function __construct(?bool $enabled = null) diff --git a/vendor/phpunit/phpunit/src/Util/Filter.php b/vendor/phpunit/phpunit/src/Util/Filter.php index f2a04dd..c1aa5ac 100644 --- a/vendor/phpunit/phpunit/src/Util/Filter.php +++ b/vendor/phpunit/phpunit/src/Util/Filter.php @@ -63,7 +63,7 @@ final readonly class Filter /** * @param list $frames */ - private static function stackTraceAsString(array $frames): string + public static function stackTraceAsString(array $frames): string { $buffer = ''; $prefix = defined('__PHPUNIT_PHAR_ROOT__') ? __PHPUNIT_PHAR_ROOT__ : false; diff --git a/vendor/phpunit/phpunit/src/Util/GlobalState.php b/vendor/phpunit/phpunit/src/Util/GlobalState.php index 255e491..288eb6f 100644 --- a/vendor/phpunit/phpunit/src/Util/GlobalState.php +++ b/vendor/phpunit/phpunit/src/Util/GlobalState.php @@ -40,9 +40,9 @@ use Closure; final readonly class GlobalState { /** - * @var non-empty-list + * @var list */ - private const array SUPER_GLOBAL_ARRAYS = [ + private const SUPER_GLOBAL_ARRAYS = [ '_ENV', '_POST', '_GET', @@ -53,9 +53,9 @@ final readonly class GlobalState ]; /** - * @var non-empty-array> + * @var array> */ - private const array DEPRECATED_INI_SETTINGS = [ + private const DEPRECATED_INI_SETTINGS = [ '7.3' => [ 'iconv.input_encoding' => true, 'iconv.output_encoding' => true, diff --git a/vendor/phpunit/phpunit/src/Util/Json.php b/vendor/phpunit/phpunit/src/Util/Json.php index d7c5d50..8e7a92b 100644 --- a/vendor/phpunit/phpunit/src/Util/Json.php +++ b/vendor/phpunit/phpunit/src/Util/Json.php @@ -13,7 +13,6 @@ use const JSON_PRETTY_PRINT; use const JSON_UNESCAPED_SLASHES; use const JSON_UNESCAPED_UNICODE; use const SORT_STRING; -use function assert; use function is_object; use function is_scalar; use function json_decode; @@ -39,11 +38,7 @@ final readonly class Json throw new InvalidJsonException; } - $result = json_encode($decodedJson, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); - - assert($result !== false); - - return $result; + return json_encode($decodedJson, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); } /** diff --git a/vendor/sebastian/cli-parser/ChangeLog.md b/vendor/sebastian/cli-parser/ChangeLog.md index 42d05f4..29582e9 100644 --- a/vendor/sebastian/cli-parser/ChangeLog.md +++ b/vendor/sebastian/cli-parser/ChangeLog.md @@ -2,12 +2,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. -## [4.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - ## [3.0.2] - 2024-07-03 ### Changed @@ -48,7 +42,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * Initial release -[4.0.0]: https://github.com/sebastianbergmann/cli-parser/compare/3.0...main [3.0.2]: https://github.com/sebastianbergmann/cli-parser/compare/3.0.1...3.0.2 [3.0.1]: https://github.com/sebastianbergmann/cli-parser/compare/3.0.0...3.0.1 [3.0.0]: https://github.com/sebastianbergmann/cli-parser/compare/2.0...3.0.0 diff --git a/vendor/sebastian/cli-parser/LICENSE b/vendor/sebastian/cli-parser/LICENSE index 0d534da..edaedf6 100644 --- a/vendor/sebastian/cli-parser/LICENSE +++ b/vendor/sebastian/cli-parser/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2020-2025, Sebastian Bergmann +Copyright (c) 2020-2024, Sebastian Bergmann All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/sebastian/cli-parser/README.md b/vendor/sebastian/cli-parser/README.md index d974c12..205cfe1 100644 --- a/vendor/sebastian/cli-parser/README.md +++ b/vendor/sebastian/cli-parser/README.md @@ -1,4 +1,4 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/cli-parser/v)](https://packagist.org/packages/sebastian/cli-parser) +[![Latest Stable Version](https://poser.pugx.org/sebastian/cli-parser/v/stable.png)](https://packagist.org/packages/sebastian/cli-parser) [![CI Status](https://github.com/sebastianbergmann/cli-parser/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/cli-parser/actions) [![codecov](https://codecov.io/gh/sebastianbergmann/cli-parser/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/cli-parser) diff --git a/vendor/sebastian/cli-parser/composer.json b/vendor/sebastian/cli-parser/composer.json index 7576479..efb0df1 100644 --- a/vendor/sebastian/cli-parser/composer.json +++ b/vendor/sebastian/cli-parser/composer.json @@ -15,17 +15,16 @@ "issues": "https://github.com/sebastianbergmann/cli-parser/issues", "security": "https://github.com/sebastianbergmann/cli-parser/security/policy" }, - "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, "config": { "platform": { - "php": "8.3.0" + "php": "8.2.0" }, "optimize-autoloader": true, "sort-packages": true @@ -37,7 +36,7 @@ }, "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "3.0-dev" } } } diff --git a/vendor/sebastian/cli-parser/src/Parser.php b/vendor/sebastian/cli-parser/src/Parser.php index e1f0229..324d7e7 100644 --- a/vendor/sebastian/cli-parser/src/Parser.php +++ b/vendor/sebastian/cli-parser/src/Parser.php @@ -19,6 +19,7 @@ use function current; use function explode; use function is_array; use function is_int; +use function is_string; use function key; use function next; use function preg_replace; @@ -41,7 +42,7 @@ final class Parser * @throws RequiredOptionArgumentMissingException * @throws UnknownOptionException * - * @return array{0: list, 1: list} + * @return array{0: list, 1: list} */ public function parse(array $argv, string $shortOptions, ?array $longOptions = null): array { @@ -110,8 +111,8 @@ final class Parser } /** - * @param list $options - * @param list $argv + * @param list $options + * @param list $argv * * @throws RequiredOptionArgumentMissingException */ @@ -141,6 +142,8 @@ final class Parser throw new RequiredOptionArgumentMissingException('-' . $option); } + assert(is_string($optionArgument)); + next($argv); } } @@ -150,9 +153,9 @@ final class Parser } /** - * @param list $longOptions - * @param list $options - * @param list $argv + * @param list $longOptions + * @param list $options + * @param list $argv * * @throws AmbiguousOptionException * @throws OptionDoesNotAllowArgumentException diff --git a/vendor/sebastian/code-unit-reverse-lookup/ChangeLog.md b/vendor/sebastian/code-unit-reverse-lookup/ChangeLog.md new file mode 100644 index 0000000..2169ce6 --- /dev/null +++ b/vendor/sebastian/code-unit-reverse-lookup/ChangeLog.md @@ -0,0 +1,59 @@ +# Change Log + +All notable changes to `sebastianbergmann/code-unit-reverse-lookup` are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. + +## [4.0.1] - 2024-07-03 + +### Changed + +* This project now uses PHPStan instead of Psalm for static analysis + +## [4.0.0] - 2024-02-02 + +### Removed + +* This component is no longer supported on PHP 8.1 + +## [3.0.0] - 2023-02-03 + +### Removed + +* This component is no longer supported on PHP 7.3, PHP 7.4, and PHP 8.0 + +## [2.0.3] - 2020-09-28 + +### Changed + +* Changed PHP version constraint in `composer.json` from `^7.3 || ^8.0` to `>=7.3` + +## [2.0.2] - 2020-06-26 + +### Added + +* This component is now supported on PHP 8 + +## [2.0.1] - 2020-06-15 + +### Changed + +* Tests etc. are now ignored for archive exports + +## 2.0.0 - 2020-02-07 + +### Removed + +* This component is no longer supported on PHP 5.6, PHP 7.0, PHP 7.1, and PHP 7.2 + +## 1.0.0 - 2016-02-13 + +### Added + +* Initial release + +[4.0.1]: https://github.com/sebastianbergmann/code-unit-reverse-lookup/compare/4.0.0...4.0.1 +[4.0.0]: https://github.com/sebastianbergmann/code-unit-reverse-lookup/compare/3.0...4.0.0 +[3.0.0]: https://github.com/sebastianbergmann/code-unit-reverse-lookup/compare/2.0.3...3.0.0 +[2.0.3]: https://github.com/sebastianbergmann/code-unit-reverse-lookup/compare/2.0.2...2.0.3 +[2.0.2]: https://github.com/sebastianbergmann/code-unit-reverse-lookup/compare/2.0.1...2.0.2 +[2.0.1]: https://github.com/sebastianbergmann/code-unit-reverse-lookup/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/sebastianbergmann/code-unit-reverse-lookup/compare/1.0.0...2.0.0 diff --git a/vendor/sebastian/code-unit-reverse-lookup/LICENSE b/vendor/sebastian/code-unit-reverse-lookup/LICENSE new file mode 100644 index 0000000..86c455d --- /dev/null +++ b/vendor/sebastian/code-unit-reverse-lookup/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2016-2024, Sebastian Bergmann +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/sebastian/code-unit-reverse-lookup/README.md b/vendor/sebastian/code-unit-reverse-lookup/README.md new file mode 100644 index 0000000..331c238 --- /dev/null +++ b/vendor/sebastian/code-unit-reverse-lookup/README.md @@ -0,0 +1,21 @@ +[![Latest Stable Version](https://poser.pugx.org/sebastian/code-unit-reverse-lookup/v/stable.png)](https://packagist.org/packages/sebastian/code-unit-reverse-lookup) +[![CI Status](https://github.com/sebastianbergmann/code-unit-reverse-lookup/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/code-unit-reverse-lookup/actions) +[![codecov](https://codecov.io/gh/sebastianbergmann/code-unit-reverse-lookup/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/code-unit-reverse-lookup) + +# sebastian/code-unit-reverse-lookup + +Looks up which function or method a line of code belongs to. + +## Installation + +You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): + +``` +composer require sebastian/code-unit-reverse-lookup +``` + +If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: + +``` +composer require --dev sebastian/code-unit-reverse-lookup +``` diff --git a/vendor/sebastian/code-unit-reverse-lookup/SECURITY.md b/vendor/sebastian/code-unit-reverse-lookup/SECURITY.md new file mode 100644 index 0000000..d88ff00 --- /dev/null +++ b/vendor/sebastian/code-unit-reverse-lookup/SECURITY.md @@ -0,0 +1,30 @@ +# Security Policy + +If you believe you have found a security vulnerability in the library that is developed in this repository, please report it to us through coordinated disclosure. + +**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** + +Instead, please email `sebastian@phpunit.de`. + +Please include as much of the information listed below as you can to help us better understand and resolve the issue: + +* The type of issue +* Full paths of source file(s) related to the manifestation of the issue +* The location of the affected source code (tag/branch/commit or direct URL) +* Any special configuration required to reproduce the issue +* Step-by-step instructions to reproduce the issue +* Proof-of-concept or exploit code (if possible) +* Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +## Web Context + +The library that is developed in this repository was either extracted from [PHPUnit](https://github.com/sebastianbergmann/phpunit) or developed specifically as a dependency for PHPUnit. + +The library is developed with a focus on development environments and the command-line. No specific testing or hardening with regard to using the library in an HTTP or web context or with untrusted input data is performed. The library might also contain functionality that intentionally exposes internal application data for debugging purposes. + +If the library is used in a web application, the application developer is responsible for filtering inputs or escaping outputs as necessary and for verifying that the used functionality is safe for use within the intended context. + +Vulnerabilities specific to the use outside a development context will be fixed as applicable, provided that the fix does not have an averse effect on the primary use case for development purposes. + diff --git a/vendor/sebastian/code-unit-reverse-lookup/composer.json b/vendor/sebastian/code-unit-reverse-lookup/composer.json new file mode 100644 index 0000000..bf05a9e --- /dev/null +++ b/vendor/sebastian/code-unit-reverse-lookup/composer.json @@ -0,0 +1,40 @@ +{ + "name": "sebastian/code-unit-reverse-lookup", + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "license": "BSD-3-Clause", + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy" + }, + "config": { + "platform": { + "php": "8.2.0" + }, + "optimize-autoloader": true, + "sort-packages": true + }, + "prefer-stable": true, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + } +} diff --git a/vendor/sebastian/code-unit-reverse-lookup/src/Wizard.php b/vendor/sebastian/code-unit-reverse-lookup/src/Wizard.php new file mode 100644 index 0000000..c4780ef --- /dev/null +++ b/vendor/sebastian/code-unit-reverse-lookup/src/Wizard.php @@ -0,0 +1,132 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace SebastianBergmann\CodeUnitReverseLookup; + +use function array_merge; +use function assert; +use function class_exists; +use function function_exists; +use function get_declared_classes; +use function get_declared_traits; +use function get_defined_functions; +use function is_array; +use function is_int; +use function is_string; +use function range; +use function trait_exists; +use ReflectionClass; +use ReflectionFunction; +use ReflectionMethod; + +final class Wizard +{ + /** + * @var array> + */ + private array $lookupTable = []; + + /** + * @var array + */ + private array $processedClasses = []; + + /** + * @var array + */ + private array $processedFunctions = []; + + public function lookup(string $filename, int $lineNumber): string + { + if (!isset($this->lookupTable[$filename][$lineNumber])) { + $this->updateLookupTable(); + } + + if (isset($this->lookupTable[$filename][$lineNumber])) { + return $this->lookupTable[$filename][$lineNumber]; + } + + return $filename . ':' . $lineNumber; + } + + private function updateLookupTable(): void + { + $this->processClassesAndTraits(); + $this->processFunctions(); + } + + private function processClassesAndTraits(): void + { + $classes = get_declared_classes(); + $traits = get_declared_traits(); + + assert(is_array($traits)); + + foreach (array_merge($classes, $traits) as $classOrTrait) { + assert(class_exists($classOrTrait) || trait_exists($classOrTrait)); + + if (isset($this->processedClasses[$classOrTrait])) { + continue; + } + + foreach ((new ReflectionClass($classOrTrait))->getMethods() as $method) { + $this->processFunctionOrMethod($method); + } + + $this->processedClasses[$classOrTrait] = true; + } + } + + private function processFunctions(): void + { + foreach (get_defined_functions()['user'] as $function) { + assert(function_exists($function)); + + if (isset($this->processedFunctions[$function])) { + continue; + } + + $this->processFunctionOrMethod(new ReflectionFunction($function)); + + $this->processedFunctions[$function] = true; + } + } + + private function processFunctionOrMethod(ReflectionFunction|ReflectionMethod $functionOrMethod): void + { + if ($functionOrMethod->isInternal()) { + return; + } + + $name = $functionOrMethod->getName(); + + if ($functionOrMethod instanceof ReflectionMethod) { + $name = $functionOrMethod->getDeclaringClass()->getName() . '::' . $name; + } + + $fileName = $functionOrMethod->getFileName(); + + assert(is_string($fileName)); + + if (!isset($this->lookupTable[$fileName])) { + $this->lookupTable[$fileName] = []; + } + + $startLine = $functionOrMethod->getStartLine(); + $endLine = $functionOrMethod->getEndLine(); + + assert(is_int($startLine)); + assert(is_int($endLine)); + assert($endLine >= $startLine); + + foreach (range($startLine, $endLine) as $line) { + $this->lookupTable[$fileName][$line] = $name; + } + } +} diff --git a/vendor/sebastian/code-unit/ChangeLog.md b/vendor/sebastian/code-unit/ChangeLog.md new file mode 100644 index 0000000..2e165a7 --- /dev/null +++ b/vendor/sebastian/code-unit/ChangeLog.md @@ -0,0 +1,99 @@ +# ChangeLog + +All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. + +## [3.0.2] - 2024-12-12 + +### Fixed + +* [#8](https://github.com/sebastianbergmann/code-unit/issues/8): `Mapper::stringToCodeUnits()` does not consider "inheritance" between traits + +## [3.0.1] - 2024-07-03 + +### Changed + +* This project now uses PHPStan instead of Psalm for static analysis + +## [3.0.0] - 2024-02-02 + +### Removed + +* This component is no longer supported on PHP 8.1 + +## [2.0.0] - 2023-02-03 + +### Added + +* Added `SebastianBergmann\CodeUnit\FileUnit` value object that represents a sourcecode file + +### Removed + +* `SebastianBergmann\CodeUnit\CodeUnitCollection::fromArray()` has been removed +* `SebastianBergmann\CodeUnit\Mapper::stringToCodeUnits()` no longer supports `ClassName<*>` +* This component is no longer supported on PHP 7.3, PHP 7.4, and PHP 8.0 + +## [1.0.8] - 2020-10-26 + +### Fixed + +* `SebastianBergmann\CodeUnit\Exception` now correctly extends `\Throwable` + +## [1.0.7] - 2020-10-02 + +### Fixed + +* `SebastianBergmann\CodeUnit\Mapper::stringToCodeUnits()` no longer attempts to create `CodeUnit` objects for code units that are not declared in userland + +## [1.0.6] - 2020-09-28 + +### Changed + +* Changed PHP version constraint in `composer.json` from `^7.3 || ^8.0` to `>=7.3` + +## [1.0.5] - 2020-06-26 + +### Fixed + +* [#3](https://github.com/sebastianbergmann/code-unit/issues/3): Regression in 1.0.4 + +## [1.0.4] - 2020-06-26 + +### Added + +* This component is now supported on PHP 8 + +## [1.0.3] - 2020-06-15 + +### Changed + +* Tests etc. are now ignored for archive exports + +## [1.0.2] - 2020-04-30 + +### Fixed + +* `Mapper::stringToCodeUnits()` raised the wrong exception for `Class::method` when a class named `Class` exists but does not have a method named `method` + +## [1.0.1] - 2020-04-27 + +### Fixed + +* [#2](https://github.com/sebastianbergmann/code-unit/issues/2): `Mapper::stringToCodeUnits()` breaks when `ClassName` is used for class that extends built-in class + +## [1.0.0] - 2020-03-30 + +* Initial release + +[3.0.2]: https://github.com/sebastianbergmann/code-unit/compare/3.0.1...3.0.2 +[3.0.1]: https://github.com/sebastianbergmann/code-unit/compare/3.0.0...3.0.1 +[3.0.0]: https://github.com/sebastianbergmann/code-unit/compare/2.0...3.0.0 +[2.0.0]: https://github.com/sebastianbergmann/code-unit/compare/1.0.8...2.0.0 +[1.0.8]: https://github.com/sebastianbergmann/code-unit/compare/1.0.7...1.0.8 +[1.0.7]: https://github.com/sebastianbergmann/code-unit/compare/1.0.6...1.0.7 +[1.0.6]: https://github.com/sebastianbergmann/code-unit/compare/1.0.5...1.0.6 +[1.0.5]: https://github.com/sebastianbergmann/code-unit/compare/1.0.4...1.0.5 +[1.0.4]: https://github.com/sebastianbergmann/code-unit/compare/1.0.3...1.0.4 +[1.0.3]: https://github.com/sebastianbergmann/code-unit/compare/1.0.2...1.0.3 +[1.0.2]: https://github.com/sebastianbergmann/code-unit/compare/1.0.1...1.0.2 +[1.0.1]: https://github.com/sebastianbergmann/code-unit/compare/1.0.0...1.0.1 +[1.0.0]: https://github.com/sebastianbergmann/code-unit/compare/530c3900e5db9bcb8516da545bef0d62536cedaa...1.0.0 diff --git a/vendor/sebastian/code-unit/LICENSE b/vendor/sebastian/code-unit/LICENSE new file mode 100644 index 0000000..edaedf6 --- /dev/null +++ b/vendor/sebastian/code-unit/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2020-2024, Sebastian Bergmann +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/sebastian/code-unit/README.md b/vendor/sebastian/code-unit/README.md new file mode 100644 index 0000000..1b6287a --- /dev/null +++ b/vendor/sebastian/code-unit/README.md @@ -0,0 +1,21 @@ +[![Latest Stable Version](https://poser.pugx.org/sebastian/code-unit/v)](https://packagist.org/packages/sebastian/code-unit) +[![CI Status](https://github.com/sebastianbergmann/code-unit/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/code-unit/actions) +[![codecov](https://codecov.io/gh/sebastianbergmann/code-unit/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/code-unit) + +# sebastian/code-unit + +Collection of value objects that represent the PHP code units. + +## Installation + +You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): + +``` +composer require sebastian/code-unit +``` + +If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: + +``` +composer require --dev sebastian/code-unit +``` diff --git a/vendor/sebastian/code-unit/SECURITY.md b/vendor/sebastian/code-unit/SECURITY.md new file mode 100644 index 0000000..d88ff00 --- /dev/null +++ b/vendor/sebastian/code-unit/SECURITY.md @@ -0,0 +1,30 @@ +# Security Policy + +If you believe you have found a security vulnerability in the library that is developed in this repository, please report it to us through coordinated disclosure. + +**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** + +Instead, please email `sebastian@phpunit.de`. + +Please include as much of the information listed below as you can to help us better understand and resolve the issue: + +* The type of issue +* Full paths of source file(s) related to the manifestation of the issue +* The location of the affected source code (tag/branch/commit or direct URL) +* Any special configuration required to reproduce the issue +* Step-by-step instructions to reproduce the issue +* Proof-of-concept or exploit code (if possible) +* Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +## Web Context + +The library that is developed in this repository was either extracted from [PHPUnit](https://github.com/sebastianbergmann/phpunit) or developed specifically as a dependency for PHPUnit. + +The library is developed with a focus on development environments and the command-line. No specific testing or hardening with regard to using the library in an HTTP or web context or with untrusted input data is performed. The library might also contain functionality that intentionally exposes internal application data for debugging purposes. + +If the library is used in a web application, the application developer is responsible for filtering inputs or escaping outputs as necessary and for verifying that the used functionality is safe for use within the intended context. + +Vulnerabilities specific to the use outside a development context will be fixed as applicable, provided that the fix does not have an averse effect on the primary use case for development purposes. + diff --git a/vendor/sebastian/code-unit/composer.json b/vendor/sebastian/code-unit/composer.json new file mode 100644 index 0000000..d97cfee --- /dev/null +++ b/vendor/sebastian/code-unit/composer.json @@ -0,0 +1,51 @@ +{ + "name": "sebastian/code-unit", + "description": "Collection of value objects that represent the PHP code units", + "type": "library", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "license": "BSD-3-Clause", + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "security": "https://github.com/sebastianbergmann/code-unit/security/policy" + }, + "prefer-stable": true, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.5" + }, + "config": { + "platform": { + "php": "8.2.0" + }, + "optimize-autoloader": true, + "sort-packages": true + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "autoload-dev": { + "classmap": [ + "tests/_fixture" + ], + "files": [ + "tests/_fixture/file_with_multiple_code_units.php", + "tests/_fixture/function.php" + ] + }, + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + } +} diff --git a/vendor/sebastian/code-unit/src/ClassMethodUnit.php b/vendor/sebastian/code-unit/src/ClassMethodUnit.php new file mode 100644 index 0000000..082c01e --- /dev/null +++ b/vendor/sebastian/code-unit/src/ClassMethodUnit.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace SebastianBergmann\CodeUnit; + +/** + * @immutable + */ +final readonly class ClassMethodUnit extends CodeUnit +{ + public function isClassMethod(): bool + { + return true; + } +} diff --git a/vendor/sebastian/code-unit/src/ClassUnit.php b/vendor/sebastian/code-unit/src/ClassUnit.php new file mode 100644 index 0000000..d9bc49d --- /dev/null +++ b/vendor/sebastian/code-unit/src/ClassUnit.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace SebastianBergmann\CodeUnit; + +/** + * @immutable + */ +final readonly class ClassUnit extends CodeUnit +{ + public function isClass(): bool + { + return true; + } +} diff --git a/vendor/sebastian/code-unit/src/CodeUnit.php b/vendor/sebastian/code-unit/src/CodeUnit.php new file mode 100644 index 0000000..e4e3b43 --- /dev/null +++ b/vendor/sebastian/code-unit/src/CodeUnit.php @@ -0,0 +1,528 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace SebastianBergmann\CodeUnit; + +use function assert; +use function count; +use function file; +use function file_exists; +use function is_readable; +use function range; +use function sprintf; +use ReflectionClass; +use ReflectionFunction; +use ReflectionMethod; + +/** + * @immutable + */ +abstract readonly class CodeUnit +{ + /** + * @var non-empty-string + */ + private string $name; + + /** + * @var non-empty-string + */ + private string $sourceFileName; + + /** + * @var list + */ + private array $sourceLines; + + /** + * @param class-string $className + * + * @throws InvalidCodeUnitException + * @throws ReflectionException + */ + public static function forClass(string $className): ClassUnit + { + self::ensureUserDefinedClass($className); + + $reflector = new ReflectionClass($className); + + return new ClassUnit( + $className, + // @phpstan-ignore argument.type + $reflector->getFileName(), + range( + // @phpstan-ignore argument.type + $reflector->getStartLine(), + // @phpstan-ignore argument.type + $reflector->getEndLine(), + ), + ); + } + + /** + * @param class-string $className + * + * @throws InvalidCodeUnitException + * @throws ReflectionException + */ + public static function forClassMethod(string $className, string $methodName): ClassMethodUnit + { + self::ensureUserDefinedClass($className); + + $reflector = self::reflectorForClassMethod($className, $methodName); + + return new ClassMethodUnit( + $className . '::' . $methodName, + // @phpstan-ignore argument.type + $reflector->getFileName(), + range( + // @phpstan-ignore argument.type + $reflector->getStartLine(), + // @phpstan-ignore argument.type + $reflector->getEndLine(), + ), + ); + } + + /** + * @param non-empty-string $path + * + * @throws InvalidCodeUnitException + */ + public static function forFileWithAbsolutePath(string $path): FileUnit + { + self::ensureFileExistsAndIsReadable($path); + + $lines = file($path); + + assert($lines !== false); + + return new FileUnit( + $path, + $path, + range( + 1, + count($lines), + ), + ); + } + + /** + * @param class-string $interfaceName + * + * @throws InvalidCodeUnitException + * @throws ReflectionException + */ + public static function forInterface(string $interfaceName): InterfaceUnit + { + self::ensureUserDefinedInterface($interfaceName); + + $reflector = new ReflectionClass($interfaceName); + + return new InterfaceUnit( + $interfaceName, + // @phpstan-ignore argument.type + $reflector->getFileName(), + range( + // @phpstan-ignore argument.type + $reflector->getStartLine(), + // @phpstan-ignore argument.type + $reflector->getEndLine(), + ), + ); + } + + /** + * @param class-string $interfaceName + * + * @throws InvalidCodeUnitException + * @throws ReflectionException + */ + public static function forInterfaceMethod(string $interfaceName, string $methodName): InterfaceMethodUnit + { + self::ensureUserDefinedInterface($interfaceName); + + $reflector = self::reflectorForClassMethod($interfaceName, $methodName); + + return new InterfaceMethodUnit( + $interfaceName . '::' . $methodName, + // @phpstan-ignore argument.type + $reflector->getFileName(), + range( + // @phpstan-ignore argument.type + $reflector->getStartLine(), + // @phpstan-ignore argument.type + $reflector->getEndLine(), + ), + ); + } + + /** + * @param class-string $traitName + * + * @throws InvalidCodeUnitException + * @throws ReflectionException + */ + public static function forTrait(string $traitName): TraitUnit + { + self::ensureUserDefinedTrait($traitName); + + $reflector = new ReflectionClass($traitName); + + return new TraitUnit( + $traitName, + // @phpstan-ignore argument.type + $reflector->getFileName(), + range( + // @phpstan-ignore argument.type + $reflector->getStartLine(), + // @phpstan-ignore argument.type + $reflector->getEndLine(), + ), + ); + } + + /** + * @param class-string $traitName + * + * @throws InvalidCodeUnitException + * @throws ReflectionException + */ + public static function forTraitMethod(string $traitName, string $methodName): TraitMethodUnit + { + self::ensureUserDefinedTrait($traitName); + + $reflector = self::reflectorForClassMethod($traitName, $methodName); + + return new TraitMethodUnit( + $traitName . '::' . $methodName, + // @phpstan-ignore argument.type + $reflector->getFileName(), + range( + // @phpstan-ignore argument.type + $reflector->getStartLine(), + // @phpstan-ignore argument.type + $reflector->getEndLine(), + ), + ); + } + + /** + * @param callable-string $functionName + * + * @throws InvalidCodeUnitException + * @throws ReflectionException + */ + public static function forFunction(string $functionName): FunctionUnit + { + $reflector = self::reflectorForFunction($functionName); + + if (!$reflector->isUserDefined()) { + throw new InvalidCodeUnitException( + sprintf( + '"%s" is not a user-defined function', + $functionName, + ), + ); + } + + return new FunctionUnit( + // @phpstan-ignore argument.type + $functionName, + // @phpstan-ignore argument.type + $reflector->getFileName(), + range( + // @phpstan-ignore argument.type + $reflector->getStartLine(), + // @phpstan-ignore argument.type + $reflector->getEndLine(), + ), + ); + } + + /** + * @param non-empty-string $name + * @param non-empty-string $sourceFileName + * @param list $sourceLines + */ + private function __construct(string $name, string $sourceFileName, array $sourceLines) + { + $this->name = $name; + $this->sourceFileName = $sourceFileName; + $this->sourceLines = $sourceLines; + } + + /** + * @return non-empty-string + */ + public function name(): string + { + return $this->name; + } + + /** + * @return non-empty-string + */ + public function sourceFileName(): string + { + return $this->sourceFileName; + } + + /** + * @return list + */ + public function sourceLines(): array + { + return $this->sourceLines; + } + + /** + * @phpstan-assert-if-true ClassUnit $this + */ + public function isClass(): bool + { + return false; + } + + /** + * @phpstan-assert-if-true ClassMethodUnit $this + */ + public function isClassMethod(): bool + { + return false; + } + + /** + * @phpstan-assert-if-true InterfaceUnit $this + */ + public function isInterface(): bool + { + return false; + } + + /** + * @phpstan-assert-if-true InterfaceMethodUnit $this + */ + public function isInterfaceMethod(): bool + { + return false; + } + + /** + * @phpstan-assert-if-true TraitUnit $this + */ + public function isTrait(): bool + { + return false; + } + + /** + * @phpstan-assert-if-true TraitMethodUnit $this + */ + public function isTraitMethod(): bool + { + return false; + } + + /** + * @phpstan-assert-if-true FunctionUnit $this + */ + public function isFunction(): bool + { + return false; + } + + /** + * @phpstan-assert-if-true FileUnit $this + */ + public function isFile(): bool + { + return false; + } + + /** + * @param non-empty-string $path + * + * @throws InvalidCodeUnitException + */ + private static function ensureFileExistsAndIsReadable(string $path): void + { + if (!(file_exists($path) && is_readable($path))) { + throw new InvalidCodeUnitException( + sprintf( + 'File "%s" does not exist or is not readable', + $path, + ), + ); + } + } + + /** + * @param class-string $className + * + * @throws InvalidCodeUnitException + */ + private static function ensureUserDefinedClass(string $className): void + { + try { + $reflector = new ReflectionClass($className); + + if ($reflector->isInterface()) { + throw new InvalidCodeUnitException( + sprintf( + '"%s" is an interface and not a class', + $className, + ), + ); + } + + if ($reflector->isTrait()) { + throw new InvalidCodeUnitException( + sprintf( + '"%s" is a trait and not a class', + $className, + ), + ); + } + + if (!$reflector->isUserDefined()) { + throw new InvalidCodeUnitException( + sprintf( + '"%s" is not a user-defined class', + $className, + ), + ); + } + // @codeCoverageIgnoreStart + } catch (\ReflectionException $e) { + throw new ReflectionException( + $e->getMessage(), + $e->getCode(), + $e, + ); + } + // @codeCoverageIgnoreEnd + } + + /** + * @param class-string $interfaceName + * + * @throws InvalidCodeUnitException + */ + private static function ensureUserDefinedInterface(string $interfaceName): void + { + try { + $reflector = new ReflectionClass($interfaceName); + + if (!$reflector->isInterface()) { + throw new InvalidCodeUnitException( + sprintf( + '"%s" is not an interface', + $interfaceName, + ), + ); + } + + if (!$reflector->isUserDefined()) { + throw new InvalidCodeUnitException( + sprintf( + '"%s" is not a user-defined interface', + $interfaceName, + ), + ); + } + // @codeCoverageIgnoreStart + } catch (\ReflectionException $e) { + throw new ReflectionException( + $e->getMessage(), + $e->getCode(), + $e, + ); + } + // @codeCoverageIgnoreEnd + } + + /** + * @param class-string $traitName + * + * @throws InvalidCodeUnitException + */ + private static function ensureUserDefinedTrait(string $traitName): void + { + try { + $reflector = new ReflectionClass($traitName); + + if (!$reflector->isTrait()) { + throw new InvalidCodeUnitException( + sprintf( + '"%s" is not a trait', + $traitName, + ), + ); + } + + // @codeCoverageIgnoreStart + if (!$reflector->isUserDefined()) { + throw new InvalidCodeUnitException( + sprintf( + '"%s" is not a user-defined trait', + $traitName, + ), + ); + } + } catch (\ReflectionException $e) { + throw new ReflectionException( + $e->getMessage(), + $e->getCode(), + $e, + ); + } + // @codeCoverageIgnoreEnd + } + + /** + * @param class-string $className + * + * @throws ReflectionException + */ + private static function reflectorForClassMethod(string $className, string $methodName): ReflectionMethod + { + try { + return new ReflectionMethod($className, $methodName); + // @codeCoverageIgnoreStart + } catch (\ReflectionException $e) { + throw new ReflectionException( + $e->getMessage(), + $e->getCode(), + $e, + ); + } + // @codeCoverageIgnoreEnd + } + + /** + * @param callable-string $functionName + * + * @throws ReflectionException + */ + private static function reflectorForFunction(string $functionName): ReflectionFunction + { + try { + return new ReflectionFunction($functionName); + // @codeCoverageIgnoreStart + } catch (\ReflectionException $e) { + throw new ReflectionException( + $e->getMessage(), + $e->getCode(), + $e, + ); + } + // @codeCoverageIgnoreEnd + } +} diff --git a/vendor/sebastian/code-unit/src/CodeUnitCollection.php b/vendor/sebastian/code-unit/src/CodeUnitCollection.php new file mode 100644 index 0000000..083bdb7 --- /dev/null +++ b/vendor/sebastian/code-unit/src/CodeUnitCollection.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace SebastianBergmann\CodeUnit; + +use function array_merge; +use function count; +use Countable; +use IteratorAggregate; + +/** + * @template-implements IteratorAggregate + * + * @immutable + */ +final readonly class CodeUnitCollection implements Countable, IteratorAggregate +{ + /** + * @var list + */ + private array $codeUnits; + + public static function fromList(CodeUnit ...$codeUnits): self + { + // @phpstan-ignore argument.type + return new self($codeUnits); + } + + /** + * @param list $codeUnits + */ + private function __construct(array $codeUnits) + { + $this->codeUnits = $codeUnits; + } + + /** + * @return list + */ + public function asArray(): array + { + return $this->codeUnits; + } + + public function getIterator(): CodeUnitCollectionIterator + { + return new CodeUnitCollectionIterator($this); + } + + public function count(): int + { + return count($this->codeUnits); + } + + public function isEmpty(): bool + { + return empty($this->codeUnits); + } + + public function mergeWith(self $other): self + { + return new self( + array_merge( + $this->asArray(), + $other->asArray(), + ), + ); + } +} diff --git a/vendor/sebastian/code-unit/src/CodeUnitCollectionIterator.php b/vendor/sebastian/code-unit/src/CodeUnitCollectionIterator.php new file mode 100644 index 0000000..c63fe08 --- /dev/null +++ b/vendor/sebastian/code-unit/src/CodeUnitCollectionIterator.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace SebastianBergmann\CodeUnit; + +use Iterator; + +/** + * @template-implements Iterator + */ +final class CodeUnitCollectionIterator implements Iterator +{ + /** + * @var list + */ + private array $codeUnits; + private int $position = 0; + + public function __construct(CodeUnitCollection $collection) + { + $this->codeUnits = $collection->asArray(); + } + + public function rewind(): void + { + $this->position = 0; + } + + public function valid(): bool + { + return isset($this->codeUnits[$this->position]); + } + + public function key(): int + { + return $this->position; + } + + public function current(): CodeUnit + { + return $this->codeUnits[$this->position]; + } + + public function next(): void + { + $this->position++; + } +} diff --git a/vendor/sebastian/code-unit/src/FileUnit.php b/vendor/sebastian/code-unit/src/FileUnit.php new file mode 100644 index 0000000..cea630c --- /dev/null +++ b/vendor/sebastian/code-unit/src/FileUnit.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace SebastianBergmann\CodeUnit; + +/** + * @immutable + */ +final readonly class FileUnit extends CodeUnit +{ + public function isFile(): bool + { + return true; + } +} diff --git a/vendor/sebastian/code-unit/src/FunctionUnit.php b/vendor/sebastian/code-unit/src/FunctionUnit.php new file mode 100644 index 0000000..203ded3 --- /dev/null +++ b/vendor/sebastian/code-unit/src/FunctionUnit.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace SebastianBergmann\CodeUnit; + +/** + * @immutable + */ +final readonly class FunctionUnit extends CodeUnit +{ + public function isFunction(): bool + { + return true; + } +} diff --git a/vendor/sebastian/code-unit/src/InterfaceMethodUnit.php b/vendor/sebastian/code-unit/src/InterfaceMethodUnit.php new file mode 100644 index 0000000..4322f86 --- /dev/null +++ b/vendor/sebastian/code-unit/src/InterfaceMethodUnit.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace SebastianBergmann\CodeUnit; + +/** + * @immutable + */ +final readonly class InterfaceMethodUnit extends CodeUnit +{ + public function isInterfaceMethod(): bool + { + return true; + } +} diff --git a/vendor/sebastian/code-unit/src/InterfaceUnit.php b/vendor/sebastian/code-unit/src/InterfaceUnit.php new file mode 100644 index 0000000..33b3d7e --- /dev/null +++ b/vendor/sebastian/code-unit/src/InterfaceUnit.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace SebastianBergmann\CodeUnit; + +/** + * @immutable + */ +final readonly class InterfaceUnit extends CodeUnit +{ + public function isInterface(): bool + { + return true; + } +} diff --git a/vendor/sebastian/code-unit/src/Mapper.php b/vendor/sebastian/code-unit/src/Mapper.php new file mode 100644 index 0000000..7324c46 --- /dev/null +++ b/vendor/sebastian/code-unit/src/Mapper.php @@ -0,0 +1,202 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace SebastianBergmann\CodeUnit; + +use function array_keys; +use function array_merge; +use function array_unique; +use function array_values; +use function class_exists; +use function explode; +use function function_exists; +use function interface_exists; +use function ksort; +use function method_exists; +use function sort; +use function sprintf; +use function str_contains; +use function trait_exists; +use ReflectionClass; +use ReflectionFunction; +use ReflectionMethod; + +final class Mapper +{ + /** + * @return array> + */ + public function codeUnitsToSourceLines(CodeUnitCollection $codeUnits): array + { + $result = []; + + foreach ($codeUnits as $codeUnit) { + $sourceFileName = $codeUnit->sourceFileName(); + + if (!isset($result[$sourceFileName])) { + $result[$sourceFileName] = []; + } + + $result[$sourceFileName] = array_merge($result[$sourceFileName], $codeUnit->sourceLines()); + } + + foreach (array_keys($result) as $sourceFileName) { + $result[$sourceFileName] = array_values(array_unique($result[$sourceFileName])); + + sort($result[$sourceFileName]); + } + + ksort($result); + + return $result; + } + + /** + * @throws InvalidCodeUnitException + * @throws ReflectionException + */ + public function stringToCodeUnits(string $unit): CodeUnitCollection + { + if (str_contains($unit, '::')) { + [$firstPart, $secondPart] = explode('::', $unit); + + if ($this->isUserDefinedFunction($secondPart)) { + return CodeUnitCollection::fromList(CodeUnit::forFunction($secondPart)); + } + + if ($this->isUserDefinedMethod($firstPart, $secondPart)) { + return CodeUnitCollection::fromList(CodeUnit::forClassMethod($firstPart, $secondPart)); + } + + if ($this->isUserDefinedInterface($firstPart)) { + return CodeUnitCollection::fromList(CodeUnit::forInterfaceMethod($firstPart, $secondPart)); + } + + if ($this->isUserDefinedTrait($firstPart)) { + return CodeUnitCollection::fromList(CodeUnit::forTraitMethod($firstPart, $secondPart)); + } + } else { + if ($this->isUserDefinedClass($unit)) { + return CodeUnitCollection::fromList( + ...array_merge( + [CodeUnit::forClass($unit)], + $this->traits(new ReflectionClass($unit)), + ), + ); + } + + if ($this->isUserDefinedInterface($unit)) { + return CodeUnitCollection::fromList(CodeUnit::forInterface($unit)); + } + + if ($this->isUserDefinedTrait($unit)) { + return CodeUnitCollection::fromList(CodeUnit::forTrait($unit)); + } + + if ($this->isUserDefinedFunction($unit)) { + return CodeUnitCollection::fromList(CodeUnit::forFunction($unit)); + } + } + + throw new InvalidCodeUnitException( + sprintf( + '"%s" is not a valid code unit', + $unit, + ), + ); + } + + /** + * @phpstan-assert-if-true callable-string $functionName + */ + private function isUserDefinedFunction(string $functionName): bool + { + if (!function_exists($functionName)) { + return false; + } + + return (new ReflectionFunction($functionName))->isUserDefined(); + } + + /** + * @phpstan-assert-if-true class-string $className + */ + private function isUserDefinedClass(string $className): bool + { + if (!class_exists($className)) { + return false; + } + + return (new ReflectionClass($className))->isUserDefined(); + } + + /** + * @phpstan-assert-if-true interface-string $interfaceName + */ + private function isUserDefinedInterface(string $interfaceName): bool + { + if (!interface_exists($interfaceName)) { + return false; + } + + return (new ReflectionClass($interfaceName))->isUserDefined(); + } + + /** + * @phpstan-assert-if-true trait-string $traitName + */ + private function isUserDefinedTrait(string $traitName): bool + { + if (!trait_exists($traitName)) { + return false; + } + + return (new ReflectionClass($traitName))->isUserDefined(); + } + + /** + * @phpstan-assert-if-true class-string $className + */ + private function isUserDefinedMethod(string $className, string $methodName): bool + { + if (!class_exists($className)) { + return false; + } + + if (!method_exists($className, $methodName)) { + return false; + } + + return (new ReflectionMethod($className, $methodName))->isUserDefined(); + } + + /** + * @param ReflectionClass $class + * + * @return list + */ + private function traits(ReflectionClass $class): array + { + $result = []; + + foreach ($class->getTraits() as $trait) { + if (!$trait->isUserDefined()) { + // @codeCoverageIgnoreStart + continue; + // @codeCoverageIgnoreEnd + } + + $result[] = CodeUnit::forTrait($trait->getName()); + + $result = array_merge($result, $this->traits($trait)); + } + + return $result; + } +} diff --git a/vendor/sebastian/code-unit/src/TraitMethodUnit.php b/vendor/sebastian/code-unit/src/TraitMethodUnit.php new file mode 100644 index 0000000..b96c620 --- /dev/null +++ b/vendor/sebastian/code-unit/src/TraitMethodUnit.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace SebastianBergmann\CodeUnit; + +/** + * @immutable + */ +final readonly class TraitMethodUnit extends CodeUnit +{ + public function isTraitMethod(): bool + { + return true; + } +} diff --git a/vendor/sebastian/code-unit/src/TraitUnit.php b/vendor/sebastian/code-unit/src/TraitUnit.php new file mode 100644 index 0000000..baaf17c --- /dev/null +++ b/vendor/sebastian/code-unit/src/TraitUnit.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace SebastianBergmann\CodeUnit; + +/** + * @immutable + */ +final readonly class TraitUnit extends CodeUnit +{ + public function isTrait(): bool + { + return true; + } +} diff --git a/vendor/sebastian/code-unit/src/exceptions/Exception.php b/vendor/sebastian/code-unit/src/exceptions/Exception.php new file mode 100644 index 0000000..74d0eee --- /dev/null +++ b/vendor/sebastian/code-unit/src/exceptions/Exception.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace SebastianBergmann\CodeUnit; + +use Throwable; + +interface Exception extends Throwable +{ +} diff --git a/vendor/sebastian/code-unit/src/exceptions/InvalidCodeUnitException.php b/vendor/sebastian/code-unit/src/exceptions/InvalidCodeUnitException.php new file mode 100644 index 0000000..60a3da8 --- /dev/null +++ b/vendor/sebastian/code-unit/src/exceptions/InvalidCodeUnitException.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace SebastianBergmann\CodeUnit; + +use RuntimeException; + +final class InvalidCodeUnitException extends RuntimeException implements Exception +{ +} diff --git a/vendor/sebastian/code-unit/src/exceptions/NoTraitException.php b/vendor/sebastian/code-unit/src/exceptions/NoTraitException.php new file mode 100644 index 0000000..e9b9b9c --- /dev/null +++ b/vendor/sebastian/code-unit/src/exceptions/NoTraitException.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace SebastianBergmann\CodeUnit; + +use RuntimeException; + +final class NoTraitException extends RuntimeException implements Exception +{ +} diff --git a/vendor/sebastian/code-unit/src/exceptions/ReflectionException.php b/vendor/sebastian/code-unit/src/exceptions/ReflectionException.php new file mode 100644 index 0000000..2320127 --- /dev/null +++ b/vendor/sebastian/code-unit/src/exceptions/ReflectionException.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace SebastianBergmann\CodeUnit; + +use RuntimeException; + +final class ReflectionException extends RuntimeException implements Exception +{ +} diff --git a/vendor/sebastian/comparator/ChangeLog.md b/vendor/sebastian/comparator/ChangeLog.md index 5ffd2a9..eaf1a75 100644 --- a/vendor/sebastian/comparator/ChangeLog.md +++ b/vendor/sebastian/comparator/ChangeLog.md @@ -2,12 +2,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. -## [7.0.0] - 2025-02-07 - -### Removed - -* Removed support for PHP 8.2 - ## [6.3.0] - 2025-01-06 ### Added @@ -210,7 +204,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * Added `SebastianBergmann\Comparator\Factory::reset()` to unregister all non-default comparators * Added support for `phpunit/phpunit-mock-objects` version `^5.0` -[7.0.0]: https://github.com/sebastianbergmann/comparator/compare/6.3...main [6.3.0]: https://github.com/sebastianbergmann/comparator/compare/6.2.1...6.3.0 [6.2.1]: https://github.com/sebastianbergmann/comparator/compare/6.2.0...6.2.1 [6.2.0]: https://github.com/sebastianbergmann/comparator/compare/6.1.1...6.2.0 diff --git a/vendor/sebastian/comparator/composer.json b/vendor/sebastian/comparator/composer.json index 736c0c2..1b1d957 100644 --- a/vendor/sebastian/comparator/composer.json +++ b/vendor/sebastian/comparator/composer.json @@ -26,12 +26,11 @@ "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy" }, - "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.3", - "sebastian/diff": "^7.0", - "sebastian/exporter": "^7.0", + "php": ">=8.2", + "sebastian/diff": "^6.0", + "sebastian/exporter": "^6.0", "ext-dom": "*", "ext-mbstring": "*" }, @@ -39,11 +38,11 @@ "ext-bcmath": "For comparing BcMath\\Number objects" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.4" }, "config": { "platform": { - "php": "8.3.0" + "php": "8.2.0" }, "optimize-autoloader": true, "sort-packages": true @@ -60,7 +59,8 @@ }, "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.2-dev" } } } + diff --git a/vendor/sebastian/comparator/src/ScalarComparator.php b/vendor/sebastian/comparator/src/ScalarComparator.php index 0707d25..10baf81 100644 --- a/vendor/sebastian/comparator/src/ScalarComparator.php +++ b/vendor/sebastian/comparator/src/ScalarComparator.php @@ -25,8 +25,8 @@ use SebastianBergmann\Exporter\Exporter; */ class ScalarComparator extends Comparator { - private const int OVERLONG_THRESHOLD = 40; - private const int KEEP_CONTEXT_CHARS = 25; + private const OVERLONG_THRESHOLD = 40; + private const KEEP_CONTEXT_CHARS = 25; public function accepts(mixed $expected, mixed $actual): bool { diff --git a/vendor/sebastian/complexity/ChangeLog.md b/vendor/sebastian/complexity/ChangeLog.md index be07746..b71d4df 100644 --- a/vendor/sebastian/complexity/ChangeLog.md +++ b/vendor/sebastian/complexity/ChangeLog.md @@ -2,12 +2,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. -## [5.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - ## [4.0.1] - 2024-07-03 ### Changed @@ -78,7 +72,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * Initial release -[5.0.0]: https://github.com/sebastianbergmann/complexity/compare/4.0...main [4.0.1]: https://github.com/sebastianbergmann/complexity/compare/4.0.0...4.0.1 [4.0.0]: https://github.com/sebastianbergmann/complexity/compare/3.2...4.0.0 [3.2.0]: https://github.com/sebastianbergmann/complexity/compare/3.1.0...3.2.0 diff --git a/vendor/sebastian/complexity/LICENSE b/vendor/sebastian/complexity/LICENSE index 0d534da..edaedf6 100644 --- a/vendor/sebastian/complexity/LICENSE +++ b/vendor/sebastian/complexity/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2020-2025, Sebastian Bergmann +Copyright (c) 2020-2024, Sebastian Bergmann All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/sebastian/complexity/README.md b/vendor/sebastian/complexity/README.md index 7293280..3c2e263 100644 --- a/vendor/sebastian/complexity/README.md +++ b/vendor/sebastian/complexity/README.md @@ -1,4 +1,4 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/complexity/v)](https://packagist.org/packages/sebastian/complexity) +[![Latest Stable Version](https://poser.pugx.org/sebastian/complexity/v/stable.png)](https://packagist.org/packages/sebastian/complexity) [![CI Status](https://github.com/sebastianbergmann/complexity/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/complexity/actions) [![codecov](https://codecov.io/gh/sebastianbergmann/complexity/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/complexity) diff --git a/vendor/sebastian/complexity/composer.json b/vendor/sebastian/complexity/composer.json index ac44dea..55ebd47 100644 --- a/vendor/sebastian/complexity/composer.json +++ b/vendor/sebastian/complexity/composer.json @@ -15,18 +15,17 @@ "issues": "https://github.com/sebastianbergmann/complexity/issues", "security": "https://github.com/sebastianbergmann/complexity/security/policy" }, - "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.3", + "php": ">=8.2", "nikic/php-parser": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, "config": { "platform": { - "php": "8.3.0" + "php": "8.2.0" }, "optimize-autoloader": true, "sort-packages": true @@ -38,7 +37,7 @@ }, "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "4.0-dev" } } } diff --git a/vendor/sebastian/complexity/src/Calculator.php b/vendor/sebastian/complexity/src/Calculator.php index 546cbd7..66af339 100644 --- a/vendor/sebastian/complexity/src/Calculator.php +++ b/vendor/sebastian/complexity/src/Calculator.php @@ -51,6 +51,7 @@ final class Calculator assert($nodes !== null); return $this->calculateForAbstractSyntaxTree($nodes); + // @codeCoverageIgnoreStart } catch (Error $error) { throw new RuntimeException( diff --git a/vendor/sebastian/complexity/src/Complexity/ComplexityCollection.php b/vendor/sebastian/complexity/src/Complexity/ComplexityCollection.php index 90fc4d0..99326c6 100644 --- a/vendor/sebastian/complexity/src/Complexity/ComplexityCollection.php +++ b/vendor/sebastian/complexity/src/Complexity/ComplexityCollection.php @@ -32,7 +32,7 @@ final readonly class ComplexityCollection implements Countable, IteratorAggregat public static function fromList(Complexity ...$items): self { - return new self(array_values($items)); + return new self($items); } /** diff --git a/vendor/sebastian/complexity/src/Visitor/ComplexityCalculatingVisitor.php b/vendor/sebastian/complexity/src/Visitor/ComplexityCalculatingVisitor.php index 41ef2f0..1db93e2 100644 --- a/vendor/sebastian/complexity/src/Visitor/ComplexityCalculatingVisitor.php +++ b/vendor/sebastian/complexity/src/Visitor/ComplexityCalculatingVisitor.php @@ -13,6 +13,7 @@ use function assert; use function is_array; use PhpParser\Node; use PhpParser\Node\Expr\New_; +use PhpParser\Node\Name; use PhpParser\Node\Stmt; use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassMethod; @@ -110,6 +111,7 @@ final class ComplexityCalculatingVisitor extends NodeVisitorAbstract } assert(isset($parent->namespacedName)); + assert($parent->namespacedName instanceof Name); return $parent->namespacedName->toString() . '::' . $node->name->toString(); } @@ -120,7 +122,12 @@ final class ComplexityCalculatingVisitor extends NodeVisitorAbstract private function functionName(Function_ $node): string { assert(isset($node->namespacedName)); + assert($node->namespacedName instanceof Name); - return $node->namespacedName->toString(); + $functionName = $node->namespacedName->toString(); + + assert($functionName !== ''); + + return $functionName; } } diff --git a/vendor/sebastian/complexity/src/Visitor/CyclomaticComplexityCalculatingVisitor.php b/vendor/sebastian/complexity/src/Visitor/CyclomaticComplexityCalculatingVisitor.php index a5dd5fb..3e5d26d 100644 --- a/vendor/sebastian/complexity/src/Visitor/CyclomaticComplexityCalculatingVisitor.php +++ b/vendor/sebastian/complexity/src/Visitor/CyclomaticComplexityCalculatingVisitor.php @@ -31,7 +31,7 @@ final class CyclomaticComplexityCalculatingVisitor extends NodeVisitorAbstract */ private int $cyclomaticComplexity = 1; - public function enterNode(Node $node): null + public function enterNode(Node $node): void { switch ($node::class) { case BooleanAnd::class: @@ -49,8 +49,6 @@ final class CyclomaticComplexityCalculatingVisitor extends NodeVisitorAbstract case While_::class: $this->cyclomaticComplexity++; } - - return null; } /** diff --git a/vendor/sebastian/diff/ChangeLog.md b/vendor/sebastian/diff/ChangeLog.md index 13affdb..b12b993 100644 --- a/vendor/sebastian/diff/ChangeLog.md +++ b/vendor/sebastian/diff/ChangeLog.md @@ -2,12 +2,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. -## [7.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.3 - ## [6.0.2] - 2024-07-03 ### Changed @@ -27,7 +21,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * `SebastianBergmann\Diff\Chunk::getStart()`, `SebastianBergmann\Diff\Chunk::getStartRange()`, `SebastianBergmann\Diff\Chunk::getEnd()`, `SebastianBergmann\Diff\Chunk::getEndRange()`, and `SebastianBergmann\Diff\Chunk::getLines()` * `SebastianBergmann\Diff\Diff::getFrom()`, `SebastianBergmann\Diff\Diff::getTo()`, and `SebastianBergmann\Diff\Diff::getChunks()` * `SebastianBergmann\Diff\Line::getContent()` and `SebastianBergmann\Diff\Diff::getType()` -* This component is no longer supported on PHP 8.1 +* Removed support for PHP 8.1 ## [5.1.1] - 2024-03-02 @@ -81,7 +75,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt ### Removed -* This component is no longer supported on PHP 7.3, PHP 7.4, and PHP 8.0 +* Removed support for PHP 7.3, PHP 7.4, and PHP 8.0 ## [4.0.4] - 2020-10-26 @@ -111,7 +105,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt ### Removed -* This component is no longer supported on PHP 7.1 and PHP 7.2 +* Removed support for PHP 7.1 and PHP 7.2 ## [3.0.2] - 2019-02-04 @@ -135,7 +129,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt ### Removed -* This component is no longer supported on PHP 7.0 +* Removed support for PHP 7.0 ### Fixed @@ -157,7 +151,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * This component is no longer supported on PHP 5.6 -[7.0.0]: https://github.com/sebastianbergmann/diff/compare/6.0...main [6.0.2]: https://github.com/sebastianbergmann/diff/compare/6.0.1...6.0.2 [6.0.1]: https://github.com/sebastianbergmann/diff/compare/6.0.0...6.0.1 [6.0.0]: https://github.com/sebastianbergmann/diff/compare/5.1...6.0.0 diff --git a/vendor/sebastian/diff/LICENSE b/vendor/sebastian/diff/LICENSE index c5268a9..5b4705a 100644 --- a/vendor/sebastian/diff/LICENSE +++ b/vendor/sebastian/diff/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2002-2025, Sebastian Bergmann +Copyright (c) 2002-2024, Sebastian Bergmann All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/sebastian/diff/README.md b/vendor/sebastian/diff/README.md index 6688692..7b71024 100644 --- a/vendor/sebastian/diff/README.md +++ b/vendor/sebastian/diff/README.md @@ -1,4 +1,4 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/diff/v)](https://packagist.org/packages/sebastian/diff) +[![Latest Stable Version](https://poser.pugx.org/sebastian/diff/v/stable.png)](https://packagist.org/packages/sebastian/diff) [![CI Status](https://github.com/sebastianbergmann/diff/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/diff/actions) [![codecov](https://codecov.io/gh/sebastianbergmann/diff/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/diff) @@ -27,17 +27,14 @@ composer require --dev sebastian/diff The `Differ` class can be used to generate a textual representation of the difference between two strings: ```php -diff('foo', 'bar'); ``` The code above yields the output below: - ```diff --- Original +++ New @@ -46,16 +43,73 @@ The code above yields the output below: +bar ``` -The `UnifiedDiffOutputBuilder` used in the example above generates output in "unified diff" -format and is used by PHPUnit, for example. +There are three output builders available in this package: -The `StrictUnifiedDiffOutputBuilder` generates output in "strict unified diff" format with -hunks, similar to `diff -u` and compatible with `patch` or `git apply`. +#### UnifiedDiffOutputBuilder -The `DiffOnlyOutputBuilder` generates output that only contains the lines that differ. +This is default builder, which generates the output close to udiff and is used by PHPUnit. -If none of these three output builders match your use case then you can implement -`DiffOutputBuilderInterface` to generate custom output. +```php +diff('foo', 'bar'); +``` + +#### StrictUnifiedDiffOutputBuilder + +Generates (strict) Unified diff's (unidiffs) with hunks, +similar to `diff -u` and compatible with `patch` and `git apply`. + +```php + true, // ranges of length one are rendered with the trailing `,1` + 'commonLineThreshold' => 6, // number of same lines before ending a new hunk and creating a new one (if needed) + 'contextLines' => 3, // like `diff: -u, -U NUM, --unified[=NUM]`, for patch/git apply compatibility best to keep at least @ 3 + 'fromFile' => '', + 'fromFileDate' => null, + 'toFile' => '', + 'toFileDate' => null, +]); + +$differ = new Differ($builder); +print $differ->diff('foo', 'bar'); +``` + +#### DiffOnlyOutputBuilder + +Output only the lines that differ. + +```php +diff('foo', 'bar'); +``` + +#### DiffOutputBuilderInterface + +You can pass any output builder to the `Differ` class as longs as it implements the `DiffOutputBuilderInterface`. #### Parsing diff diff --git a/vendor/sebastian/diff/composer.json b/vendor/sebastian/diff/composer.json index 3bdf62e..7e19a7d 100644 --- a/vendor/sebastian/diff/composer.json +++ b/vendor/sebastian/diff/composer.json @@ -18,20 +18,19 @@ "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy" }, - "minimum-stability": "dev", "prefer-stable": true, "config": { "platform": { - "php": "8.3.0" + "php": "8.2.0" }, "optimize-autoloader": true, "sort-packages": true }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev", + "phpunit/phpunit": "^11.0", "symfony/process": "^4.2 || ^5" }, "autoload": { @@ -46,7 +45,7 @@ }, "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.0-dev" } } } diff --git a/vendor/sebastian/diff/src/Chunk.php b/vendor/sebastian/diff/src/Chunk.php index 18b5ce1..8d1854e 100644 --- a/vendor/sebastian/diff/src/Chunk.php +++ b/vendor/sebastian/diff/src/Chunk.php @@ -73,6 +73,12 @@ final class Chunk implements IteratorAggregate */ public function setLines(array $lines): void { + foreach ($lines as $line) { + if (!$line instanceof Line) { + throw new InvalidArgumentException; + } + } + $this->lines = $lines; } diff --git a/vendor/sebastian/diff/src/Differ.php b/vendor/sebastian/diff/src/Differ.php index 44a4b44..86bd96c 100644 --- a/vendor/sebastian/diff/src/Differ.php +++ b/vendor/sebastian/diff/src/Differ.php @@ -30,11 +30,11 @@ use SebastianBergmann\Diff\Output\DiffOutputBuilderInterface; final class Differ { - public const int OLD = 0; - public const int ADDED = 1; - public const int REMOVED = 2; - public const int DIFF_LINE_END_WARNING = 3; - public const int NO_LINE_END_EOF_WARNING = 4; + public const OLD = 0; + public const ADDED = 1; + public const REMOVED = 2; + public const DIFF_LINE_END_WARNING = 3; + public const NO_LINE_END_EOF_WARNING = 4; private DiffOutputBuilderInterface $outputBuilder; public function __construct(DiffOutputBuilderInterface $outputBuilder) @@ -84,11 +84,11 @@ final class Differ reset($to); foreach ($common as $token) { - while ((/* from-token */ reset($from)) !== $token) { + while (($fromToken = reset($from)) !== $token) { $diff[] = [array_shift($from), self::REMOVED]; } - while ((/* to-token */ reset($to)) !== $token) { + while (($toToken = reset($to)) !== $token) { $diff[] = [array_shift($to), self::ADDED]; } @@ -137,7 +137,7 @@ final class Differ return new TimeEfficientLongestCommonSubsequenceCalculator; } - private function calculateEstimatedFootprint(array $from, array $to): int + private function calculateEstimatedFootprint(array $from, array $to): float|int { $itemSize = PHP_INT_SIZE === 4 ? 76 : 144; diff --git a/vendor/sebastian/diff/src/Line.php b/vendor/sebastian/diff/src/Line.php index 6576bee..be544f0 100644 --- a/vendor/sebastian/diff/src/Line.php +++ b/vendor/sebastian/diff/src/Line.php @@ -11,9 +11,9 @@ namespace SebastianBergmann\Diff; final class Line { - public const int ADDED = 1; - public const int REMOVED = 2; - public const int UNCHANGED = 3; + public const ADDED = 1; + public const REMOVED = 2; + public const UNCHANGED = 3; private int $type; private string $content; diff --git a/vendor/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php b/vendor/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php index c948923..b9846c3 100644 --- a/vendor/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php +++ b/vendor/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php @@ -15,6 +15,7 @@ use function array_reverse; use function array_slice; use function count; use function in_array; +use function max; final class MemoryEfficientLongestCommonSubsequenceCalculator implements LongestCommonSubsequenceCalculator { diff --git a/vendor/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php b/vendor/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php index a4377d3..6c70683 100644 --- a/vendor/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php +++ b/vendor/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php @@ -16,8 +16,6 @@ abstract class AbstractChunkOutputBuilder implements DiffOutputBuilderInterface /** * Takes input of the diff array and returns the common parts. * Iterates through diff line by line. - * - * @return array */ protected function getCommonChunks(array $diff, int $lineThreshold = 5): array { diff --git a/vendor/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php b/vendor/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php index 7b5d3a7..fd6ce76 100644 --- a/vendor/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php +++ b/vendor/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php @@ -9,11 +9,9 @@ */ namespace SebastianBergmann\Diff\Output; -use function assert; use function fclose; use function fopen; use function fwrite; -use function is_resource; use function str_ends_with; use function stream_get_contents; use function substr; @@ -36,8 +34,6 @@ final class DiffOnlyOutputBuilder implements DiffOutputBuilderInterface { $buffer = fopen('php://memory', 'r+b'); - assert(is_resource($buffer)); - if ('' !== $this->header) { fwrite($buffer, $this->header); diff --git a/vendor/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php b/vendor/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php index 5c49618..3bb5e0d 100644 --- a/vendor/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php +++ b/vendor/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php @@ -11,14 +11,12 @@ namespace SebastianBergmann\Diff\Output; use function array_merge; use function array_splice; -use function assert; use function count; use function fclose; use function fopen; use function fwrite; use function is_bool; use function is_int; -use function is_resource; use function is_string; use function max; use function min; @@ -101,9 +99,6 @@ final class StrictUnifiedDiffOutputBuilder implements DiffOutputBuilderInterface $this->changed = false; $buffer = fopen('php://memory', 'r+b'); - - assert(is_resource($buffer)); - fwrite($buffer, $this->header); $this->writeDiffHunks($buffer, $diff); diff --git a/vendor/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php b/vendor/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php index d07ace6..fa6ae7a 100644 --- a/vendor/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php +++ b/vendor/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php @@ -10,12 +10,10 @@ namespace SebastianBergmann\Diff\Output; use function array_splice; -use function assert; use function count; use function fclose; use function fopen; use function fwrite; -use function is_resource; use function max; use function min; use function str_ends_with; @@ -48,8 +46,6 @@ final class UnifiedDiffOutputBuilder extends AbstractChunkOutputBuilder { $buffer = fopen('php://memory', 'r+b'); - assert(is_resource($buffer)); - if ('' !== $this->header) { fwrite($buffer, $this->header); diff --git a/vendor/sebastian/diff/src/Parser.php b/vendor/sebastian/diff/src/Parser.php index e63e690..9293fc9 100644 --- a/vendor/sebastian/diff/src/Parser.php +++ b/vendor/sebastian/diff/src/Parser.php @@ -9,7 +9,6 @@ */ namespace SebastianBergmann\Diff; -use const PREG_UNMATCHED_AS_NULL; use function array_pop; use function assert; use function count; @@ -72,9 +71,6 @@ final class Parser return $diffs; } - /** - * @param string[] $lines - */ private function parseFileDiff(Diff $diff, array $lines): void { $chunks = []; diff --git a/vendor/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php b/vendor/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php index 98e856d..93b7628 100644 --- a/vendor/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php +++ b/vendor/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php @@ -11,6 +11,7 @@ namespace SebastianBergmann\Diff; use function array_reverse; use function count; +use function max; use SplFixedArray; final class TimeEfficientLongestCommonSubsequenceCalculator implements LongestCommonSubsequenceCalculator diff --git a/vendor/sebastian/environment/ChangeLog.md b/vendor/sebastian/environment/ChangeLog.md index 4057d3c..98ee284 100644 --- a/vendor/sebastian/environment/ChangeLog.md +++ b/vendor/sebastian/environment/ChangeLog.md @@ -2,12 +2,6 @@ All notable changes in `sebastianbergmann/environment` are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. -## [8.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - ## [7.2.0] - 2024-07-03 ### Changed @@ -215,7 +209,6 @@ All notable changes in `sebastianbergmann/environment` are documented in this fi * This component is no longer supported on PHP 5.6 -[8.0.0]: https://github.com/sebastianbergmann/environment/compare/7.2...main [7.2.0]: https://github.com/sebastianbergmann/environment/compare/7.1.0...7.2.0 [7.1.0]: https://github.com/sebastianbergmann/environment/compare/7.0.0...7.1.0 [7.0.0]: https://github.com/sebastianbergmann/environment/compare/6.1...7.0.0 diff --git a/vendor/sebastian/environment/LICENSE b/vendor/sebastian/environment/LICENSE index 845fd0b..aecdbc7 100644 --- a/vendor/sebastian/environment/LICENSE +++ b/vendor/sebastian/environment/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2014-2025, Sebastian Bergmann +Copyright (c) 2014-2024, Sebastian Bergmann All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/sebastian/environment/README.md b/vendor/sebastian/environment/README.md index f91287e..a7ccb75 100644 --- a/vendor/sebastian/environment/README.md +++ b/vendor/sebastian/environment/README.md @@ -1,4 +1,4 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/environment/v)](https://packagist.org/packages/sebastian/environment) +[![Latest Stable Version](https://poser.pugx.org/sebastian/environment/v/stable.png)](https://packagist.org/packages/sebastian/environment) [![CI Status](https://github.com/sebastianbergmann/environment/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/environment/actions) [![codecov](https://codecov.io/gh/sebastianbergmann/environment/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/environment) diff --git a/vendor/sebastian/environment/composer.json b/vendor/sebastian/environment/composer.json index 6d227a2..b2bc179 100644 --- a/vendor/sebastian/environment/composer.json +++ b/vendor/sebastian/environment/composer.json @@ -16,18 +16,17 @@ }, "config": { "platform": { - "php": "8.3.0" + "php": "8.2.0" }, "optimize-autoloader": true, "sort-packages": true }, - "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, "suggest": { "ext-posix": "*" @@ -39,7 +38,7 @@ }, "extra": { "branch-alias": { - "dev-main": "8.0-dev" + "dev-main": "7.2-dev" } } } diff --git a/vendor/sebastian/environment/src/Console.php b/vendor/sebastian/environment/src/Console.php index 104dd28..9c41535 100644 --- a/vendor/sebastian/environment/src/Console.php +++ b/vendor/sebastian/environment/src/Console.php @@ -12,14 +12,12 @@ namespace SebastianBergmann\Environment; use const DIRECTORY_SEPARATOR; use const STDIN; use const STDOUT; -use function assert; use function defined; use function fclose; use function fstat; use function function_exists; use function getenv; use function in_array; -use function is_array; use function is_resource; use function is_string; use function posix_isatty; @@ -38,17 +36,17 @@ final class Console /** * @var int */ - public const int STDIN = 0; + public const STDIN = 0; /** * @var int */ - public const int STDOUT = 1; + public const STDOUT = 1; /** * @var int */ - public const int STDERR = 2; + public const STDERR = 2; /** * Returns true if STDOUT supports colorization. @@ -184,10 +182,6 @@ final class Console ['suppress_errors' => true], ); - assert(is_array($pipes)); - assert(isset($pipes[1]) && is_resource($pipes[1])); - assert(isset($pipes[2]) && is_resource($pipes[2])); - if (is_resource($process)) { $info = stream_get_contents($pipes[1]); diff --git a/vendor/sebastian/environment/src/Runtime.php b/vendor/sebastian/environment/src/Runtime.php index 5f3bd29..3c3cd69 100644 --- a/vendor/sebastian/environment/src/Runtime.php +++ b/vendor/sebastian/environment/src/Runtime.php @@ -10,6 +10,7 @@ namespace SebastianBergmann\Environment; use const PHP_BINARY; +use const PHP_MAJOR_VERSION; use const PHP_SAPI; use const PHP_VERSION; use function array_map; @@ -59,6 +60,10 @@ final class Runtime */ public function performsJustInTimeCompilation(): bool { + if (PHP_MAJOR_VERSION < 8) { + return false; + } + if (!$this->isOpcacheActive()) { return false; } diff --git a/vendor/sebastian/exporter/ChangeLog.md b/vendor/sebastian/exporter/ChangeLog.md index 64c6ad6..3f48d9e 100644 --- a/vendor/sebastian/exporter/ChangeLog.md +++ b/vendor/sebastian/exporter/ChangeLog.md @@ -2,12 +2,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. -## [7.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - ## [6.3.0] - 2024-12-05 ### Added @@ -184,7 +178,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * Remove HHVM-specific code that is no longer needed -[7.0.0]: https://github.com/sebastianbergmann/exporter/compare/6.3...main [6.3.0]: https://github.com/sebastianbergmann/exporter/compare/6.2.0...6.3.0 [6.2.0]: https://github.com/sebastianbergmann/exporter/compare/6.1.3...6.2.0 [6.1.3]: https://github.com/sebastianbergmann/exporter/compare/6.1.2...6.1.3 diff --git a/vendor/sebastian/exporter/LICENSE b/vendor/sebastian/exporter/LICENSE index c5268a9..5b4705a 100644 --- a/vendor/sebastian/exporter/LICENSE +++ b/vendor/sebastian/exporter/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2002-2025, Sebastian Bergmann +Copyright (c) 2002-2024, Sebastian Bergmann All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/sebastian/exporter/composer.json b/vendor/sebastian/exporter/composer.json index 5dfdcdb..5d5c72a 100644 --- a/vendor/sebastian/exporter/composer.json +++ b/vendor/sebastian/exporter/composer.json @@ -32,20 +32,19 @@ }, "config": { "platform": { - "php": "8.3.0" + "php": "8.2.0" }, "optimize-autoloader": true, "sort-packages": true }, - "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.3", + "php": ">=8.2", "ext-mbstring": "*", - "sebastian/recursion-context": "^7.0-dev" + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.3" }, "autoload": { "classmap": [ @@ -59,7 +58,7 @@ }, "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.1-dev" } } } diff --git a/vendor/sebastian/global-state/ChangeLog.md b/vendor/sebastian/global-state/ChangeLog.md index edc0193..fc9f976 100644 --- a/vendor/sebastian/global-state/ChangeLog.md +++ b/vendor/sebastian/global-state/ChangeLog.md @@ -2,12 +2,6 @@ All notable changes in `sebastian/global-state` are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. -## [8.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - ## [7.0.2] - 2024-07-03 ### Changed @@ -116,7 +110,6 @@ All notable changes in `sebastian/global-state` are documented in this file usin * This component is no longer supported on PHP 7.0 and PHP 7.1 -[8.0.0]: https://github.com/sebastianbergmann/global-state/compare/7.0...main [7.0.2]: https://github.com/sebastianbergmann/global-state/compare/7.0.1...7.0.2 [7.0.1]: https://github.com/sebastianbergmann/global-state/compare/7.0.0...7.0.1 [7.0.0]: https://github.com/sebastianbergmann/global-state/compare/6.0...7.0.0 diff --git a/vendor/sebastian/global-state/LICENSE b/vendor/sebastian/global-state/LICENSE index b687f39..bdb57ec 100644 --- a/vendor/sebastian/global-state/LICENSE +++ b/vendor/sebastian/global-state/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2001-2025, Sebastian Bergmann +Copyright (c) 2001-2024, Sebastian Bergmann All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/sebastian/global-state/README.md b/vendor/sebastian/global-state/README.md index 0d1ea0f..4e6b081 100644 --- a/vendor/sebastian/global-state/README.md +++ b/vendor/sebastian/global-state/README.md @@ -1,4 +1,4 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/global-state/v)](https://packagist.org/packages/sebastian/global-state) +[![Latest Stable Version](https://poser.pugx.org/sebastian/global-state/v/stable.png)](https://packagist.org/packages/sebastian/global-state) [![CI Status](https://github.com/sebastianbergmann/global-state/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/global-state/actions) [![codecov](https://codecov.io/gh/sebastianbergmann/global-state/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/global-state) diff --git a/vendor/sebastian/global-state/composer.json b/vendor/sebastian/global-state/composer.json index ab71ce1..95fb1f0 100644 --- a/vendor/sebastian/global-state/composer.json +++ b/vendor/sebastian/global-state/composer.json @@ -14,23 +14,22 @@ "issues": "https://github.com/sebastianbergmann/global-state/issues", "security": "https://github.com/sebastianbergmann/global-state/security/policy" }, - "minimum-stability": "dev", "prefer-stable": true, "config": { "platform": { - "php": "8.3.0" + "php": "8.2.0" }, "optimize-autoloader": true, "sort-packages": true }, "require": { - "php": ">=8.3", - "sebastian/object-reflector": "^5.0", - "sebastian/recursion-context": "^7.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, "autoload": { "classmap": [ @@ -47,7 +46,7 @@ }, "extra": { "branch-alias": { - "dev-main": "8.0-dev" + "dev-main": "7.0-dev" } } } diff --git a/vendor/sebastian/global-state/src/Restorer.php b/vendor/sebastian/global-state/src/Restorer.php index 7bdadb3..2a08a5e 100644 --- a/vendor/sebastian/global-state/src/Restorer.php +++ b/vendor/sebastian/global-state/src/Restorer.php @@ -13,7 +13,6 @@ use function array_diff; use function array_key_exists; use function array_keys; use function array_merge; -use function assert; use function in_array; use function is_array; use ReflectionClass; @@ -96,8 +95,6 @@ final class Restorer ); foreach ($keys as $key) { - assert(isset($GLOBALS[$superGlobalArray]) && is_array($GLOBALS[$superGlobalArray])); - if (isset($superGlobalVariables[$superGlobalArray][$key])) { $GLOBALS[$superGlobalArray][$key] = $superGlobalVariables[$superGlobalArray][$key]; } else { diff --git a/vendor/sebastian/global-state/src/Snapshot.php b/vendor/sebastian/global-state/src/Snapshot.php index e204ef8..e8b7a16 100644 --- a/vendor/sebastian/global-state/src/Snapshot.php +++ b/vendor/sebastian/global-state/src/Snapshot.php @@ -128,7 +128,6 @@ final class Snapshot assert($iniSettings !== false); - /* @phpstan-ignore assign.propertyType */ $this->iniSettings = $iniSettings; } @@ -293,7 +292,7 @@ final class Snapshot !in_array($key, $superGlobalArrays, true) && $this->canBeSerialized($GLOBALS[$key]) && !$this->excludeList->isGlobalVariableExcluded($key)) { - /* @phpstan-ignore assign.propertyType */ + /* @noinspection UnserializeExploitsInspection */ $this->globalVariables[$key] = unserialize(serialize($GLOBALS[$key])); } } @@ -305,7 +304,7 @@ final class Snapshot if (isset($GLOBALS[$superGlobalArray]) && is_array($GLOBALS[$superGlobalArray])) { foreach ($GLOBALS[$superGlobalArray] as $key => $value) { - /* @phpstan-ignore assign.propertyType */ + /* @noinspection UnserializeExploitsInspection */ $this->superGlobalVariables[$superGlobalArray][$key] = unserialize(serialize($value)); } } @@ -397,7 +396,6 @@ final class Snapshot { $result = []; - /* @phpstan-ignore argument.type */ if ($processed->contains($variable)) { return $result; } diff --git a/vendor/sebastian/lines-of-code/ChangeLog.md b/vendor/sebastian/lines-of-code/ChangeLog.md index 9d6ac41..d4e0905 100644 --- a/vendor/sebastian/lines-of-code/ChangeLog.md +++ b/vendor/sebastian/lines-of-code/ChangeLog.md @@ -2,12 +2,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. -## [4.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - ## [3.0.1] - 2024-07-03 ### Changed @@ -65,7 +59,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * Initial release -[4.0.0]: https://github.com/sebastianbergmann/lines-of-code/compare/3.0...main [3.0.1]: https://github.com/sebastianbergmann/lines-of-code/compare/3.0.0...3.0.1 [3.0.0]: https://github.com/sebastianbergmann/lines-of-code/compare/2.0...3.0.0 [2.0.2]: https://github.com/sebastianbergmann/lines-of-code/compare/2.0.1...2.0.2 diff --git a/vendor/sebastian/lines-of-code/LICENSE b/vendor/sebastian/lines-of-code/LICENSE index 0d534da..edaedf6 100644 --- a/vendor/sebastian/lines-of-code/LICENSE +++ b/vendor/sebastian/lines-of-code/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2020-2025, Sebastian Bergmann +Copyright (c) 2020-2024, Sebastian Bergmann All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/sebastian/lines-of-code/README.md b/vendor/sebastian/lines-of-code/README.md index 765a0eb..d98eab4 100644 --- a/vendor/sebastian/lines-of-code/README.md +++ b/vendor/sebastian/lines-of-code/README.md @@ -1,4 +1,4 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/lines-of-code/v)](https://packagist.org/packages/sebastian/lines-of-code) +[![Latest Stable Version](https://poser.pugx.org/sebastian/lines-of-code/v/stable.png)](https://packagist.org/packages/sebastian/lines-of-code) [![CI Status](https://github.com/sebastianbergmann/lines-of-code/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/lines-of-code/actions) [![codecov](https://codecov.io/gh/sebastianbergmann/lines-of-code/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/lines-of-code) diff --git a/vendor/sebastian/lines-of-code/composer.json b/vendor/sebastian/lines-of-code/composer.json index 29fb054..46f1243 100644 --- a/vendor/sebastian/lines-of-code/composer.json +++ b/vendor/sebastian/lines-of-code/composer.json @@ -15,18 +15,17 @@ "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy" }, - "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.3", + "php": ">=8.2", "nikic/php-parser": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, "config": { "platform": { - "php": "8.3" + "php": "8.2" }, "optimize-autoloader": true, "sort-packages": true @@ -38,7 +37,7 @@ }, "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "3.0-dev" } } } diff --git a/vendor/sebastian/lines-of-code/src/Counter.php b/vendor/sebastian/lines-of-code/src/Counter.php index ed2d3ab..2baed4b 100644 --- a/vendor/sebastian/lines-of-code/src/Counter.php +++ b/vendor/sebastian/lines-of-code/src/Counter.php @@ -48,6 +48,7 @@ final class Counter assert($nodes !== null); return $this->countInAbstractSyntaxTree($linesOfCode, $nodes); + // @codeCoverageIgnoreStart } catch (Error $error) { throw new RuntimeException( diff --git a/vendor/sebastian/lines-of-code/src/Exception/NegativeValueException.php b/vendor/sebastian/lines-of-code/src/Exception/NegativeValueException.php new file mode 100644 index 0000000..40d27e1 --- /dev/null +++ b/vendor/sebastian/lines-of-code/src/Exception/NegativeValueException.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace SebastianBergmann\LinesOfCode; + +use InvalidArgumentException; + +final class NegativeValueException extends InvalidArgumentException implements Exception +{ +} diff --git a/vendor/sebastian/lines-of-code/src/LineCountingVisitor.php b/vendor/sebastian/lines-of-code/src/LineCountingVisitor.php index a461a98..fd36675 100644 --- a/vendor/sebastian/lines-of-code/src/LineCountingVisitor.php +++ b/vendor/sebastian/lines-of-code/src/LineCountingVisitor.php @@ -43,17 +43,15 @@ final class LineCountingVisitor extends NodeVisitorAbstract $this->linesOfCode = $linesOfCode; } - public function enterNode(Node $node): null + public function enterNode(Node $node): void { $this->comments = array_merge($this->comments, $node->getComments()); if (!$node instanceof Expr) { - return null; + return; } $this->linesWithStatements[] = $node->getStartLine(); - - return null; } public function result(): LinesOfCode diff --git a/vendor/sebastian/lines-of-code/src/LinesOfCode.php b/vendor/sebastian/lines-of-code/src/LinesOfCode.php index 2aa5b0e..890d961 100644 --- a/vendor/sebastian/lines-of-code/src/LinesOfCode.php +++ b/vendor/sebastian/lines-of-code/src/LinesOfCode.php @@ -41,9 +41,30 @@ final readonly class LinesOfCode * @param non-negative-int $logicalLinesOfCode * * @throws IllogicalValuesException + * @throws NegativeValueException */ public function __construct(int $linesOfCode, int $commentLinesOfCode, int $nonCommentLinesOfCode, int $logicalLinesOfCode) { + /** @phpstan-ignore smaller.alwaysFalse */ + if ($linesOfCode < 0) { + throw new NegativeValueException('$linesOfCode must not be negative'); + } + + /** @phpstan-ignore smaller.alwaysFalse */ + if ($commentLinesOfCode < 0) { + throw new NegativeValueException('$commentLinesOfCode must not be negative'); + } + + /** @phpstan-ignore smaller.alwaysFalse */ + if ($nonCommentLinesOfCode < 0) { + throw new NegativeValueException('$nonCommentLinesOfCode must not be negative'); + } + + /** @phpstan-ignore smaller.alwaysFalse */ + if ($logicalLinesOfCode < 0) { + throw new NegativeValueException('$logicalLinesOfCode must not be negative'); + } + if ($linesOfCode - $commentLinesOfCode !== $nonCommentLinesOfCode) { throw new IllogicalValuesException('$linesOfCode !== $commentLinesOfCode + $nonCommentLinesOfCode'); } diff --git a/vendor/sebastian/object-enumerator/ChangeLog.md b/vendor/sebastian/object-enumerator/ChangeLog.md index 67d4ae7..a407f12 100644 --- a/vendor/sebastian/object-enumerator/ChangeLog.md +++ b/vendor/sebastian/object-enumerator/ChangeLog.md @@ -2,12 +2,6 @@ All notable changes to `sebastianbergmann/object-enumerator` are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. -## [7.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - ## [6.0.1] - 2024-07-03 ### Changed @@ -98,7 +92,6 @@ All notable changes to `sebastianbergmann/object-enumerator` are documented in t * Initial release -[7.0.0]: https://github.com/sebastianbergmann/object-enumerator/compare/6.0...main [6.0.1]: https://github.com/sebastianbergmann/object-enumerator/compare/6.0.0...6.0.1 [6.0.0]: https://github.com/sebastianbergmann/object-enumerator/compare/5.0...6.0.0 [5.0.0]: https://github.com/sebastianbergmann/object-enumerator/compare/4.0.4...5.0.0 diff --git a/vendor/sebastian/object-enumerator/LICENSE b/vendor/sebastian/object-enumerator/LICENSE index ec89362..86c455d 100644 --- a/vendor/sebastian/object-enumerator/LICENSE +++ b/vendor/sebastian/object-enumerator/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2016-2025, Sebastian Bergmann +Copyright (c) 2016-2024, Sebastian Bergmann All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/sebastian/object-enumerator/README.md b/vendor/sebastian/object-enumerator/README.md index bb244fa..2dab157 100644 --- a/vendor/sebastian/object-enumerator/README.md +++ b/vendor/sebastian/object-enumerator/README.md @@ -1,4 +1,4 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/object-enumerator/v)](https://packagist.org/packages/sebastian/object-enumerator) +[![Latest Stable Version](https://poser.pugx.org/sebastian/object-enumerator/v/stable.png)](https://packagist.org/packages/sebastian/object-enumerator) [![CI Status](https://github.com/sebastianbergmann/object-enumerator/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/object-enumerator/actions) [![codecov](https://codecov.io/gh/sebastianbergmann/object-enumerator/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/object-enumerator) diff --git a/vendor/sebastian/object-enumerator/composer.json b/vendor/sebastian/object-enumerator/composer.json index 83e79a6..333d744 100644 --- a/vendor/sebastian/object-enumerator/composer.json +++ b/vendor/sebastian/object-enumerator/composer.json @@ -13,22 +13,21 @@ "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy" }, - "minimum-stability": "dev", "prefer-stable": true, "config": { "platform": { - "php": "8.3.0" + "php": "8.2.0" }, "optimize-autoloader": true, "sort-packages": true }, "require": { - "php": ">=8.3", - "sebastian/object-reflector": "^5.0", - "sebastian/recursion-context": "^7.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, "autoload": { "classmap": [ @@ -42,7 +41,7 @@ }, "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.0-dev" } } } diff --git a/vendor/sebastian/object-reflector/ChangeLog.md b/vendor/sebastian/object-reflector/ChangeLog.md index 57b60a8..8d328cf 100644 --- a/vendor/sebastian/object-reflector/ChangeLog.md +++ b/vendor/sebastian/object-reflector/ChangeLog.md @@ -2,12 +2,6 @@ All notable changes to `sebastianbergmann/object-reflector` are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. -## [5.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - ## [4.0.1] - 2024-07-03 ### Changed @@ -74,7 +68,6 @@ All notable changes to `sebastianbergmann/object-reflector` are documented in th * Initial release -[5.0.0]: https://github.com/sebastianbergmann/object-reflector/compare/4.0...main [4.0.1]: https://github.com/sebastianbergmann/object-reflector/compare/4.0.0...4.0.1 [4.0.0]: https://github.com/sebastianbergmann/object-reflector/compare/3.0...4.0.0 [3.0.0]: https://github.com/sebastianbergmann/object-reflector/compare/2.0.4...3.0.0 diff --git a/vendor/sebastian/object-reflector/LICENSE b/vendor/sebastian/object-reflector/LICENSE index e148db3..d719088 100644 --- a/vendor/sebastian/object-reflector/LICENSE +++ b/vendor/sebastian/object-reflector/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2017-2025, Sebastian Bergmann +Copyright (c) 2017-2024, Sebastian Bergmann All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/sebastian/object-reflector/README.md b/vendor/sebastian/object-reflector/README.md index 1aca573..5db9dde 100644 --- a/vendor/sebastian/object-reflector/README.md +++ b/vendor/sebastian/object-reflector/README.md @@ -1,4 +1,4 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/object-reflector/v)](https://packagist.org/packages/sebastian/object-reflector) +[![Latest Stable Version](https://poser.pugx.org/sebastian/object-reflector/v/stable.png)](https://packagist.org/packages/sebastian/object-reflector) [![CI Status](https://github.com/sebastianbergmann/object-reflector/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/object-reflector/actions) [![codecov](https://codecov.io/gh/sebastianbergmann/object-reflector/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/object-reflector) diff --git a/vendor/sebastian/object-reflector/composer.json b/vendor/sebastian/object-reflector/composer.json index e37cb5b..2f3a06f 100644 --- a/vendor/sebastian/object-reflector/composer.json +++ b/vendor/sebastian/object-reflector/composer.json @@ -13,20 +13,19 @@ "issues": "https://github.com/sebastianbergmann/object-reflector/issues", "security": "https://github.com/sebastianbergmann/object-reflector/security/policy" }, - "minimum-stability": "dev", "prefer-stable": true, "config": { "platform": { - "php": "8.3.0" + "php": "8.2.0" }, "optimize-autoloader": true, "sort-packages": true }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, "autoload": { "classmap": [ @@ -40,7 +39,7 @@ }, "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "4.0-dev" } } } diff --git a/vendor/sebastian/recursion-context/ChangeLog.md b/vendor/sebastian/recursion-context/ChangeLog.md index cacac00..0fc1698 100644 --- a/vendor/sebastian/recursion-context/ChangeLog.md +++ b/vendor/sebastian/recursion-context/ChangeLog.md @@ -2,12 +2,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. -## [7.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - ## [6.0.2] - 2024-07-03 ### Changed @@ -63,7 +57,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * Tests etc. are now ignored for archive exports -[7.0.0]: https://github.com/sebastianbergmann/recursion-context/compare/6.0...main [6.0.2]: https://github.com/sebastianbergmann/recursion-context/compare/6.0.1...6.0.2 [6.0.1]: https://github.com/sebastianbergmann/recursion-context/compare/6.0.0...6.0.1 [6.0.0]: https://github.com/sebastianbergmann/recursion-context/compare/5.0...6.0.0 diff --git a/vendor/sebastian/recursion-context/LICENSE b/vendor/sebastian/recursion-context/LICENSE index c5268a9..5b4705a 100644 --- a/vendor/sebastian/recursion-context/LICENSE +++ b/vendor/sebastian/recursion-context/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2002-2025, Sebastian Bergmann +Copyright (c) 2002-2024, Sebastian Bergmann All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/sebastian/recursion-context/README.md b/vendor/sebastian/recursion-context/README.md index f1d87b6..8137f1a 100644 --- a/vendor/sebastian/recursion-context/README.md +++ b/vendor/sebastian/recursion-context/README.md @@ -1,4 +1,4 @@ -[![Latest Stable Version](https://poser.pugx.org/sebastian/recursion-context/v)](https://packagist.org/packages/sebastian/recursion-context) +[![Latest Stable Version](https://poser.pugx.org/sebastian/recursion-context/v/stable.png)](https://packagist.org/packages/sebastian/recursion-context) [![CI Status](https://github.com/sebastianbergmann/recursion-context/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/recursion-context/actions) [![codecov](https://codecov.io/gh/sebastianbergmann/recursion-context/branch/main/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/recursion-context) diff --git a/vendor/sebastian/recursion-context/composer.json b/vendor/sebastian/recursion-context/composer.json index efcbcac..94e5be7 100644 --- a/vendor/sebastian/recursion-context/composer.json +++ b/vendor/sebastian/recursion-context/composer.json @@ -21,20 +21,19 @@ "issues": "https://github.com/sebastianbergmann/recursion-context/issues", "security": "https://github.com/sebastianbergmann/recursion-context/security/policy" }, - "minimum-stability": "dev", "prefer-stable": true, "config": { "platform": { - "php": "8.3.0" + "php": "8.2.0" }, "optimize-autoloader": true, "sort-packages": true }, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.0" }, "autoload": { "classmap": [ @@ -43,7 +42,7 @@ }, "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "6.0-dev" } } } diff --git a/vendor/sebastian/recursion-context/src/Context.php b/vendor/sebastian/recursion-context/src/Context.php index 782e41d..4e6160d 100644 --- a/vendor/sebastian/recursion-context/src/Context.php +++ b/vendor/sebastian/recursion-context/src/Context.php @@ -16,7 +16,6 @@ use function array_pop; use function array_slice; use function count; use function is_array; -use function is_int; use function random_int; use function spl_object_id; use SplObjectStorage; @@ -44,7 +43,6 @@ final class Context public function __destruct() { foreach ($this->arrays as &$array) { - /* @phpstan-ignore function.alreadyNarrowedType */ if (is_array($array)) { array_pop($array); array_pop($array); @@ -59,10 +57,9 @@ final class Context * * @param-out T $value */ - public function add(array|object &$value): int + public function add(array|object &$value): false|int|string { if (is_array($value)) { - /* @phpstan-ignore paramOut.type */ return $this->addArray($value); } @@ -76,7 +73,7 @@ final class Context * * @param-out T $value */ - public function contains(array|object &$value): false|int + public function contains(array|object &$value): false|int|string { if (is_array($value)) { return $this->containsArray($value); @@ -143,13 +140,7 @@ final class Context { $end = array_slice($array, -2); - if (isset($end[1]) && - $end[1] === $this->objects && - is_int($end[0])) { - return $end[0]; - } - - return false; + return isset($end[1]) && $end[1] === $this->objects ? $end[0] : false; } private function containsObject(object $value): false|int diff --git a/vendor/sebastian/type/ChangeLog.md b/vendor/sebastian/type/ChangeLog.md index 3cc5db7..f498172 100644 --- a/vendor/sebastian/type/ChangeLog.md +++ b/vendor/sebastian/type/ChangeLog.md @@ -2,12 +2,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. -## [6.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - ## [5.1.0] - 2024-09-17 ### Added @@ -177,7 +171,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * Initial release based on [code contributed by Michel Hartmann to PHPUnit](https://github.com/sebastianbergmann/phpunit/pull/3673) -[6.0.0]: https://github.com/sebastianbergmann/type/compare/5.1...main [5.1.0]: https://github.com/sebastianbergmann/type/compare/5.0.1...5.1.0 [5.0.1]: https://github.com/sebastianbergmann/type/compare/5.0.0...5.0.1 [5.0.0]: https://github.com/sebastianbergmann/type/compare/4.0...5.0.0 diff --git a/vendor/sebastian/type/LICENSE b/vendor/sebastian/type/LICENSE index 84a8322..10da805 100644 --- a/vendor/sebastian/type/LICENSE +++ b/vendor/sebastian/type/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2019-2025, Sebastian Bergmann +Copyright (c) 2019-2024, Sebastian Bergmann All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/sebastian/type/composer.json b/vendor/sebastian/type/composer.json index 7934ffa..2c3cc10 100644 --- a/vendor/sebastian/type/composer.json +++ b/vendor/sebastian/type/composer.json @@ -15,17 +15,16 @@ "issues": "https://github.com/sebastianbergmann/type/issues", "security": "https://github.com/sebastianbergmann/type/security/policy" }, - "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^12.0-dev" + "phpunit/phpunit": "^11.3" }, "config": { "platform": { - "php": "8.3.0" + "php": "8.2.0" }, "optimize-autoloader": true, "sort-packages": true @@ -46,7 +45,7 @@ }, "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "5.1-dev" } } } diff --git a/vendor/sebastian/type/src/ReflectionMapper.php b/vendor/sebastian/type/src/ReflectionMapper.php index d14ec8f..2e5eb92 100644 --- a/vendor/sebastian/type/src/ReflectionMapper.php +++ b/vendor/sebastian/type/src/ReflectionMapper.php @@ -33,6 +33,8 @@ final class ReflectionMapper foreach ($reflector->getParameters() as $parameter) { $name = $parameter->getName(); + assert($name !== ''); + if (!$parameter->hasType()) { $parameters[] = new Parameter($name, new UnknownType); @@ -88,7 +90,9 @@ final class ReflectionMapper return $this->mapUnionType($returnType, $reflector); } - return $this->mapIntersectionType($returnType, $reflector); + if ($returnType instanceof ReflectionIntersectionType) { + return $this->mapIntersectionType($returnType, $reflector); + } } public function fromPropertyType(ReflectionProperty $reflector): Type @@ -109,47 +113,42 @@ final class ReflectionMapper return $this->mapUnionType($propertyType, $reflector); } - return $this->mapIntersectionType($propertyType, $reflector); + if ($propertyType instanceof ReflectionIntersectionType) { + return $this->mapIntersectionType($propertyType, $reflector); + } } private function mapNamedType(ReflectionNamedType $type, ReflectionFunction|ReflectionMethod|ReflectionProperty $reflector): Type { $classScope = !$reflector instanceof ReflectionFunction; - $typeName = $type->getName(); - assert($typeName !== ''); - - if ($classScope && $typeName === 'self') { + if ($classScope && $type->getName() === 'self') { return ObjectType::fromName( $reflector->getDeclaringClass()->getName(), $type->allowsNull(), ); } - if ($classScope && $typeName === 'static') { + if ($classScope && $type->getName() === 'static') { return new StaticType( TypeName::fromReflection($reflector->getDeclaringClass()), $type->allowsNull(), ); } - if ($typeName === 'mixed') { + if ($type->getName() === 'mixed') { return new MixedType; } - if ($classScope && $typeName === 'parent') { - $parentClass = $reflector->getDeclaringClass()->getParentClass(); - - assert($parentClass !== false); - + if ($classScope && $type->getName() === 'parent') { return ObjectType::fromName( - $parentClass->getName(), + $reflector->getDeclaringClass()->getParentClass()->getName(), $type->allowsNull(), ); } return Type::fromName( - $typeName, + $type->getName(), $type->allowsNull(), ); } diff --git a/vendor/sebastian/type/src/TypeName.php b/vendor/sebastian/type/src/TypeName.php index 865af98..03744bf 100644 --- a/vendor/sebastian/type/src/TypeName.php +++ b/vendor/sebastian/type/src/TypeName.php @@ -48,17 +48,13 @@ final readonly class TypeName } /** - * @param ReflectionClass $type + * @phpstan-ignore missingType.generics */ public static function fromReflection(ReflectionClass $type): self { - $simpleName = $type->getShortName(); - - assert($simpleName !== ''); - return new self( $type->getNamespaceName(), - $simpleName, + $type->getShortName(), ); } diff --git a/vendor/sebastian/type/src/type/CallableType.php b/vendor/sebastian/type/src/type/CallableType.php index dbe3554..597c5dc 100644 --- a/vendor/sebastian/type/src/type/CallableType.php +++ b/vendor/sebastian/type/src/type/CallableType.php @@ -165,6 +165,12 @@ final class CallableType extends Type [$className, $methodName] = $type->value(); } + /** @phpstan-ignore isset.variable */ + assert(isset($className)); + + /** @phpstan-ignore isset.variable */ + assert(isset($methodName)); + if (!class_exists($className)) { return false; } diff --git a/vendor/sebastian/type/src/type/IntersectionType.php b/vendor/sebastian/type/src/type/IntersectionType.php index 419a487..dc83d38 100644 --- a/vendor/sebastian/type/src/type/IntersectionType.php +++ b/vendor/sebastian/type/src/type/IntersectionType.php @@ -9,6 +9,7 @@ */ namespace SebastianBergmann\Type; +use function array_is_list; use function assert; use function count; use function implode; @@ -34,7 +35,7 @@ final class IntersectionType extends Type $this->ensureOnlyValidTypes(...$types); $this->ensureNoDuplicateTypes(...$types); - assert(!empty($types)); + assert(array_is_list($types) && !empty($types)); $this->types = $types; } diff --git a/vendor/sebastian/type/src/type/Type.php b/vendor/sebastian/type/src/type/Type.php index 0dee63f..6ec200b 100644 --- a/vendor/sebastian/type/src/type/Type.php +++ b/vendor/sebastian/type/src/type/Type.php @@ -10,7 +10,6 @@ namespace SebastianBergmann\Type; use function gettype; -use function is_object; use function strtolower; /** @@ -32,7 +31,7 @@ abstract class Type $typeName = gettype($value); - if (is_object($value)) { + if ($typeName === 'object') { return new ObjectType(TypeName::fromQualifiedName($value::class), $allowsNull); } @@ -62,7 +61,6 @@ abstract class Type 'void' => new VoidType, 'array', 'bool', 'boolean', 'double', 'float', 'int', 'integer', 'real', 'resource', 'resource (closed)', 'string' => new SimpleType($typeName, $allowsNull), 'mixed' => new MixedType, - /** @phpstan-ignore argument.type */ default => new ObjectType(TypeName::fromQualifiedName($typeName), $allowsNull), }; } diff --git a/vendor/sebastian/type/src/type/UnionType.php b/vendor/sebastian/type/src/type/UnionType.php index b166240..69bab8e 100644 --- a/vendor/sebastian/type/src/type/UnionType.php +++ b/vendor/sebastian/type/src/type/UnionType.php @@ -9,6 +9,7 @@ */ namespace SebastianBergmann\Type; +use function array_is_list; use function assert; use function count; use function implode; @@ -32,7 +33,7 @@ final class UnionType extends Type $this->ensureMinimumOfTwoTypes(...$types); $this->ensureOnlyValidTypes(...$types); - assert(!empty($types)); + assert(array_is_list($types) && !empty($types)); $this->types = $types; } @@ -75,7 +76,12 @@ final class UnionType extends Type sort($types); - return implode('|', $types); + $name = implode('|', $types); + + /** @phpstan-ignore empty.variable */ + assert(!empty($name)); + + return $name; } public function allowsNull(): bool diff --git a/vendor/sebastian/version/ChangeLog.md b/vendor/sebastian/version/ChangeLog.md index d16f9f7..4a96d56 100644 --- a/vendor/sebastian/version/ChangeLog.md +++ b/vendor/sebastian/version/ChangeLog.md @@ -2,12 +2,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. -## [6.0.0] - 2025-02-07 - -### Removed - -* This component is no longer supported on PHP 8.2 - ## [5.0.2] - 2024-10-09 ### Changed @@ -60,7 +54,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * This component is no longer supported on PHP 7.1 and PHP 7.2 -[6.0.0]: https://github.com/sebastianbergmann/version/compare/5.0...main [5.0.2]: https://github.com/sebastianbergmann/version/compare/5.0.1...5.0.2 [5.0.1]: https://github.com/sebastianbergmann/version/compare/5.0.0...5.0.1 [5.0.0]: https://github.com/sebastianbergmann/version/compare/4.0...5.0.0 diff --git a/vendor/sebastian/version/LICENSE b/vendor/sebastian/version/LICENSE index 42f4747..b8ec485 100644 --- a/vendor/sebastian/version/LICENSE +++ b/vendor/sebastian/version/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2013-2025, Sebastian Bergmann +Copyright (c) 2013-2024, Sebastian Bergmann All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/sebastian/version/composer.json b/vendor/sebastian/version/composer.json index 30d1990..ff88c33 100644 --- a/vendor/sebastian/version/composer.json +++ b/vendor/sebastian/version/composer.json @@ -16,15 +16,14 @@ }, "config": { "platform": { - "php": "8.3.0" + "php": "8.2.0" }, "optimize-autoloader": true, "sort-packages": true }, - "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.3" + "php": ">=8.2" }, "autoload": { "classmap": [ @@ -33,7 +32,7 @@ }, "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "5.0-dev" } } } diff --git a/vendor/sebastian/version/src/Version.php b/vendor/sebastian/version/src/Version.php index 0fd9def..4c090af 100644 --- a/vendor/sebastian/version/src/Version.php +++ b/vendor/sebastian/version/src/Version.php @@ -9,12 +9,9 @@ */ namespace SebastianBergmann; -use const DIRECTORY_SEPARATOR; -use function assert; use function end; use function explode; use function fclose; -use function is_array; use function is_dir; use function is_resource; use function proc_close; @@ -85,7 +82,7 @@ final readonly class Version return false; } - $process = @proc_open( + $process = proc_open( ['git', 'describe', '--tags'], [ 1 => ['pipe', 'w'], @@ -99,10 +96,6 @@ final readonly class Version return false; } - assert(is_array($pipes)); - assert(isset($pipes[1]) && is_resource($pipes[1])); - assert(isset($pipes[2]) && is_resource($pipes[2])); - $result = trim((string) stream_get_contents($pipes[1])); fclose($pipes[1]);