From 78de2c5e030105201f87d051915132d2f7f7fabe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Mon, 14 Jul 2025 00:05:44 +0200 Subject: [PATCH 01/10] Updated phpunit to 11.5 --- composer.json | 2 +- composer.lock | 653 +++++++++++++++++++++++++++----------------------- 2 files changed, 349 insertions(+), 306 deletions(-) diff --git a/composer.json b/composer.json index 717e9817..2dea55cd 100644 --- a/composer.json +++ b/composer.json @@ -105,7 +105,7 @@ "phpstan/phpstan-doctrine": "^2.0.1", "phpstan/phpstan-strict-rules": "^2.0.1", "phpstan/phpstan-symfony": "^2.0.0", - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^11.5.0", "rector/rector": "^2.0.4", "roave/security-advisories": "dev-latest", "symfony/browser-kit": "7.3.*", diff --git a/composer.lock b/composer.lock index 177cf360..53d32317 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "998b588a5268144279b9f8940760e536", + "content-hash": "ccaa4998c641ffd5d164f5dff2b48ad1", "packages": [ { "name": "amphp/amp", @@ -6607,16 +6607,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "2.1.0", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "9b30d6fd026b2c132b3985ce6b23bec09ab3aa68" + "reference": "b9e61a61e39e02dd90944e9115241c7f7e76bfd8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/9b30d6fd026b2c132b3985ce6b23bec09ab3aa68", - "reference": "9b30d6fd026b2c132b3985ce6b23bec09ab3aa68", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/b9e61a61e39e02dd90944e9115241c7f7e76bfd8", + "reference": "b9e61a61e39e02dd90944e9115241c7f7e76bfd8", "shasum": "" }, "require": { @@ -6648,9 +6648,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/2.1.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.2.0" }, - "time": "2025-02-19T13:28:12+00:00" + "time": "2025-07-13T07:04:09+00:00" }, { "name": "psr/cache", @@ -15540,34 +15540,36 @@ "packages-dev": [ { "name": "dama/doctrine-test-bundle", - "version": "v8.2.2", + "version": "v8.3.0", "source": { "type": "git", "url": "https://github.com/dmaicher/doctrine-test-bundle.git", - "reference": "eefe54fdf00d910f808efea9cfce9cc261064a0a" + "reference": "11846789ca2a86f6277316b42448f7fccb3965ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dmaicher/doctrine-test-bundle/zipball/eefe54fdf00d910f808efea9cfce9cc261064a0a", - "reference": "eefe54fdf00d910f808efea9cfce9cc261064a0a", + "url": "https://api.github.com/repos/dmaicher/doctrine-test-bundle/zipball/11846789ca2a86f6277316b42448f7fccb3965ff", + "reference": "11846789ca2a86f6277316b42448f7fccb3965ff", "shasum": "" }, "require": { "doctrine/dbal": "^3.3 || ^4.0", "doctrine/doctrine-bundle": "^2.11.0", - "php": "^7.4 || ^8.0", - "psr/cache": "^1.0 || ^2.0 || ^3.0", - "symfony/cache": "^5.4 || ^6.3 || ^7.0", - "symfony/framework-bundle": "^5.4 || ^6.3 || ^7.0" + "php": ">= 8.1", + "psr/cache": "^2.0 || ^3.0", + "symfony/cache": "^6.4 || ^7.2", + "symfony/framework-bundle": "^6.4 || ^7.2" + }, + "conflict": { + "phpunit/phpunit": "<10.0" }, "require-dev": { "behat/behat": "^3.0", "friendsofphp/php-cs-fixer": "^3.27", "phpstan/phpstan": "^2.0", - "phpunit/phpunit": "^8.0 || ^9.0 || ^10.0 || ^11.0", - "symfony/phpunit-bridge": "^7.2", - "symfony/process": "^5.4 || ^6.3 || ^7.0", - "symfony/yaml": "^5.4 || ^6.3 || ^7.0" + "phpunit/phpunit": "^10.0 || ^11.0 || ^12.0", + "symfony/process": "^6.4 || ^7.2", + "symfony/yaml": "^6.4 || ^7.2" }, "type": "symfony-bundle", "extra": { @@ -15601,9 +15603,9 @@ ], "support": { "issues": "https://github.com/dmaicher/doctrine-test-bundle/issues", - "source": "https://github.com/dmaicher/doctrine-test-bundle/tree/v8.2.2" + "source": "https://github.com/dmaicher/doctrine-test-bundle/tree/v8.3.0" }, - "time": "2025-02-04T14:37:36+00:00" + "time": "2025-03-04T10:07:03+00:00" }, { "name": "doctrine/doctrine-fixtures-bundle", @@ -16362,35 +16364,35 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.32", + "version": "11.0.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" + "reference": "1a800a7446add2d79cc6b3c01c45381810367d76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", - "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/1a800a7446add2d79cc6b3c01c45381810367d76", + "reference": "1a800a7446add2d79cc6b3c01c45381810367d76", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.19.1 || ^5.1.0", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.6", - "phpunit/php-text-template": "^2.0.4", - "sebastian/code-unit-reverse-lookup": "^2.0.3", - "sebastian/complexity": "^2.0.3", - "sebastian/environment": "^5.1.5", - "sebastian/lines-of-code": "^1.0.4", - "sebastian/version": "^3.0.2", + "nikic/php-parser": "^5.4.0", + "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": "^9.6" + "phpunit/phpunit": "^11.5.2" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -16399,7 +16401,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "9.2.x-dev" + "dev-main": "11.0.x-dev" } }, "autoload": { @@ -16428,40 +16430,52 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/show" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-code-coverage", + "type": "tidelift" } ], - "time": "2024-08-22T04:23:01+00:00" + "time": "2025-06-18T08:56:18+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/118cfaaa8bc5aef3287bf315b6060b1174754af6", + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -16488,7 +16502,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.0" }, "funding": [ { @@ -16496,28 +16511,28 @@ "type": "github" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2024-08-27T05:02:59+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.1.1", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "suggest": { "ext-pcntl": "*" @@ -16525,7 +16540,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -16551,7 +16566,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.1" }, "funding": [ { @@ -16559,32 +16575,32 @@ "type": "github" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2024-07-03T05:07:44+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -16610,7 +16626,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.1" }, "funding": [ { @@ -16618,32 +16635,32 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2024-07-03T05:08:43+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "7.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -16669,7 +16686,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "security": "https://github.com/sebastianbergmann/php-timer/security/policy", + "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.1" }, "funding": [ { @@ -16677,54 +16695,52 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2024-07-03T05:09:35+00:00" }, { "name": "phpunit/phpunit", - "version": "9.6.23", + "version": "11.5.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "43d2cb18d0675c38bd44982a5d1d88f6d53d8d95" + "reference": "446d43867314781df7e9adf79c3ec7464956fd8f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/43d2cb18d0675c38bd44982a5d1d88f6d53d8d95", - "reference": "43d2cb18d0675c38bd44982a5d1d88f6d53d8d95", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/446d43867314781df7e9adf79c3ec7464956fd8f", + "reference": "446d43867314781df7e9adf79c3ec7464956fd8f", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.5.0 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.13.1", + "myclabs/deep-copy": "^1.13.3", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.32", - "phpunit/php-file-iterator": "^3.0.6", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.4", - "phpunit/php-timer": "^5.0.3", - "sebastian/cli-parser": "^1.0.2", - "sebastian/code-unit": "^1.0.8", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.6", - "sebastian/environment": "^5.1.5", - "sebastian/exporter": "^4.0.6", - "sebastian/global-state": "^5.0.7", - "sebastian/object-enumerator": "^4.0.4", - "sebastian/resource-operations": "^3.0.4", - "sebastian/type": "^3.2.1", - "sebastian/version": "^3.0.2" + "php": ">=8.2", + "phpunit/php-code-coverage": "^11.0.10", + "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.3", + "sebastian/comparator": "^6.3.1", + "sebastian/diff": "^6.0.2", + "sebastian/environment": "^7.2.1", + "sebastian/exporter": "^6.3.0", + "sebastian/global-state": "^7.0.2", + "sebastian/object-enumerator": "^6.0.1", + "sebastian/type": "^5.1.2", + "sebastian/version": "^5.0.2", + "staabm/side-effects-detector": "^1.0.5" }, "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -16732,7 +16748,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.6-dev" + "dev-main": "11.5-dev" } }, "autoload": { @@ -16764,7 +16780,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.23" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.27" }, "funding": [ { @@ -16788,7 +16804,7 @@ "type": "tidelift" } ], - "time": "2025-05-02T06:40:34+00:00" + "time": "2025-07-11T04:10:06+00:00" }, { "name": "rector/rector", @@ -17808,28 +17824,28 @@ }, { "name": "sebastian/cli-parser", - "version": "1.0.2", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -17852,7 +17868,8 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2" }, "funding": [ { @@ -17860,32 +17877,32 @@ "type": "github" } ], - "time": "2024-03-02T06:27:43+00:00" + "time": "2024-07-03T04:41:36+00:00" }, { "name": "sebastian/code-unit", - "version": "1.0.8", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/54391c61e4af8078e5b276ab082b6d3c54c9ad64", + "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -17908,7 +17925,8 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + "security": "https://github.com/sebastianbergmann/code-unit/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.3" }, "funding": [ { @@ -17916,32 +17934,32 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2025-03-19T07:56:08+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "reference": "183a9b2632194febd219bb9246eee421dad8d45e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -17963,7 +17981,8 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + "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": [ { @@ -17971,34 +17990,39 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2024-07-03T04:45:54+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.8", + "version": "6.3.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "24b8fbc2c8e201bb1308e7b05148d6ab393b6959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/24b8fbc2c8e201bb1308e7b05148d6ab393b6959", + "reference": "24b8fbc2c8e201bb1308e7b05148d6ab393b6959", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/diff": "^6.0", + "sebastian/exporter": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.4" + }, + "suggest": { + "ext-bcmath": "For comparing BcMath\\Number objects" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.3-dev" } }, "autoload": { @@ -18037,7 +18061,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/6.3.1" }, "funding": [ { @@ -18045,33 +18070,33 @@ "type": "github" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2025-03-07T06:57:01+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.3", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0", "shasum": "" }, "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" + "nikic/php-parser": "^5.0", + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -18094,7 +18119,8 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1" }, "funding": [ { @@ -18102,33 +18128,33 @@ "type": "github" } ], - "time": "2023-12-22T06:19:30+00:00" + "time": "2024-07-03T04:49:50+00:00" }, { "name": "sebastian/diff", - "version": "4.0.6", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3", + "phpunit/phpunit": "^11.0", "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -18160,7 +18186,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" }, "funding": [ { @@ -18168,27 +18195,27 @@ "type": "github" } ], - "time": "2024-03-02T06:30:58+00:00" + "time": "2024-07-03T04:53:05+00:00" }, { "name": "sebastian/environment", - "version": "5.1.5", + "version": "7.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + "reference": "a5c75038693ad2e8d4b6c15ba2403532647830c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/a5c75038693ad2e8d4b6c15ba2403532647830c4", + "reference": "a5c75038693ad2e8d4b6c15ba2403532647830c4", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.3" }, "suggest": { "ext-posix": "*" @@ -18196,7 +18223,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "7.2-dev" } }, "autoload": { @@ -18215,7 +18242,7 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "homepage": "https://github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", @@ -18223,42 +18250,55 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/7.2.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/environment", + "type": "tidelift" } ], - "time": "2023-02-03T06:03:51+00:00" + "time": "2025-05-21T11:55:47+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.6", + "version": "6.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" + "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/3473f61172093b2da7de1fb5782e1f24cc036dc3", + "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.1-dev" } }, "autoload": { @@ -18300,7 +18340,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.0" }, "funding": [ { @@ -18308,38 +18349,35 @@ "type": "github" } ], - "time": "2024-03-02T06:33:00+00:00" + "time": "2024-12-05T09:17:50+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.7", + "version": "7.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" + "reference": "3be331570a721f9a4b5917f4209773de17f747d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", - "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -18358,13 +18396,14 @@ } ], "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2" }, "funding": [ { @@ -18372,33 +18411,33 @@ "type": "github" } ], - "time": "2024-03-02T06:35:11+00:00" + "time": "2024-07-03T04:57:36+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.4", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a", "shasum": "" }, "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" + "nikic/php-parser": "^5.0", + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -18421,7 +18460,8 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1" }, "funding": [ { @@ -18429,34 +18469,34 @@ "type": "github" } ], - "time": "2023-12-22T06:20:34+00:00" + "time": "2024-07-03T04:58:38+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.4", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "f5b498e631a74204185071eb41f33f38d64608aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -18478,7 +18518,8 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1" }, "funding": [ { @@ -18486,32 +18527,32 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2024-07-03T05:00:13+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.4", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -18533,7 +18574,8 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.1" }, "funding": [ { @@ -18541,32 +18583,32 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2024-07-03T05:01:32+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.5", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/694d156164372abbd149a4b85ccda2e4670c0e16", + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -18596,7 +18638,8 @@ "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.2" }, "funding": [ { @@ -18604,86 +18647,32 @@ "type": "github" } ], - "time": "2023-02-03T06:07:39+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "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" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-14T16:00:52+00:00" + "time": "2024-07-03T05:10:34+00:00" }, { "name": "sebastian/type", - "version": "3.2.1", + "version": "5.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + "reference": "a8a7e30534b0eb0c77cd9d07e82de1a114389f5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/a8a7e30534b0eb0c77cd9d07e82de1a114389f5e", + "reference": "a8a7e30534b0eb0c77cd9d07e82de1a114389f5e", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^11.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -18706,7 +18695,8 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + "security": "https://github.com/sebastianbergmann/type/security/policy", + "source": "https://github.com/sebastianbergmann/type/tree/5.1.2" }, "funding": [ { @@ -18714,29 +18704,29 @@ "type": "github" } ], - "time": "2023-02-03T06:13:03+00:00" + "time": "2025-03-18T13:35:50+00:00" }, { "name": "sebastian/version", - "version": "3.0.2", + "version": "5.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -18759,7 +18749,8 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "security": "https://github.com/sebastianbergmann/version/security/policy", + "source": "https://github.com/sebastianbergmann/version/tree/5.0.2" }, "funding": [ { @@ -18767,7 +18758,59 @@ "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2024-10-09T05:16:32+00:00" + }, + { + "name": "staabm/side-effects-detector", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/staabm/side-effects-detector.git", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.6", + "phpunit/phpunit": "^9.6.21", + "symfony/var-dumper": "^5.4.43", + "tomasvotruba/type-coverage": "1.0.0", + "tomasvotruba/unused-public": "1.0.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A static analysis tool to detect side effects in PHP code", + "keywords": [ + "static analysis" + ], + "support": { + "issues": "https://github.com/staabm/side-effects-detector/issues", + "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5" + }, + "funding": [ + { + "url": "https://github.com/staabm", + "type": "github" + } + ], + "time": "2024-10-20T05:08:20+00:00" }, { "name": "symfony/browser-kit", From 2cd2a481d9246e6fc95ad1564fe5748d1e1dd86b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Mon, 14 Jul 2025 00:06:44 +0200 Subject: [PATCH 02/10] Updated phpunit recipe --- .gitignore | 2 +- bin/phpunit | 0 symfony.lock | 7 ++++--- 3 files changed, 5 insertions(+), 4 deletions(-) mode change 100755 => 100644 bin/phpunit diff --git a/.gitignore b/.gitignore index c8c59090..76655919 100644 --- a/.gitignore +++ b/.gitignore @@ -42,7 +42,7 @@ yarn-error.log ###> phpunit/phpunit ### /phpunit.xml -.phpunit.result.cache +/.phpunit.cache/ ###< phpunit/phpunit ### ###> phpstan/phpstan ### diff --git a/bin/phpunit b/bin/phpunit old mode 100755 new mode 100644 diff --git a/symfony.lock b/symfony.lock index b975106c..f4ebe25f 100644 --- a/symfony.lock +++ b/symfony.lock @@ -309,15 +309,16 @@ "version": "0.12.4" }, "phpunit/phpunit": { - "version": "9.6", + "version": "11.5", "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", - "version": "9.6", - "ref": "6a9341aa97d441627f8bd424ae85dc04c944f8b4" + "version": "11.1", + "ref": "c6658a60fc9d594805370eacdf542c3d6b5c0869" }, "files": [ ".env.test", + "bin/phpunit", "phpunit.xml.dist", "tests/bootstrap.php" ] From e2bad9e9da5eb3402e23ae6dd694a2976d56353f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Mon, 14 Jul 2025 00:15:08 +0200 Subject: [PATCH 03/10] Updated phpunit recipe --- phpunit.xml.dist | 66 +++++++++++++++++++++++++----------------------- symfony.lock | 13 +++------- 2 files changed, 39 insertions(+), 40 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 7ee7596f..048fe9b6 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,36 +1,40 @@ - - - - - - - - - - - - src - - - - - tests - - - - - - - - + xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" + colors="true" + failOnDeprecation="true" + failOnNotice="true" + failOnWarning="true" + bootstrap="tests/bootstrap.php" + cacheDirectory=".phpunit.cache" + backupGlobals="false" +> + + + + + + + + + + + src + + + + + + tests + + + + + + + + + diff --git a/symfony.lock b/symfony.lock index f4ebe25f..136163f7 100644 --- a/symfony.lock +++ b/symfony.lock @@ -577,19 +577,14 @@ "version": "v5.3.8" }, "symfony/phpunit-bridge": { - "version": "6.4", + "version": "7.3", "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", - "version": "6.3", - "ref": "a411a0480041243d97382cac7984f7dce7813c08" + "version": "7.3", + "ref": "dc13fec96bd527bd399c3c01f0aab915c67fd544" }, - "files": [ - "./.env.test", - "./bin/phpunit", - "./phpunit.xml.dist", - "./tests/bootstrap.php" - ] + "files": [] }, "symfony/polyfill-ctype": { "version": "v1.14.0" From ce868630959e5ff667e0b7cbf24bffc7ae7ed5cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Mon, 14 Jul 2025 00:16:01 +0200 Subject: [PATCH 04/10] Updated dama doctrine-test bundle recipe --- phpunit.xml.dist | 2 +- symfony.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 048fe9b6..762c1dcc 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -31,10 +31,10 @@ + - diff --git a/symfony.lock b/symfony.lock index 136163f7..7be59292 100644 --- a/symfony.lock +++ b/symfony.lock @@ -29,15 +29,15 @@ "version": "1.11.99.4" }, "dama/doctrine-test-bundle": { - "version": "8.0", + "version": "8.3", "recipe": { "repo": "github.com/symfony/recipes-contrib", "branch": "main", - "version": "7.2", - "ref": "896306d79d4ee143af9eadf9b09fd34a8c391b70" + "version": "8.3", + "ref": "dfc51177476fb39d014ed89944cde53dc3326d23" }, "files": [ - "./config/packages/dama_doctrine_test_bundle.yaml" + "config/packages/dama_doctrine_test_bundle.yaml" ] }, "doctrine/cache": { From 6665203f2aa19e53eb10510c82962cbd198a8e7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Mon, 14 Jul 2025 00:25:39 +0200 Subject: [PATCH 05/10] Updated rector config --- rector.php | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/rector.php b/rector.php index 40eee9f7..d1e9edd5 100644 --- a/rector.php +++ b/rector.php @@ -16,6 +16,48 @@ use Rector\Symfony\CodeQuality\Rector\MethodCall\LiteralGetToRequestClassConstan use Rector\Symfony\Set\SymfonySetList; use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector; +return RectorConfig::configure() + ->withComposerBased(phpunit: true) + + ->withSymfonyContainerPhp(__DIR__ . '/tests/symfony-container.php') + ->withSymfonyContainerXml(__DIR__ . '/var/cache/dev/App_KernelDevDebugContainer.xml') + + ->withImportNames(importShortClasses: false) + ->withPaths([ + __DIR__ . '/config', + __DIR__ . '/public', + __DIR__ . '/src', + __DIR__ . '/tests', + ]) + + ->withRules([ + DeclareStrictTypesRector::class + ]) + + ->withSkip([ + CountArrayToEmptyArrayComparisonRector::class, + //Leave our !== null checks alone + FlipTypeControlToUseExclusiveTypeRector::class, + //Leave our PartList TableAction alone + ActionSuffixRemoverRector::class, + //We declare event listeners via attributes, therefore no need to migrate them to subscribers + EventListenerToEventSubscriberRector::class, + PreferPHPUnitThisCallRector::class, + //Do not replace 'GET' with class constant, + LiteralGetToRequestClassConstantRector::class, + ]) + + //Do not apply rules to Symfony own files + ->withSkip([ + __DIR__ . '/public/index.php', + __DIR__ . '/src/Kernel.php', + __DIR__ . '/config/preload.php', + __DIR__ . '/config/bundles.php', + ]) + + ; + +/* return static function (RectorConfig $rectorConfig): void { $rectorConfig->symfonyContainerXml(__DIR__ . '/var/cache/dev/App_KernelDevDebugContainer.xml'); $rectorConfig->symfonyContainerPhp(__DIR__ . '/tests/symfony-container.php'); @@ -79,3 +121,4 @@ return static function (RectorConfig $rectorConfig): void { __DIR__ . '/config/bundles.php', ]); }; +*/ From f1d34bbc24de23e96ca3b4ab9240b9488fe38952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Mon, 14 Jul 2025 00:26:40 +0200 Subject: [PATCH 06/10] Run rector --- src/Controller/SettingsController.php | 3 ++- src/Services/InfoProviderSystem/ExistingPartFinder.php | 4 +++- src/Twig/MiscExtension.php | 3 ++- tests/Exceptions/TwigModeExceptionTest.php | 4 +++- tests/Helpers/IPAnonymizerTest.php | 4 +++- tests/Repository/LogEntryRepositoryTest.php | 4 +++- .../BarcodeScanner/EIGP114BarcodeScanResultTest.php | 4 +++- tests/Services/LogSystem/TimeTravelTest.php | 4 +++- tests/SettingsTestHelper.php | 6 ++++-- 9 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/Controller/SettingsController.php b/src/Controller/SettingsController.php index 1da8a443..cd317876 100644 --- a/src/Controller/SettingsController.php +++ b/src/Controller/SettingsController.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace App\Controller; +use Symfony\Component\Form\Extension\Core\Type\SubmitType; use App\Settings\AppSettings; use Jbtronics\SettingsBundle\Form\SettingsFormFactoryInterface; use Jbtronics\SettingsBundle\Manager\SettingsManagerInterface; @@ -49,7 +50,7 @@ class SettingsController extends AbstractController $builder = $this->settingsFormFactory->createSettingsFormBuilder($settings); //Add a submit button to the form - $builder->add('submit', \Symfony\Component\Form\Extension\Core\Type\SubmitType::class, ['label' => 'save']); + $builder->add('submit', SubmitType::class, ['label' => 'save']); //Create the form $form = $builder->getForm(); diff --git a/src/Services/InfoProviderSystem/ExistingPartFinder.php b/src/Services/InfoProviderSystem/ExistingPartFinder.php index 762c1517..614ca105 100644 --- a/src/Services/InfoProviderSystem/ExistingPartFinder.php +++ b/src/Services/InfoProviderSystem/ExistingPartFinder.php @@ -1,5 +1,7 @@ getQuery()->getResult(); } -} \ No newline at end of file +} diff --git a/src/Twig/MiscExtension.php b/src/Twig/MiscExtension.php index 3f78a857..8b6ebc68 100644 --- a/src/Twig/MiscExtension.php +++ b/src/Twig/MiscExtension.php @@ -22,6 +22,7 @@ declare(strict_types=1); */ namespace App\Twig; +use App\Settings\SettingsIcon; use Symfony\Component\HttpFoundation\Request; use App\Services\LogSystem\EventCommentType; use Jbtronics\SettingsBundle\Proxy\SettingsProxyInterface; @@ -71,7 +72,7 @@ final class MiscExtension extends AbstractExtension $reflection = new ReflectionClass($objectOrClass); - $attribute = $reflection->getAttributes(\App\Settings\SettingsIcon::class)[0] ?? null; + $attribute = $reflection->getAttributes(SettingsIcon::class)[0] ?? null; return $attribute?->newInstance()->icon; } diff --git a/tests/Exceptions/TwigModeExceptionTest.php b/tests/Exceptions/TwigModeExceptionTest.php index c5a8ef94..686a87a2 100644 --- a/tests/Exceptions/TwigModeExceptionTest.php +++ b/tests/Exceptions/TwigModeExceptionTest.php @@ -1,4 +1,7 @@ . */ - namespace App\Tests\Exceptions; use App\Exceptions\TwigModeException; diff --git a/tests/Helpers/IPAnonymizerTest.php b/tests/Helpers/IPAnonymizerTest.php index 40030ea7..66439e90 100644 --- a/tests/Helpers/IPAnonymizerTest.php +++ b/tests/Helpers/IPAnonymizerTest.php @@ -1,4 +1,7 @@ . */ - namespace App\Tests\Helpers; use App\Helpers\IPAnonymizer; diff --git a/tests/Repository/LogEntryRepositoryTest.php b/tests/Repository/LogEntryRepositoryTest.php index c2329bc7..fc31faf5 100644 --- a/tests/Repository/LogEntryRepositoryTest.php +++ b/tests/Repository/LogEntryRepositoryTest.php @@ -1,4 +1,7 @@ . */ - namespace App\Tests\Repository; use App\Entity\LogSystem\AbstractLogEntry; diff --git a/tests/Services/LabelSystem/BarcodeScanner/EIGP114BarcodeScanResultTest.php b/tests/Services/LabelSystem/BarcodeScanner/EIGP114BarcodeScanResultTest.php index aa5e4fbc..d0ad8572 100644 --- a/tests/Services/LabelSystem/BarcodeScanner/EIGP114BarcodeScanResultTest.php +++ b/tests/Services/LabelSystem/BarcodeScanner/EIGP114BarcodeScanResultTest.php @@ -1,4 +1,7 @@ . */ - namespace App\Tests\Services\LabelSystem\BarcodeScanner; use App\Services\LabelSystem\BarcodeScanner\EIGP114BarcodeScanResult; diff --git a/tests/Services/LogSystem/TimeTravelTest.php b/tests/Services/LogSystem/TimeTravelTest.php index f8e9c088..f353cc12 100644 --- a/tests/Services/LogSystem/TimeTravelTest.php +++ b/tests/Services/LogSystem/TimeTravelTest.php @@ -1,4 +1,7 @@ . */ - namespace App\Tests\Services\LogSystem; use App\Entity\LogSystem\ElementEditedLogEntry; diff --git a/tests/SettingsTestHelper.php b/tests/SettingsTestHelper.php index 30b8a110..6124a39e 100644 --- a/tests/SettingsTestHelper.php +++ b/tests/SettingsTestHelper.php @@ -22,6 +22,8 @@ declare(strict_types=1); namespace App\Tests; +use Jbtronics\SettingsBundle\Settings\Settings; +use Jbtronics\SettingsBundle\Settings\ResettableSettingsInterface; use InvalidArgumentException; use ReflectionClass; @@ -41,14 +43,14 @@ class SettingsTestHelper $reflection = new ReflectionClass($class); //Check if it is a settings class (has a Settings attribute) - if ($reflection->getAttributes(\Jbtronics\SettingsBundle\Settings\Settings::class) === []) { + if ($reflection->getAttributes(Settings::class) === []) { throw new InvalidArgumentException("The class $class is not a settings class!"); } $object = $reflection->newInstanceWithoutConstructor(); //If the object has some initialization logic, then call it - if ($object instanceof \Jbtronics\SettingsBundle\Settings\ResettableSettingsInterface) { + if ($object instanceof ResettableSettingsInterface) { $object->resetToDefaultValues(); } From dc480f755cde7aeee05289e3459b5a35af13ec65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Mon, 14 Jul 2025 00:32:06 +0200 Subject: [PATCH 07/10] Migrated phpunit annotations to attributes --- rector.php | 4 +++ tests/API/APIDocsAvailabilityTest.php | 5 ++- .../ApplicationAvailabilityFunctionalTest.php | 11 +++---- .../AbstractAdminControllerTest.php | 24 +++++++------- .../AttachmentTypeControllerTest.php | 7 ++--- .../AdminPages/CategoryControllerTest.php | 7 ++--- .../AdminPages/FootprintControllerTest.php | 7 ++--- .../AdminPages/LabelProfileControllerTest.php | 7 +++-- .../AdminPages/ManufacturerControllerTest.php | 7 ++--- .../MeasurementUnitControllerTest.php | 7 ++--- .../AdminPages/ProjectControllerTest.php | 7 ++--- .../StorelocationControllerTest.php | 7 ++--- .../AdminPages/SupplierControllerTest.php | 7 ++--- tests/Controller/RedirectControllerTest.php | 31 +++++++++---------- .../Filters/Constraints/FilterTraitTest.php | 5 ++- tests/DatatablesAvailabilityTest.php | 5 ++- tests/Doctrine/SQLiteRegexMiddlewareTest.php | 13 +++----- tests/Entity/Attachments/AttachmentTest.php | 31 ++++++------------- tests/Entity/Parameters/PartParameterTest.php | 17 ++++------ tests/Entity/UserSystem/UserTest.php | 10 +++--- .../Helpers/BBCodeToMarkdownConverterTest.php | 3 +- tests/Helpers/IPAnonymizerTest.php | 5 ++- .../StructuralElementDenormalizerTest.php | 5 ++- .../AttachmentPathResolverTest.php | 13 +++----- .../AttachmentURLGeneratorTest.php | 3 +- .../BuiltinAttachmentsFinderTest.php | 5 ++- .../Attachments/FileTypeFilterToolsTest.php | 12 +++---- .../ImportExportSystem/EntityImporterTest.php | 10 +++--- .../InfoProviderSystem/DTOs/FileDTOTest.php | 5 ++- .../DTOs/ParameterDTOTest.php | 5 +-- .../BarcodeScanner/BarcodeRedirectorTest.php | 8 ++--- .../BarcodeScanner/BarcodeScanHelperTest.php | 9 ++---- .../Barcodes/BarcodeContentGeneratorTest.php | 9 ++---- .../LabelSystem/LabelGeneratorTest.php | 5 ++- .../LabelSystem/LabelTextReplacerTest.php | 9 ++---- .../AbstractElementProviderTest.php | 5 ++- .../GlobalProvidersTest.php | 5 ++- .../NamedElementProviderTest.php | 5 ++- .../PartLotProviderTest.php | 5 ++- .../PlaceholderProviders/PartProviderTest.php | 10 +++--- .../TimestampableElementProviderTest.php | 5 ++- .../LabelSystem/SandboxedTwigFactoryTest.php | 9 ++---- tests/Services/Misc/FAIconGeneratorTest.php | 5 ++- tests/Services/Misc/RangeParserTest.php | 9 ++---- .../Parameters/ParameterExtractorTest.php | 5 ++- .../Services/Parts/PricedetailHelperTest.php | 5 ++- .../Services/Trees/TreeViewGeneratorTest.php | 5 ++- .../UserSystem/PermissionManagerTest.php | 5 ++- .../TFA/BackupCodeGeneratorTest.php | 9 ++---- tests/Twig/UserExtensionTest.php | 5 ++- 50 files changed, 171 insertions(+), 246 deletions(-) diff --git a/rector.php b/rector.php index d1e9edd5..52457515 100644 --- a/rector.php +++ b/rector.php @@ -30,6 +30,10 @@ return RectorConfig::configure() __DIR__ . '/tests', ]) + ->withSets([ + PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES, + ]) + ->withRules([ DeclareStrictTypesRector::class ]) diff --git a/tests/API/APIDocsAvailabilityTest.php b/tests/API/APIDocsAvailabilityTest.php index d2ed7fa4..b7caa873 100644 --- a/tests/API/APIDocsAvailabilityTest.php +++ b/tests/API/APIDocsAvailabilityTest.php @@ -23,15 +23,14 @@ declare(strict_types=1); namespace App\Tests\API; +use PHPUnit\Framework\Attributes\DataProvider; use App\Entity\UserSystem\User; use Doctrine\ORM\EntityManagerInterface; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class APIDocsAvailabilityTest extends WebTestCase { - /** - * @dataProvider urlProvider - */ + #[DataProvider('urlProvider')] public function testDocAvailabilityForLoggedInUser(string $url): void { self::ensureKernelShutdown(); diff --git a/tests/ApplicationAvailabilityFunctionalTest.php b/tests/ApplicationAvailabilityFunctionalTest.php index 519f0cd5..3f5a911e 100644 --- a/tests/ApplicationAvailabilityFunctionalTest.php +++ b/tests/ApplicationAvailabilityFunctionalTest.php @@ -22,20 +22,19 @@ declare(strict_types=1); namespace App\Tests; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\DataProvider; use Generator; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; /** * This test just ensures that different pages are available (do not throw an exception). - * - * @group DB - * @group slow */ +#[Group('DB')] +#[Group('slow')] class ApplicationAvailabilityFunctionalTest extends WebTestCase { - /** - * @dataProvider urlProvider - */ + #[DataProvider('urlProvider')] public function testPageIsSuccessful(string $url): void { //We have localized routes diff --git a/tests/Controller/AdminPages/AbstractAdminControllerTest.php b/tests/Controller/AdminPages/AbstractAdminControllerTest.php index af3aefee..ec858e4e 100644 --- a/tests/Controller/AdminPages/AbstractAdminControllerTest.php +++ b/tests/Controller/AdminPages/AbstractAdminControllerTest.php @@ -22,13 +22,13 @@ declare(strict_types=1); namespace App\Tests\Controller\AdminPages; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\DataProvider; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\Security\Core\Exception\AccessDeniedException; -/** - * @group slow - * @group DB - */ +#[Group('slow')] +#[Group('DB')] abstract class AbstractAdminControllerTest extends WebTestCase { protected static string $base_path = 'not_valid'; @@ -43,10 +43,10 @@ abstract class AbstractAdminControllerTest extends WebTestCase } /** - * @dataProvider readDataProvider - * @group slow * Tests if you can access the /new part which is used to list all entities. Checks if permissions are working */ + #[DataProvider('readDataProvider')] + #[Group('slow')] public function testListEntries(string $user, bool $read): void { static::ensureKernelShutdown(); @@ -72,10 +72,13 @@ abstract class AbstractAdminControllerTest extends WebTestCase } /** - * @dataProvider readDataProvider - * @group slow * Tests if it is possible to access a specific entity. Checks if permissions are working. + * @param string $user + * @param bool $read + * @return void */ + #[DataProvider('readDataProvider')] + #[Group('slow')] public function testReadEntity(string $user, bool $read): void { //Test read access @@ -106,10 +109,9 @@ abstract class AbstractAdminControllerTest extends WebTestCase /** * Tests if deleting an entity is working. - * - * @group slow - * @dataProvider deleteDataProvider */ + #[DataProvider('deleteDataProvider')] + #[Group('slow')] public function testDeleteEntity(string $user, bool $delete): void { //Test read access diff --git a/tests/Controller/AdminPages/AttachmentTypeControllerTest.php b/tests/Controller/AdminPages/AttachmentTypeControllerTest.php index b98650bf..0a5b0f6d 100644 --- a/tests/Controller/AdminPages/AttachmentTypeControllerTest.php +++ b/tests/Controller/AdminPages/AttachmentTypeControllerTest.php @@ -22,12 +22,11 @@ declare(strict_types=1); namespace App\Tests\Controller\AdminPages; +use PHPUnit\Framework\Attributes\Group; use App\Entity\Attachments\AttachmentType; -/** - * @group slow - * @group DB - */ +#[Group('slow')] +#[Group('DB')] class AttachmentTypeControllerTest extends AbstractAdminControllerTest { protected static string $base_path = '/en/attachment_type'; diff --git a/tests/Controller/AdminPages/CategoryControllerTest.php b/tests/Controller/AdminPages/CategoryControllerTest.php index aa325b31..81a251b9 100644 --- a/tests/Controller/AdminPages/CategoryControllerTest.php +++ b/tests/Controller/AdminPages/CategoryControllerTest.php @@ -22,12 +22,11 @@ declare(strict_types=1); namespace App\Tests\Controller\AdminPages; +use PHPUnit\Framework\Attributes\Group; use App\Entity\Parts\Category; -/** - * @group slow - * @group DB - */ +#[Group('slow')] +#[Group('DB')] class CategoryControllerTest extends AbstractAdminControllerTest { protected static string $base_path = '/en/category'; diff --git a/tests/Controller/AdminPages/FootprintControllerTest.php b/tests/Controller/AdminPages/FootprintControllerTest.php index 6381ecd6..64b4164e 100644 --- a/tests/Controller/AdminPages/FootprintControllerTest.php +++ b/tests/Controller/AdminPages/FootprintControllerTest.php @@ -22,12 +22,11 @@ declare(strict_types=1); namespace App\Tests\Controller\AdminPages; +use PHPUnit\Framework\Attributes\Group; use App\Entity\Parts\Footprint; -/** - * @group slow - * @group DB - */ +#[Group('slow')] +#[Group('DB')] class FootprintControllerTest extends AbstractAdminControllerTest { protected static string $base_path = '/en/footprint'; diff --git a/tests/Controller/AdminPages/LabelProfileControllerTest.php b/tests/Controller/AdminPages/LabelProfileControllerTest.php index b4ce79cc..02d294e5 100644 --- a/tests/Controller/AdminPages/LabelProfileControllerTest.php +++ b/tests/Controller/AdminPages/LabelProfileControllerTest.php @@ -41,6 +41,8 @@ declare(strict_types=1); namespace App\Tests\Controller\AdminPages; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use App\Entity\LabelSystem\LabelProfile; use Symfony\Component\Security\Core\Exception\AccessDeniedException; @@ -51,10 +53,9 @@ class LabelProfileControllerTest extends AbstractAdminControllerTest /** * Tests if deleting an entity is working. - * - * @group slow - * @dataProvider deleteDataProvider */ + #[DataProvider('deleteDataProvider')] + #[Group('slow')] public function testDeleteEntity(string $user, bool $delete): void { //Test read access diff --git a/tests/Controller/AdminPages/ManufacturerControllerTest.php b/tests/Controller/AdminPages/ManufacturerControllerTest.php index d454c604..577c19af 100644 --- a/tests/Controller/AdminPages/ManufacturerControllerTest.php +++ b/tests/Controller/AdminPages/ManufacturerControllerTest.php @@ -22,12 +22,11 @@ declare(strict_types=1); namespace App\Tests\Controller\AdminPages; +use PHPUnit\Framework\Attributes\Group; use App\Entity\Parts\Manufacturer; -/** - * @group slow - * @group DB - */ +#[Group('slow')] +#[Group('DB')] class ManufacturerControllerTest extends AbstractAdminControllerTest { protected static string $base_path = '/en/manufacturer'; diff --git a/tests/Controller/AdminPages/MeasurementUnitControllerTest.php b/tests/Controller/AdminPages/MeasurementUnitControllerTest.php index 83eec70b..4ebfad26 100644 --- a/tests/Controller/AdminPages/MeasurementUnitControllerTest.php +++ b/tests/Controller/AdminPages/MeasurementUnitControllerTest.php @@ -22,12 +22,11 @@ declare(strict_types=1); namespace App\Tests\Controller\AdminPages; +use PHPUnit\Framework\Attributes\Group; use App\Entity\Parts\MeasurementUnit; -/** - * @group slow - * @group DB - */ +#[Group('slow')] +#[Group('DB')] class MeasurementUnitControllerTest extends AbstractAdminControllerTest { protected static string $base_path = '/en/measurement_unit'; diff --git a/tests/Controller/AdminPages/ProjectControllerTest.php b/tests/Controller/AdminPages/ProjectControllerTest.php index c0f5c288..b0a353ae 100644 --- a/tests/Controller/AdminPages/ProjectControllerTest.php +++ b/tests/Controller/AdminPages/ProjectControllerTest.php @@ -23,12 +23,11 @@ declare(strict_types=1); namespace App\Tests\Controller\AdminPages; +use PHPUnit\Framework\Attributes\Group; use App\Entity\ProjectSystem\Project; -/** - * @group slow - * @group DB - */ +#[Group('slow')] +#[Group('DB')] class ProjectControllerTest extends AbstractAdminControllerTest { protected static string $base_path = '/en/project'; diff --git a/tests/Controller/AdminPages/StorelocationControllerTest.php b/tests/Controller/AdminPages/StorelocationControllerTest.php index 65a9fe34..42e57bc5 100644 --- a/tests/Controller/AdminPages/StorelocationControllerTest.php +++ b/tests/Controller/AdminPages/StorelocationControllerTest.php @@ -22,12 +22,11 @@ declare(strict_types=1); namespace App\Tests\Controller\AdminPages; +use PHPUnit\Framework\Attributes\Group; use App\Entity\Parts\StorageLocation; -/** - * @group slow - * @group DB - */ +#[Group('slow')] +#[Group('DB')] class StorelocationControllerTest extends AbstractAdminControllerTest { protected static string $base_path = '/en/store_location'; diff --git a/tests/Controller/AdminPages/SupplierControllerTest.php b/tests/Controller/AdminPages/SupplierControllerTest.php index d98a7f69..3a147576 100644 --- a/tests/Controller/AdminPages/SupplierControllerTest.php +++ b/tests/Controller/AdminPages/SupplierControllerTest.php @@ -22,12 +22,11 @@ declare(strict_types=1); namespace App\Tests\Controller\AdminPages; +use PHPUnit\Framework\Attributes\Group; use App\Entity\Parts\Supplier; -/** - * @group slow - * @group DB - */ +#[Group('slow')] +#[Group('DB')] class SupplierControllerTest extends AbstractAdminControllerTest { protected static string $base_path = '/en/supplier'; diff --git a/tests/Controller/RedirectControllerTest.php b/tests/Controller/RedirectControllerTest.php index f62c05c3..af322c43 100644 --- a/tests/Controller/RedirectControllerTest.php +++ b/tests/Controller/RedirectControllerTest.php @@ -22,16 +22,17 @@ declare(strict_types=1); namespace App\Tests\Controller; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Depends; use Symfony\Bundle\FrameworkBundle\KernelBrowser; use App\Entity\UserSystem\User; use App\Repository\UserRepository; use Doctrine\ORM\EntityManagerInterface; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; -/** - * @group slow - * @group DB - */ +#[Group('slow')] +#[Group('DB')] class RedirectControllerTest extends WebTestCase { protected EntityManagerInterface $em; @@ -64,10 +65,9 @@ class RedirectControllerTest extends WebTestCase /** * Test if a certain request to an url will be redirected. - * - * @dataProvider urlMatchDataProvider - * @group slow */ + #[DataProvider('urlMatchDataProvider')] + #[Group('slow')] public function testUrlMatch($url, $expect_redirect): void { //$client = static::createClient(); @@ -97,11 +97,10 @@ class RedirectControllerTest extends WebTestCase /** * Test if the user is redirected to the localized version of a page, based on his settings. - * - * @dataProvider urlAddLocaleDataProvider - * @group slow - * @depends testUrlMatch */ + #[Depends('testUrlMatch')] + #[DataProvider('urlAddLocaleDataProvider')] + #[Group('slow')] public function testAddLocale(?string $user_locale, string $input_path, string $redirect_path): void { //Redirect path is absolute @@ -121,10 +120,9 @@ class RedirectControllerTest extends WebTestCase /** * Test if the user is redirected to the localized version of a page, based on his settings. * We simulate the situation of a reverse proxy here, by adding a prefix to the path. - * - * @dataProvider urlAddLocaleDataProvider - * @group slow */ + #[DataProvider('urlAddLocaleDataProvider')] + #[Group('slow')] public function testAddLocaleReverseProxy(?string $user_locale, string $input_path, string $redirect_path): void { //Input path remains unchanged, as this is what the server receives from the proxy @@ -147,10 +145,9 @@ class RedirectControllerTest extends WebTestCase /** * Test if the user is redirected to the localized version of a page, based on his settings. * We simulate the situation of serving Part-DB in a subfolder here. - * - * @dataProvider urlAddLocaleDataProvider - * @group slow */ + #[DataProvider('urlAddLocaleDataProvider')] + #[Group('slow')] public function testAddLocaleSubfolder(?string $user_locale, string $input_path, string $redirect_path): void { //Prefix our path with the proxy prefix diff --git a/tests/DataTables/Filters/Constraints/FilterTraitTest.php b/tests/DataTables/Filters/Constraints/FilterTraitTest.php index 1e32fdd8..8d87071c 100644 --- a/tests/DataTables/Filters/Constraints/FilterTraitTest.php +++ b/tests/DataTables/Filters/Constraints/FilterTraitTest.php @@ -22,6 +22,7 @@ declare(strict_types=1); */ namespace App\Tests\DataTables\Filters\Constraints; +use PHPUnit\Framework\Attributes\DataProvider; use App\DataTables\Filters\Constraints\FilterTrait; use PHPUnit\Framework\TestCase; @@ -48,9 +49,7 @@ class FilterTraitTest extends TestCase yield [true, 'MAX(attachments.value)']; } - /** - * @dataProvider isAggregateFunctionStringDataProvider - */ + #[DataProvider('isAggregateFunctionStringDataProvider')] public function testIsAggregateFunctionString(bool $expected, string $input): void { $this->assertEquals($expected, $this->isAggregateFunctionString($input)); diff --git a/tests/DatatablesAvailabilityTest.php b/tests/DatatablesAvailabilityTest.php index 5af04627..9e4e7f15 100644 --- a/tests/DatatablesAvailabilityTest.php +++ b/tests/DatatablesAvailabilityTest.php @@ -41,13 +41,12 @@ declare(strict_types=1); namespace App\Tests; +use PHPUnit\Framework\Attributes\DataProvider; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class DatatablesAvailabilityTest extends WebTestCase { - /** - * @dataProvider urlProvider - */ + #[DataProvider('urlProvider')] public function testDataTable(string $url, ?array $ordering = null): void { //We have localized routes diff --git a/tests/Doctrine/SQLiteRegexMiddlewareTest.php b/tests/Doctrine/SQLiteRegexMiddlewareTest.php index 01abb16e..6278cc54 100644 --- a/tests/Doctrine/SQLiteRegexMiddlewareTest.php +++ b/tests/Doctrine/SQLiteRegexMiddlewareTest.php @@ -22,6 +22,7 @@ declare(strict_types=1); */ namespace App\Tests\Doctrine; +use PHPUnit\Framework\Attributes\DataProvider; use App\Doctrine\Middleware\SQLiteRegexExtensionMiddlewareDriver; use PHPUnit\Framework\TestCase; @@ -41,9 +42,7 @@ class SQLiteRegexMiddlewareTest extends TestCase yield [1, '^a\d+$', 'a123']; } - /** - * @dataProvider regexpDataProvider - */ + #[DataProvider('regexpDataProvider')] public function testRegexp(int $expected, string $pattern, string $value): void { $this->assertSame($expected, SQLiteRegexExtensionMiddlewareDriver::regexp($pattern, $value)); @@ -73,17 +72,13 @@ class SQLiteRegexMiddlewareTest extends TestCase yield [6, 'c', ['b', 'a', 'b', 'a', 'b', 'c']]; } - /** - * @dataProvider fieldDataProvider - */ + #[DataProvider('fieldDataProvider')] public function testField(int $expected, string|int|null $value, array $array): void { $this->assertSame($expected, SQLiteRegexExtensionMiddlewareDriver::field($value, ...$array)); } - /** - * @dataProvider fieldDataProvider - */ + #[DataProvider('fieldDataProvider')] public function testField2(int $expected, string|int|null $value, array $array): void { //Should be the same as field, but with the array comma imploded diff --git a/tests/Entity/Attachments/AttachmentTest.php b/tests/Entity/Attachments/AttachmentTest.php index bac28fd4..c019c4bf 100644 --- a/tests/Entity/Attachments/AttachmentTest.php +++ b/tests/Entity/Attachments/AttachmentTest.php @@ -22,6 +22,8 @@ declare(strict_types=1); namespace App\Tests\Entity\Attachments; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Depends; use App\Entity\Attachments\Attachment; use App\Entity\Attachments\AttachmentType; use App\Entity\Attachments\AttachmentTypeAttachment; @@ -89,9 +91,7 @@ class AttachmentTest extends TestCase yield [UserAttachment::class, User::class]; } - /** - * @dataProvider subClassesDataProvider - */ + #[DataProvider('subClassesDataProvider')] public function testSetElement(string $attachment_class, string $allowed_class): void { /** @var Attachment $attachment */ @@ -106,10 +106,9 @@ class AttachmentTest extends TestCase /** * Test that all attachment subclasses like PartAttachment or similar returns an exception, when a not allowed * element is passed. - * - * @dataProvider subClassesDataProvider - * @depends testSetElement */ + #[Depends('testSetElement')] + #[DataProvider('subClassesDataProvider')] public function testSetElementExceptionOnSubClasses(string $attachment_class, string $allowed_class): void { $this->expectException(InvalidArgumentException::class); @@ -135,9 +134,7 @@ class AttachmentTest extends TestCase yield [null, 'test.txt', null, null]; } - /** - * @dataProvider extensionDataProvider - */ + #[DataProvider('extensionDataProvider')] public function testGetExtension(?string $internal_path, ?string $external_path, ?string $originalFilename, ?string $expected): void { $attachment = new PartAttachment(); @@ -162,9 +159,7 @@ class AttachmentTest extends TestCase yield ['%SECURE%/foo.txt/test', 'https://test.de/picture.jpeg', false]; } - /** - * @dataProvider pictureDataProvider - */ + #[DataProvider('pictureDataProvider')] public function testIsPicture(?string $internal_path, ?string $external_path, bool $expected): void { $attachment = new PartAttachment(); @@ -184,9 +179,7 @@ class AttachmentTest extends TestCase yield ['%FOOTPRINTS%/foo/bar.txt', true]; } - /** - * @dataProvider builtinDataProvider - */ + #[DataProvider('builtinDataProvider')] public function testIsBuiltIn(?string $path, $expected): void { $attachment = new PartAttachment(); @@ -201,9 +194,7 @@ class AttachmentTest extends TestCase yield ['https://foo.bar/test?txt=test', 'foo.bar']; } - /** - * @dataProvider hostDataProvider - */ + #[DataProvider('hostDataProvider')] public function testGetHost(?string $path, ?string $expected): void { $attachment = new PartAttachment(); @@ -219,9 +210,7 @@ class AttachmentTest extends TestCase yield [null, 'https://www.google.de/test.txt', null, null]; } - /** - * @dataProvider filenameProvider - */ + #[DataProvider('filenameProvider')] public function testGetFilename(?string $internal_path, ?string $external_path, ?string $original_filename, ?string $expected): void { $attachment = new PartAttachment(); diff --git a/tests/Entity/Parameters/PartParameterTest.php b/tests/Entity/Parameters/PartParameterTest.php index 0e426d52..aec471cb 100644 --- a/tests/Entity/Parameters/PartParameterTest.php +++ b/tests/Entity/Parameters/PartParameterTest.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Tests\Entity\Parameters; +use PHPUnit\Framework\Attributes\DataProvider; use App\Entity\Parameters\PartParameter; use PHPUnit\Framework\TestCase; @@ -80,9 +81,7 @@ class PartParameterTest extends TestCase yield ['10.23 $\mathrm{V}$ (9 $\mathrm{V}$ ... 11 $\mathrm{V}$) [Test]', 9, 10.23, 11, 'V', 'Test']; } - /** - * @dataProvider valueWithUnitDataProvider - */ + #[DataProvider('valueWithUnitDataProvider')] public function testGetValueMinWithUnit(string $expected, float $value, string $unit): void { $param = new PartParameter(); @@ -91,9 +90,7 @@ class PartParameterTest extends TestCase $this->assertSame($expected, $param->getValueMinWithUnit()); } - /** - * @dataProvider valueWithUnitDataProvider - */ + #[DataProvider('valueWithUnitDataProvider')] public function testGetValueMaxWithUnit(string $expected, float $value, string $unit): void { $param = new PartParameter(); @@ -102,9 +99,7 @@ class PartParameterTest extends TestCase $this->assertSame($expected, $param->getValueMaxWithUnit()); } - /** - * @dataProvider valueWithUnitDataProvider - */ + #[DataProvider('valueWithUnitDataProvider')] public function testGetValueTypicalWithUnit(string $expected, float $value, string $unit): void { $param = new PartParameter(); @@ -114,12 +109,12 @@ class PartParameterTest extends TestCase } /** - * @dataProvider formattedValueDataProvider * * @param float $min * @param float $typical * @param float $max */ + #[DataProvider('formattedValueDataProvider')] public function testGetFormattedValue(string $expected, ?float $min, ?float $typical, ?float $max, string $unit, string $text): void { $param = new PartParameter(); @@ -132,12 +127,12 @@ class PartParameterTest extends TestCase } /** - * @dataProvider formattedValueWithLatexDataProvider * * @param float $min * @param float $typical * @param float $max */ + #[DataProvider('formattedValueWithLatexDataProvider')] public function testGetFormattedValueWithLatex(string $expected, ?float $min, ?float $typical, ?float $max, string $unit, string $text): void { $param = new PartParameter(); diff --git a/tests/Entity/UserSystem/UserTest.php b/tests/Entity/UserSystem/UserTest.php index f11eec0f..bc4dec2d 100644 --- a/tests/Entity/UserSystem/UserTest.php +++ b/tests/Entity/UserSystem/UserTest.php @@ -22,6 +22,8 @@ declare(strict_types=1); namespace App\Tests\Entity\UserSystem; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\RequiresPhpunit; use App\Entity\UserSystem\User; use App\Entity\UserSystem\WebauthnKey; use Doctrine\Common\Collections\Collection; @@ -52,9 +54,7 @@ class UserTest extends TestCase yield ['SSSk38498', true]; } - /** - * @dataProvider googleAuthenticatorEnabledDataProvider - */ + #[DataProvider('googleAuthenticatorEnabledDataProvider')] public function testIsGoogleAuthenticatorEnabled(?string $secret, bool $expected): void { $user = new User(); @@ -62,9 +62,7 @@ class UserTest extends TestCase $this->assertSame($expected, $user->isGoogleAuthenticatorEnabled()); } - /** - * @requires PHPUnit 8 - */ + #[RequiresPhpunit('8')] public function testSetBackupCodes(): void { $user = new User(); diff --git a/tests/Helpers/BBCodeToMarkdownConverterTest.php b/tests/Helpers/BBCodeToMarkdownConverterTest.php index 093ff98f..ad29f959 100644 --- a/tests/Helpers/BBCodeToMarkdownConverterTest.php +++ b/tests/Helpers/BBCodeToMarkdownConverterTest.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace App\Tests\Helpers; +use PHPUnit\Framework\Attributes\DataProvider; use App\Helpers\BBCodeToMarkdownConverter; use PHPUnit\Framework\TestCase; @@ -46,11 +47,11 @@ class BBCodeToMarkdownConverterTest extends TestCase } /** - * @dataProvider dataProvider * * @param $bbcode * @param $expected */ + #[DataProvider('dataProvider')] public function testConvert($bbcode, $expected): void { $this->assertSame($expected, $this->converter->convert($bbcode)); diff --git a/tests/Helpers/IPAnonymizerTest.php b/tests/Helpers/IPAnonymizerTest.php index 66439e90..24994c49 100644 --- a/tests/Helpers/IPAnonymizerTest.php +++ b/tests/Helpers/IPAnonymizerTest.php @@ -22,6 +22,7 @@ declare(strict_types=1); */ namespace App\Tests\Helpers; +use PHPUnit\Framework\Attributes\DataProvider; use App\Helpers\IPAnonymizer; use PHPUnit\Framework\TestCase; @@ -36,9 +37,7 @@ class IPAnonymizerTest extends TestCase yield ['fe80::', 'fe80::1fc4:15d8:78db:2319%enp4s0']; } - /** - * @dataProvider anonymizeDataProvider - */ + #[DataProvider('anonymizeDataProvider')] public function testAnonymize(string $expected, string $input): void { $this->assertSame($expected, IPAnonymizer::anonymize($input)); diff --git a/tests/Serializer/StructuralElementDenormalizerTest.php b/tests/Serializer/StructuralElementDenormalizerTest.php index 2543c4f3..31c9f0bb 100644 --- a/tests/Serializer/StructuralElementDenormalizerTest.php +++ b/tests/Serializer/StructuralElementDenormalizerTest.php @@ -22,6 +22,7 @@ declare(strict_types=1); */ namespace App\Tests\Serializer; +use PHPUnit\Framework\Attributes\Group; use App\Entity\Parts\Category; use App\Serializer\StructuralElementDenormalizer; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -53,9 +54,7 @@ class StructuralElementDenormalizerTest extends WebTestCase $this->assertTrue($this->service->supportsDenormalization(['name' => 'Test'], Category::class, 'json', ['groups' => ['import'], 'partdb_import' => true])); } - /** - * @group DB - */ + #[Group('DB')] public function testDenormalize(): void { //Check that we retrieve DB elements via the name diff --git a/tests/Services/Attachments/AttachmentPathResolverTest.php b/tests/Services/Attachments/AttachmentPathResolverTest.php index 3c432f48..b304e645 100644 --- a/tests/Services/Attachments/AttachmentPathResolverTest.php +++ b/tests/Services/Attachments/AttachmentPathResolverTest.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace App\Tests\Services\Attachments; +use PHPUnit\Framework\Attributes\DataProvider; use App\Services\Formatters\AmountFormatter; use App\Services\Attachments\AttachmentPathResolver; use const DIRECTORY_SEPARATOR; @@ -119,17 +120,13 @@ class AttachmentPathResolverTest extends WebTestCase yield ['/not/root'.$this->footprint_path, null]; } - /** - * @dataProvider placeholderDataProvider - */ + #[DataProvider('placeholderDataProvider')] public function testPlaceholderToRealPath($param, $expected): void { $this->assertSame($expected, $this->service->placeholderToRealPath($param)); } - /** - * @dataProvider realPathDataProvider - */ + #[DataProvider('realPathDataProvider')] public function testRealPathToPlaceholder($param, $expected, $old_method = false): void { $this->assertSame($expected, $this->service->realPathToPlaceholder($param, $old_method)); @@ -154,9 +151,7 @@ class AttachmentPathResolverTest extends WebTestCase yield [$this->footprint_path . '/Passive/Capacitors/CAPACITOR_CTS_A_15MM.png', '%FOOTPRINTS%/Passive/Capacitors/CAPACITOR_CTS_A_15MM.png']; } - /** - * @dataProvider germanFootprintPathdDataProvider - */ + #[DataProvider('germanFootprintPathdDataProvider')] public function testConversionOfGermanFootprintPaths(string $expected, string $input): void { $this->assertSame($expected, $this->service->placeholderToRealPath($input)); diff --git a/tests/Services/Attachments/AttachmentURLGeneratorTest.php b/tests/Services/Attachments/AttachmentURLGeneratorTest.php index 0db57f29..7816f697 100644 --- a/tests/Services/Attachments/AttachmentURLGeneratorTest.php +++ b/tests/Services/Attachments/AttachmentURLGeneratorTest.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace App\Tests\Services\Attachments; +use PHPUnit\Framework\Attributes\DataProvider; use App\Services\Attachments\AttachmentURLGenerator; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -48,11 +49,11 @@ class AttachmentURLGeneratorTest extends WebTestCase } /** - * @dataProvider dataProvider * * @param $input * @param $expected */ + #[DataProvider('dataProvider')] public function testTestabsolutePathToAssetPath($input, $expected): void { $this->assertSame($expected, static::$service->absolutePathToAssetPath($input, static::PUBLIC_DIR)); diff --git a/tests/Services/Attachments/BuiltinAttachmentsFinderTest.php b/tests/Services/Attachments/BuiltinAttachmentsFinderTest.php index 5ca656e3..569d84f9 100644 --- a/tests/Services/Attachments/BuiltinAttachmentsFinderTest.php +++ b/tests/Services/Attachments/BuiltinAttachmentsFinderTest.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace App\Tests\Services\Attachments; +use PHPUnit\Framework\Attributes\DataProvider; use App\Services\Attachments\BuiltinAttachmentsFinder; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -54,9 +55,7 @@ class BuiltinAttachmentsFinderTest extends WebTestCase yield ['.txt', [], ['%FOOTPRINTS_3D%/hallo.txt']]; } - /** - * @dataProvider dataProvider - */ + #[DataProvider('dataProvider')] public function testFind($keyword, $options, $expected): void { $value = static::$service->find($keyword, $options, static::$mock_list); diff --git a/tests/Services/Attachments/FileTypeFilterToolsTest.php b/tests/Services/Attachments/FileTypeFilterToolsTest.php index a6032a4b..73002371 100644 --- a/tests/Services/Attachments/FileTypeFilterToolsTest.php +++ b/tests/Services/Attachments/FileTypeFilterToolsTest.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace App\Tests\Services\Attachments; +use PHPUnit\Framework\Attributes\DataProvider; use App\Services\Attachments\FileTypeFilterTools; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -85,25 +86,20 @@ class FileTypeFilterToolsTest extends WebTestCase /** * Test the validateFilterString method. - * - * @dataProvider validateDataProvider */ + #[DataProvider('validateDataProvider')] public function testValidateFilterString(string $filter, bool $expected): void { $this->assertSame($expected, self::$service->validateFilterString($filter)); } - /** - * @dataProvider normalizeDataProvider - */ + #[DataProvider('normalizeDataProvider')] public function testNormalizeFilterString(string $filter, string $expected): void { $this->assertSame($expected, self::$service->normalizeFilterString($filter)); } - /** - * @dataProvider extensionAllowedDataProvider - */ + #[DataProvider('extensionAllowedDataProvider')] public function testIsExtensionAllowed(string $filter, string $extension, bool $expected): void { $this->assertSame($expected, self::$service->isExtensionAllowed($filter, $extension)); diff --git a/tests/Services/ImportExportSystem/EntityImporterTest.php b/tests/Services/ImportExportSystem/EntityImporterTest.php index 31859b6a..8f7d1004 100644 --- a/tests/Services/ImportExportSystem/EntityImporterTest.php +++ b/tests/Services/ImportExportSystem/EntityImporterTest.php @@ -22,6 +22,8 @@ declare(strict_types=1); namespace App\Tests\Services\ImportExportSystem; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\DataProvider; use App\Entity\Attachments\AttachmentContainingDBElement; use App\Entity\Attachments\AttachmentType; use App\Entity\LabelSystem\LabelProfile; @@ -35,9 +37,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\Validator\ConstraintViolation; use Symfony\Component\Validator\ConstraintViolationListInterface; -/** - * @group DB - */ +#[Group('DB')] class EntityImporterTest extends WebTestCase { /** @@ -184,9 +184,7 @@ EOT; yield ['yaml', 'YAML']; } - /** - * @dataProvider formatDataProvider - */ + #[DataProvider('formatDataProvider')] public function testDetermineFormat(string $expected, string $extension): void { $this->assertSame($expected, $this->service->determineFormat($extension)); diff --git a/tests/Services/InfoProviderSystem/DTOs/FileDTOTest.php b/tests/Services/InfoProviderSystem/DTOs/FileDTOTest.php index f6e145f9..10312aca 100644 --- a/tests/Services/InfoProviderSystem/DTOs/FileDTOTest.php +++ b/tests/Services/InfoProviderSystem/DTOs/FileDTOTest.php @@ -22,6 +22,7 @@ declare(strict_types=1); */ namespace App\Tests\Services\InfoProviderSystem\DTOs; +use PHPUnit\Framework\Attributes\DataProvider; use App\Services\InfoProviderSystem\DTOs\FileDTO; use PHPUnit\Framework\TestCase; @@ -40,9 +41,7 @@ class FileDTOTest extends TestCase yield ["test%7Cse", "test|se"]; } - /** - * @dataProvider escapingDataProvider - */ + #[DataProvider('escapingDataProvider')] public function testURLEscaping(string $expected, string $input): void { $fileDTO = new FileDTO( $input); diff --git a/tests/Services/InfoProviderSystem/DTOs/ParameterDTOTest.php b/tests/Services/InfoProviderSystem/DTOs/ParameterDTOTest.php index ee4ca39a..4bc9f5c6 100644 --- a/tests/Services/InfoProviderSystem/DTOs/ParameterDTOTest.php +++ b/tests/Services/InfoProviderSystem/DTOs/ParameterDTOTest.php @@ -22,6 +22,7 @@ declare(strict_types=1); */ namespace App\Tests\Services\InfoProviderSystem\DTOs; +use PHPUnit\Framework\Attributes\DataProvider; use App\Services\InfoProviderSystem\DTOs\ParameterDTO; use PHPUnit\Framework\TestCase; @@ -234,18 +235,18 @@ class ParameterDTOTest extends TestCase } /** - * @dataProvider parseValueFieldDataProvider * @return void */ + #[DataProvider('parseValueFieldDataProvider')] public function testParseValueField(ParameterDTO $expected, string $name, string|float $value, ?string $unit = null, ?string $symbol = null, ?string $group = null) { $this->assertEquals($expected, ParameterDTO::parseValueField($name, $value, $unit, $symbol, $group)); } /** - * @dataProvider parseValueIncludingUnitDataProvider * @return void */ + #[DataProvider('parseValueIncludingUnitDataProvider')] public function testParseValueIncludingUnit(ParameterDTO $expected, string $name, string|float $value, ?string $symbol = null, ?string $group = null) { $this->assertEquals($expected, ParameterDTO::parseValueIncludingUnit($name, $value, $symbol, $group)); diff --git a/tests/Services/LabelSystem/BarcodeScanner/BarcodeRedirectorTest.php b/tests/Services/LabelSystem/BarcodeScanner/BarcodeRedirectorTest.php index 58030f93..c40e141d 100644 --- a/tests/Services/LabelSystem/BarcodeScanner/BarcodeRedirectorTest.php +++ b/tests/Services/LabelSystem/BarcodeScanner/BarcodeRedirectorTest.php @@ -41,6 +41,8 @@ declare(strict_types=1); namespace App\Tests\Services\LabelSystem\BarcodeScanner; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use App\Entity\LabelSystem\LabelSupportedElement; use App\Services\LabelSystem\BarcodeScanner\BarcodeRedirector; use App\Services\LabelSystem\BarcodeScanner\BarcodeSourceType; @@ -66,10 +68,8 @@ final class BarcodeRedirectorTest extends KernelTestCase yield [new LocalBarcodeScanResult(LabelSupportedElement::STORELOCATION, 1, BarcodeSourceType::INTERNAL), '/en/store_location/1/parts']; } - /** - * @dataProvider urlDataProvider - * @group DB - */ + #[DataProvider('urlDataProvider')] + #[Group('DB')] public function testGetRedirectURL(LocalBarcodeScanResult $scanResult, string $url): void { $this->assertSame($url, $this->service->getRedirectURL($scanResult)); diff --git a/tests/Services/LabelSystem/BarcodeScanner/BarcodeScanHelperTest.php b/tests/Services/LabelSystem/BarcodeScanner/BarcodeScanHelperTest.php index 74ae068a..fcea7730 100644 --- a/tests/Services/LabelSystem/BarcodeScanner/BarcodeScanHelperTest.php +++ b/tests/Services/LabelSystem/BarcodeScanner/BarcodeScanHelperTest.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Tests\Services\LabelSystem\BarcodeScanner; +use PHPUnit\Framework\Attributes\DataProvider; use App\Entity\LabelSystem\LabelSupportedElement; use App\Services\LabelSystem\BarcodeScanner\BarcodeScanHelper; use App\Services\LabelSystem\BarcodeScanner\BarcodeScanResultInterface; @@ -140,17 +141,13 @@ class BarcodeScanHelperTest extends WebTestCase yield ['']; } - /** - * @dataProvider dataProvider - */ + #[DataProvider('dataProvider')] public function testNormalizeBarcodeContent(BarcodeScanResultInterface $expected, string $input): void { $this->assertEquals($expected, $this->service->scanBarcodeContent($input)); } - /** - * @dataProvider invalidDataProvider - */ + #[DataProvider('invalidDataProvider')] public function testInvalidFormats(string $input): void { $this->expectException(\InvalidArgumentException::class); diff --git a/tests/Services/LabelSystem/Barcodes/BarcodeContentGeneratorTest.php b/tests/Services/LabelSystem/Barcodes/BarcodeContentGeneratorTest.php index 9d0ed7e2..ecaa8bf5 100644 --- a/tests/Services/LabelSystem/Barcodes/BarcodeContentGeneratorTest.php +++ b/tests/Services/LabelSystem/Barcodes/BarcodeContentGeneratorTest.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Tests\Services\LabelSystem\Barcodes; +use PHPUnit\Framework\Attributes\DataProvider; use App\Entity\Parts\Part; use App\Entity\Parts\PartLot; use App\Entity\Parts\StorageLocation; @@ -71,17 +72,13 @@ class BarcodeContentGeneratorTest extends KernelTestCase yield ['/scan/location/0', StorageLocation::class]; } - /** - * @dataProvider Barcode1DDataProvider - */ + #[DataProvider('Barcode1DDataProvider')] public function testGet1DBarcodeContent(string $expected, string $class): void { $this->assertSame($expected, $this->service->get1DBarcodeContent(new $class())); } - /** - * @dataProvider Barcode2DDataProvider - */ + #[DataProvider('Barcode2DDataProvider')] public function testGetURLContent(string $expected, string $class): void { $url = $this->service->getURLContent(new $class()); diff --git a/tests/Services/LabelSystem/LabelGeneratorTest.php b/tests/Services/LabelSystem/LabelGeneratorTest.php index 88ab97c5..916d4317 100644 --- a/tests/Services/LabelSystem/LabelGeneratorTest.php +++ b/tests/Services/LabelSystem/LabelGeneratorTest.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Tests\Services\LabelSystem; +use PHPUnit\Framework\Attributes\DataProvider; use App\Entity\Base\AbstractDBElement; use App\Entity\LabelSystem\LabelOptions; use App\Entity\LabelSystem\LabelSupportedElement; @@ -70,9 +71,7 @@ class LabelGeneratorTest extends WebTestCase yield [LabelSupportedElement::STORELOCATION, StorageLocation::class]; } - /** - * @dataProvider supportsDataProvider - */ + #[DataProvider('supportsDataProvider')] public function testSupports(LabelSupportedElement $type, string $class): void { $options = new LabelOptions(); diff --git a/tests/Services/LabelSystem/LabelTextReplacerTest.php b/tests/Services/LabelSystem/LabelTextReplacerTest.php index e5c7c26e..4af74275 100644 --- a/tests/Services/LabelSystem/LabelTextReplacerTest.php +++ b/tests/Services/LabelSystem/LabelTextReplacerTest.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Tests\Services\LabelSystem; +use PHPUnit\Framework\Attributes\DataProvider; use App\Entity\Parts\Part; use App\Entity\Parts\PartLot; use App\Services\LabelSystem\LabelTextReplacer; @@ -94,17 +95,13 @@ class LabelTextReplacerTest extends WebTestCase yield ['TEST[[ ]]TEST', 'TEST[[ ]]TEST']; } - /** - * @dataProvider handlePlaceholderDataProvider - */ + #[DataProvider('handlePlaceholderDataProvider')] public function testHandlePlaceholder(string $expected, string $input): void { $this->assertSame($expected, $this->service->handlePlaceholder($input, $this->target)); } - /** - * @dataProvider replaceDataProvider - */ + #[DataProvider('replaceDataProvider')] public function testReplace(string $expected, string $input): void { $this->assertSame($expected, $this->service->replace($input, $this->target)); diff --git a/tests/Services/LabelSystem/PlaceholderProviders/AbstractElementProviderTest.php b/tests/Services/LabelSystem/PlaceholderProviders/AbstractElementProviderTest.php index 3c40a9ac..4e902862 100644 --- a/tests/Services/LabelSystem/PlaceholderProviders/AbstractElementProviderTest.php +++ b/tests/Services/LabelSystem/PlaceholderProviders/AbstractElementProviderTest.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Tests\Services\LabelSystem\PlaceholderProviders; +use PHPUnit\Framework\Attributes\DataProvider; use App\Entity\Base\AbstractDBElement; use App\Services\LabelSystem\PlaceholderProviders\AbstractDBElementProvider; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -68,9 +69,7 @@ class AbstractElementProviderTest extends WebTestCase yield ['123', '[[ID]]']; } - /** - * @dataProvider dataProvider - */ + #[DataProvider('dataProvider')] public function testReplace(string $expected, string $placeholder): void { $this->assertSame($expected, $this->service->replace($placeholder, $this->target)); diff --git a/tests/Services/LabelSystem/PlaceholderProviders/GlobalProvidersTest.php b/tests/Services/LabelSystem/PlaceholderProviders/GlobalProvidersTest.php index 854e7467..6f41e057 100644 --- a/tests/Services/LabelSystem/PlaceholderProviders/GlobalProvidersTest.php +++ b/tests/Services/LabelSystem/PlaceholderProviders/GlobalProvidersTest.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Tests\Services\LabelSystem\PlaceholderProviders; +use PHPUnit\Framework\Attributes\DataProvider; use App\Entity\Parts\Part; use App\Services\LabelSystem\PlaceholderProviders\GlobalProviders; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -67,9 +68,7 @@ class GlobalProvidersTest extends WebTestCase yield ['anonymous', '[[USERNAME]]']; } - /** - * @dataProvider dataProvider - */ + #[DataProvider('dataProvider')] public function testReplace(string $expected, string $placeholder): void { $this->assertSame($expected, $this->service->replace($placeholder, $this->target)); diff --git a/tests/Services/LabelSystem/PlaceholderProviders/NamedElementProviderTest.php b/tests/Services/LabelSystem/PlaceholderProviders/NamedElementProviderTest.php index 7360b2d2..2e333c13 100644 --- a/tests/Services/LabelSystem/PlaceholderProviders/NamedElementProviderTest.php +++ b/tests/Services/LabelSystem/PlaceholderProviders/NamedElementProviderTest.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Tests\Services\LabelSystem\PlaceholderProviders; +use PHPUnit\Framework\Attributes\DataProvider; use App\Entity\Contracts\NamedElementInterface; use App\Services\LabelSystem\PlaceholderProviders\NamedElementProvider; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -71,9 +72,7 @@ class NamedElementProviderTest extends WebTestCase yield ['This is my Name', '[[NAME]]']; } - /** - * @dataProvider dataProvider - */ + #[DataProvider('dataProvider')] public function testReplace(string $expected, string $placeholder): void { $this->assertSame($expected, $this->service->replace($placeholder, $this->target)); diff --git a/tests/Services/LabelSystem/PlaceholderProviders/PartLotProviderTest.php b/tests/Services/LabelSystem/PlaceholderProviders/PartLotProviderTest.php index 98285aa5..8826ddcf 100644 --- a/tests/Services/LabelSystem/PlaceholderProviders/PartLotProviderTest.php +++ b/tests/Services/LabelSystem/PlaceholderProviders/PartLotProviderTest.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Tests\Services\LabelSystem\PlaceholderProviders; +use PHPUnit\Framework\Attributes\DataProvider; use App\Entity\Parts\Part; use App\Entity\Parts\PartLot; use App\Entity\Parts\StorageLocation; @@ -101,9 +102,7 @@ class PartLotProviderTest extends WebTestCase yield ['user', '[[OWNER_USERNAME]]']; } - /** - * @dataProvider dataProvider - */ + #[DataProvider('dataProvider')] public function testReplace(string $expected, string $placeholder): void { $this->assertSame($expected, $this->service->replace($placeholder, $this->target)); diff --git a/tests/Services/LabelSystem/PlaceholderProviders/PartProviderTest.php b/tests/Services/LabelSystem/PlaceholderProviders/PartProviderTest.php index db3ebad1..01cad822 100644 --- a/tests/Services/LabelSystem/PlaceholderProviders/PartProviderTest.php +++ b/tests/Services/LabelSystem/PlaceholderProviders/PartProviderTest.php @@ -41,6 +41,8 @@ declare(strict_types=1); namespace App\Tests\Services\LabelSystem\PlaceholderProviders; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\DataProvider; use App\Entity\Parts\ManufacturingStatus; use Doctrine\ORM\EntityManager; use App\Entity\Parts\Category; @@ -50,9 +52,7 @@ use App\Services\LabelSystem\PlaceholderProviders\PartProvider; use Doctrine\ORM\EntityManagerInterface; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; -/** - * @group DB - */ +#[Group('DB')] class PartProviderTest extends WebTestCase { /** @@ -105,9 +105,7 @@ class PartProviderTest extends WebTestCase yield ['Bold Italic', '[[COMMENT_T]]']; } - /** - * @dataProvider dataProvider - */ + #[DataProvider('dataProvider')] public function testReplace(string $expected, string $placeholder): void { $this->assertSame($expected, $this->service->replace($placeholder, $this->target)); diff --git a/tests/Services/LabelSystem/PlaceholderProviders/TimestampableElementProviderTest.php b/tests/Services/LabelSystem/PlaceholderProviders/TimestampableElementProviderTest.php index 07bb4270..8af988f7 100644 --- a/tests/Services/LabelSystem/PlaceholderProviders/TimestampableElementProviderTest.php +++ b/tests/Services/LabelSystem/PlaceholderProviders/TimestampableElementProviderTest.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Tests\Services\LabelSystem\PlaceholderProviders; +use PHPUnit\Framework\Attributes\DataProvider; use App\Entity\Contracts\TimeStampableInterface; use App\Services\LabelSystem\PlaceholderProviders\GlobalProviders; use App\Services\LabelSystem\PlaceholderProviders\TimestampableElementProvider; @@ -81,9 +82,7 @@ class TimestampableElementProviderTest extends WebTestCase yield ['1/1/00, 12:00 AM', '[[CREATION_DATE]]']; } - /** - * @dataProvider dataProvider - */ + #[DataProvider('dataProvider')] public function testReplace(string $expected, string $placeholder): void { $this->assertSame($expected, $this->service->replace($placeholder, $this->target)); diff --git a/tests/Services/LabelSystem/SandboxedTwigFactoryTest.php b/tests/Services/LabelSystem/SandboxedTwigFactoryTest.php index 495a2f45..26ba131e 100644 --- a/tests/Services/LabelSystem/SandboxedTwigFactoryTest.php +++ b/tests/Services/LabelSystem/SandboxedTwigFactoryTest.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Tests\Services\LabelSystem; +use PHPUnit\Framework\Attributes\DataProvider; use App\Entity\LabelSystem\LabelOptions; use App\Entity\LabelSystem\LabelProcessMode; use App\Entity\LabelSystem\LabelSupportedElement; @@ -103,9 +104,7 @@ class SandboxedTwigFactoryTest extends WebTestCase yield ['{{ part.setCategory(null) }}']; } - /** - * @dataProvider twigDataProvider - */ + #[DataProvider('twigDataProvider')] public function testTwigFeatures(string $twig): void { $options = new LabelOptions(); @@ -123,9 +122,7 @@ class SandboxedTwigFactoryTest extends WebTestCase $this->assertIsString($str); } - /** - * @dataProvider twigNotAllowedDataProvider - */ + #[DataProvider('twigNotAllowedDataProvider')] public function testTwigForbidden(string $twig): void { $this->expectException(SecurityError::class); diff --git a/tests/Services/Misc/FAIconGeneratorTest.php b/tests/Services/Misc/FAIconGeneratorTest.php index 1bfc740c..f5c30b72 100644 --- a/tests/Services/Misc/FAIconGeneratorTest.php +++ b/tests/Services/Misc/FAIconGeneratorTest.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace App\Tests\Services\Misc; +use PHPUnit\Framework\Attributes\DataProvider; use App\Services\Misc\FAIconGenerator; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -95,9 +96,7 @@ class FAIconGeneratorTest extends WebTestCase yield ['fgd', 'fa-file']; } - /** - * @dataProvider fileExtensionDataProvider - */ + #[DataProvider('fileExtensionDataProvider')] public function testFileExtensionToFAType(string $ext, string $expected): void { $this->assertSame($expected, $this->service->fileExtensionToFAType($ext), 'Failed for extension .'.$ext); diff --git a/tests/Services/Misc/RangeParserTest.php b/tests/Services/Misc/RangeParserTest.php index 1a9b2146..71c412cb 100644 --- a/tests/Services/Misc/RangeParserTest.php +++ b/tests/Services/Misc/RangeParserTest.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Tests\Services\Misc; +use PHPUnit\Framework\Attributes\DataProvider; use App\Services\Misc\RangeParser; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -96,9 +97,7 @@ class RangeParserTest extends WebTestCase yield [false, '1, 2 test']; } - /** - * @dataProvider dataProvider - */ + #[DataProvider('dataProvider')] public function testParse(array $expected, string $input, bool $must_throw = false): void { if ($must_throw) { @@ -109,9 +108,7 @@ class RangeParserTest extends WebTestCase } } - /** - * @dataProvider validDataProvider - */ + #[DataProvider('validDataProvider')] public function testIsValidRange(bool $expected, string $input): void { $this->assertSame($expected, $this->service->isValidRange($input)); diff --git a/tests/Services/Parameters/ParameterExtractorTest.php b/tests/Services/Parameters/ParameterExtractorTest.php index 148470d1..8c6e7df1 100644 --- a/tests/Services/Parameters/ParameterExtractorTest.php +++ b/tests/Services/Parameters/ParameterExtractorTest.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Tests\Services\Parameters; +use PHPUnit\Framework\Attributes\DataProvider; use App\Entity\Parameters\AbstractParameter; use App\Services\Parameters\ParameterExtractor; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -69,9 +70,7 @@ class ParameterExtractorTest extends WebTestCase yield ['A [link](https://demo.part-db.de) should not be matched']; } - /** - * @dataProvider emptyDataProvider - */ + #[DataProvider('emptyDataProvider')] public function testShouldReturnEmpty(string $input): void { $this->assertEmpty($this->service->extractParameters($input)); diff --git a/tests/Services/Parts/PricedetailHelperTest.php b/tests/Services/Parts/PricedetailHelperTest.php index cfb4a043..b9c5e72b 100644 --- a/tests/Services/Parts/PricedetailHelperTest.php +++ b/tests/Services/Parts/PricedetailHelperTest.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace App\Tests\Services\Parts; +use PHPUnit\Framework\Attributes\DataProvider; use App\Entity\Parts\Part; use App\Entity\PriceInformations\Orderdetail; use App\Entity\PriceInformations\Pricedetail; @@ -81,9 +82,7 @@ class PricedetailHelperTest extends WebTestCase yield [$part, 10.0, 'Part with multiple orderdetails failed']; } - /** - * @dataProvider maxDiscountAmountDataProvider - */ + #[DataProvider('maxDiscountAmountDataProvider')] public function testGetMaxDiscountAmount(Part $part, ?float $expected_result, string $message): void { $this->assertSame($expected_result, $this->service->getMaxDiscountAmount($part), $message); diff --git a/tests/Services/Trees/TreeViewGeneratorTest.php b/tests/Services/Trees/TreeViewGeneratorTest.php index f34c855d..ebec94d6 100644 --- a/tests/Services/Trees/TreeViewGeneratorTest.php +++ b/tests/Services/Trees/TreeViewGeneratorTest.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace App\Tests\Services\Trees; +use PHPUnit\Framework\Attributes\Group; use App\Entity\Attachments\AttachmentType; use App\Entity\Parts\Category; use App\Helpers\Trees\TreeViewNode; @@ -29,9 +30,7 @@ use App\Services\Trees\TreeViewGenerator; use Doctrine\ORM\EntityManagerInterface; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; -/** - * @group DB - */ +#[Group('DB')] class TreeViewGeneratorTest extends WebTestCase { protected $em; diff --git a/tests/Services/UserSystem/PermissionManagerTest.php b/tests/Services/UserSystem/PermissionManagerTest.php index cfe74ce7..3082e3d8 100644 --- a/tests/Services/UserSystem/PermissionManagerTest.php +++ b/tests/Services/UserSystem/PermissionManagerTest.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace App\Tests\Services\UserSystem; +use PHPUnit\Framework\Attributes\DataProvider; use App\Entity\UserSystem\Group; use App\Entity\UserSystem\PermissionData; use App\Entity\UserSystem\User; @@ -101,9 +102,7 @@ class PermissionManagerTest extends WebTestCase yield ['tools']; } - /** - * @dataProvider getPermissionNames - */ + #[DataProvider('getPermissionNames')] public function testListOperationsForPermission($perm_name): void { $arr = $this->service->listOperationsForPermission($perm_name); diff --git a/tests/Services/UserSystem/TFA/BackupCodeGeneratorTest.php b/tests/Services/UserSystem/TFA/BackupCodeGeneratorTest.php index b489eec2..83f39cae 100644 --- a/tests/Services/UserSystem/TFA/BackupCodeGeneratorTest.php +++ b/tests/Services/UserSystem/TFA/BackupCodeGeneratorTest.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace App\Tests\Services\UserSystem\TFA; +use PHPUnit\Framework\Attributes\DataProvider; use App\Services\UserSystem\TFA\BackupCodeGenerator; use PHPUnit\Framework\TestCase; use RuntimeException; @@ -54,9 +55,7 @@ class BackupCodeGeneratorTest extends TestCase yield [16]; } - /** - * @dataProvider codeLengthDataProvider - */ + #[DataProvider('codeLengthDataProvider')] public function testGenerateSingleCode(int $code_length): void { $generator = new BackupCodeGenerator($code_length, 10); @@ -70,9 +69,7 @@ class BackupCodeGeneratorTest extends TestCase yield [10]; } - /** - * @dataProvider codeCountDataProvider - */ + #[DataProvider('codeCountDataProvider')] public function testGenerateCodeSet(int $code_count): void { $generator = new BackupCodeGenerator(8, $code_count); diff --git a/tests/Twig/UserExtensionTest.php b/tests/Twig/UserExtensionTest.php index ea024bda..21009f5e 100644 --- a/tests/Twig/UserExtensionTest.php +++ b/tests/Twig/UserExtensionTest.php @@ -22,6 +22,7 @@ declare(strict_types=1); */ namespace App\Tests\Twig; +use PHPUnit\Framework\Attributes\DataProvider; use App\Twig\UserExtension; use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -46,9 +47,7 @@ class UserExtensionTest extends WebTestCase yield ['/test/foo/bar?param1=val1¶m2=val2', '/de_DE/test/foo/bar?param1=val1¶m2=val2']; } - /** - * @dataProvider removeLocaleFromPathDataSet - */ + #[DataProvider('removeLocaleFromPathDataSet')] public function testRemoveLocaleFromPath(string $expected, string $input): void { $this->assertSame($expected, $this->service->removeLocaleFromPath($input)); From f215bd11cdb60d5a831cf104abdd05423030e363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Mon, 14 Jul 2025 00:36:35 +0200 Subject: [PATCH 08/10] Updated rector config --- rector.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rector.php b/rector.php index 52457515..ab637283 100644 --- a/rector.php +++ b/rector.php @@ -7,6 +7,7 @@ use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector; use Rector\Config\RectorConfig; use Rector\Doctrine\Set\DoctrineSetList; use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector; +use Rector\PHPUnit\CodeQuality\Rector\MethodCall\AssertEmptyNullableObjectToAssertInstanceofRector; use Rector\PHPUnit\Set\PHPUnitSetList; use Rector\Set\ValueObject\LevelSetList; use Rector\Set\ValueObject\SetList; @@ -32,6 +33,8 @@ return RectorConfig::configure() ->withSets([ PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES, + PHPUnitSetList::PHPUNIT_90, + PHPUnitSetList::PHPUNIT_110, ]) ->withRules([ @@ -39,6 +42,10 @@ return RectorConfig::configure() ]) ->withSkip([ + //Leave our AssertNull tests alone + AssertEmptyNullableObjectToAssertInstanceofRector::class, + + CountArrayToEmptyArrayComparisonRector::class, //Leave our !== null checks alone FlipTypeControlToUseExclusiveTypeRector::class, From f3ad3c1ffe918a6f58a78386ad4bf2d8f8c55779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Mon, 14 Jul 2025 00:38:54 +0200 Subject: [PATCH 09/10] Run phpunit code quality rector --- rector.php | 3 ++ .../Filters/Constraints/FilterTraitTest.php | 2 +- tests/Entity/Attachments/AttachmentTest.php | 2 +- tests/Entity/Parts/PartTest.php | 2 +- tests/Entity/PriceSystem/OrderdetailTest.php | 2 +- tests/Entity/UserSystem/ApiTokenTypeTest.php | 2 +- .../Projects/ProjectBuildRequestTest.php | 38 ++++++--------- .../NamedDBElementRepositoryTest.php | 5 +- .../StructuralDBElementRepositoryTest.php | 5 +- tests/Repository/UserRepositoryTest.php | 5 +- .../EntityMergers/Mergers/PartMergerTest.php | 2 + .../DTOtoEntityConverterTest.php | 2 + .../EIGP114BarcodeScanResultTest.php | 48 +++++++++---------- tests/Services/LogSystem/TimeTravelTest.php | 6 +-- .../PermissionSchemaUpdaterTest.php | 12 ++--- 15 files changed, 66 insertions(+), 70 deletions(-) diff --git a/rector.php b/rector.php index ab637283..c45fab60 100644 --- a/rector.php +++ b/rector.php @@ -35,6 +35,9 @@ return RectorConfig::configure() PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES, PHPUnitSetList::PHPUNIT_90, PHPUnitSetList::PHPUNIT_110, + PHPUnitSetList::PHPUNIT_CODE_QUALITY, + + ]) ->withRules([ diff --git a/tests/DataTables/Filters/Constraints/FilterTraitTest.php b/tests/DataTables/Filters/Constraints/FilterTraitTest.php index 8d87071c..c2ec5905 100644 --- a/tests/DataTables/Filters/Constraints/FilterTraitTest.php +++ b/tests/DataTables/Filters/Constraints/FilterTraitTest.php @@ -52,7 +52,7 @@ class FilterTraitTest extends TestCase #[DataProvider('isAggregateFunctionStringDataProvider')] public function testIsAggregateFunctionString(bool $expected, string $input): void { - $this->assertEquals($expected, $this->isAggregateFunctionString($input)); + $this->assertSame($expected, $this->isAggregateFunctionString($input)); } } diff --git a/tests/Entity/Attachments/AttachmentTest.php b/tests/Entity/Attachments/AttachmentTest.php index c019c4bf..d878a689 100644 --- a/tests/Entity/Attachments/AttachmentTest.php +++ b/tests/Entity/Attachments/AttachmentTest.php @@ -231,7 +231,7 @@ class AttachmentTest extends TestCase //Ensure that changing the external path does reset the internal one $attachment->setInternalPath('%MEDIA%/foo/bar.txt'); $attachment->setExternalPath('https://example.de'); - $this->assertSame(null, $attachment->getInternalPath()); + $this->assertNull($attachment->getInternalPath()); //Ensure that setting the same value to the external path again doesn't reset the internal one $attachment->setExternalPath('https://google.de'); diff --git a/tests/Entity/Parts/PartTest.php b/tests/Entity/Parts/PartTest.php index 3e9233c1..c1ae8935 100644 --- a/tests/Entity/Parts/PartTest.php +++ b/tests/Entity/Parts/PartTest.php @@ -41,7 +41,7 @@ class PartTest extends TestCase $lot = new PartLot(); $part->addPartLot($lot); $this->assertSame($part, $lot->getPart()); - $this->assertSame(1, $part->getPartLots()->count()); + $this->assertCount(1, $part->getPartLots()); //Remove element $part->removePartLot($lot); diff --git a/tests/Entity/PriceSystem/OrderdetailTest.php b/tests/Entity/PriceSystem/OrderdetailTest.php index 0046fd24..497f9ab3 100644 --- a/tests/Entity/PriceSystem/OrderdetailTest.php +++ b/tests/Entity/PriceSystem/OrderdetailTest.php @@ -38,7 +38,7 @@ class OrderdetailTest extends TestCase $pricedetail = new Pricedetail(); $orderdetail->addPricedetail($pricedetail); $this->assertSame($orderdetail, $pricedetail->getOrderdetail()); - $this->assertSame(1, $orderdetail->getPricedetails()->count()); + $this->assertCount(1, $orderdetail->getPricedetails()); //After removal of the pricedetail, the orderdetail must be empty again $orderdetail->removePricedetail($pricedetail); diff --git a/tests/Entity/UserSystem/ApiTokenTypeTest.php b/tests/Entity/UserSystem/ApiTokenTypeTest.php index 21d14b69..a8e520f1 100644 --- a/tests/Entity/UserSystem/ApiTokenTypeTest.php +++ b/tests/Entity/UserSystem/ApiTokenTypeTest.php @@ -35,7 +35,7 @@ class ApiTokenTypeTest extends TestCase public function testGetTypeFromToken(): void { - $this->assertEquals(ApiTokenType::PERSONAL_ACCESS_TOKEN, ApiTokenType::getTypeFromToken('tcp_123')); + $this->assertSame(ApiTokenType::PERSONAL_ACCESS_TOKEN, ApiTokenType::getTypeFromToken('tcp_123')); } public function testGetTypeFromTokenInvalid(): void diff --git a/tests/Helpers/Projects/ProjectBuildRequestTest.php b/tests/Helpers/Projects/ProjectBuildRequestTest.php index baccfcd1..1158d89a 100644 --- a/tests/Helpers/Projects/ProjectBuildRequestTest.php +++ b/tests/Helpers/Projects/ProjectBuildRequestTest.php @@ -33,9 +33,6 @@ use PHPUnit\Framework\TestCase; class ProjectBuildRequestTest extends TestCase { - /** @var MeasurementUnit $float_unit */ - private MeasurementUnit $float_unit; - /** @var Project */ private Project $project1; /** @var ProjectBOMEntry */ @@ -49,30 +46,25 @@ class ProjectBuildRequestTest extends TestCase private PartLot $lot1b; private PartLot $lot2; - /** @var Part */ - private Part $part1; - /** @var Part */ - private Part $part2; - public function setUp(): void { - $this->float_unit = new MeasurementUnit(); - $this->float_unit->setName('float'); - $this->float_unit->setUnit('f'); - $this->float_unit->setIsInteger(false); - $this->float_unit->setUseSIPrefix(true); + $float_unit = new MeasurementUnit(); + $float_unit->setName('float'); + $float_unit->setUnit('f'); + $float_unit->setIsInteger(false); + $float_unit->setUseSIPrefix(true); //Setup some example parts and part lots - $this->part1 = new Part(); - $this->part1->setName('Part 1'); + $part1 = new Part(); + $part1->setName('Part 1'); $this->lot1a = new class extends PartLot { public function getID(): ?int { return 1; } }; - $this->part1->addPartLot($this->lot1a); + $part1->addPartLot($this->lot1a); $this->lot1a->setAmount(10); $this->lot1a->setDescription('Lot 1a'); @@ -82,25 +74,25 @@ class ProjectBuildRequestTest extends TestCase return 2; } }; - $this->part1->addPartLot($this->lot1b); + $part1->addPartLot($this->lot1b); $this->lot1b->setAmount(20); $this->lot1b->setDescription('Lot 1b'); - $this->part2 = new Part(); + $part2 = new Part(); - $this->part2->setName('Part 2'); - $this->part2->setPartUnit($this->float_unit); + $part2->setName('Part 2'); + $part2->setPartUnit($float_unit); $this->lot2 = new PartLot(); - $this->part2->addPartLot($this->lot2); + $part2->addPartLot($this->lot2); $this->lot2->setAmount(2.5); $this->lot2->setDescription('Lot 2'); $this->bom_entry1a = new ProjectBOMEntry(); - $this->bom_entry1a->setPart($this->part1); + $this->bom_entry1a->setPart($part1); $this->bom_entry1a->setQuantity(2); $this->bom_entry1b = new ProjectBOMEntry(); - $this->bom_entry1b->setPart($this->part2); + $this->bom_entry1b->setPart($part2); $this->bom_entry1b->setQuantity(1.5); $this->bom_entry1c = new ProjectBOMEntry(); diff --git a/tests/Repository/NamedDBElementRepositoryTest.php b/tests/Repository/NamedDBElementRepositoryTest.php index fae9765d..117d7d0e 100644 --- a/tests/Repository/NamedDBElementRepositoryTest.php +++ b/tests/Repository/NamedDBElementRepositoryTest.php @@ -32,7 +32,6 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; */ class NamedDBElementRepositoryTest extends WebTestCase { - private $entityManager; /** * @var StructuralDBElementRepository */ @@ -42,11 +41,11 @@ class NamedDBElementRepositoryTest extends WebTestCase { $kernel = self::bootKernel(); - $this->entityManager = $kernel->getContainer() + $entityManager = $kernel->getContainer() ->get('doctrine') ->getManager(); - $this->repo = $this->entityManager->getRepository(User::class); + $this->repo = $entityManager->getRepository(User::class); } public function testGetGenericNodeTree(): void diff --git a/tests/Repository/StructuralDBElementRepositoryTest.php b/tests/Repository/StructuralDBElementRepositoryTest.php index 47c0cb45..5ab8b788 100644 --- a/tests/Repository/StructuralDBElementRepositoryTest.php +++ b/tests/Repository/StructuralDBElementRepositoryTest.php @@ -32,7 +32,6 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; */ class StructuralDBElementRepositoryTest extends WebTestCase { - private $entityManager; /** * @var StructuralDBElementRepository */ @@ -42,11 +41,11 @@ class StructuralDBElementRepositoryTest extends WebTestCase { $kernel = self::bootKernel(); - $this->entityManager = $kernel->getContainer() + $entityManager = $kernel->getContainer() ->get('doctrine') ->getManager(); - $this->repo = $this->entityManager->getRepository(AttachmentType::class); + $this->repo = $entityManager->getRepository(AttachmentType::class); } public function testFindRootNodes(): void diff --git a/tests/Repository/UserRepositoryTest.php b/tests/Repository/UserRepositoryTest.php index 0e6f3c2d..67a77aea 100644 --- a/tests/Repository/UserRepositoryTest.php +++ b/tests/Repository/UserRepositoryTest.php @@ -30,7 +30,6 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class UserRepositoryTest extends WebTestCase { - private $entityManager; /** * @var UserRepository */ @@ -40,11 +39,11 @@ class UserRepositoryTest extends WebTestCase { $kernel = self::bootKernel(); - $this->entityManager = $kernel->getContainer() + $entityManager = $kernel->getContainer() ->get('doctrine') ->getManager(); - $this->repo = $this->entityManager->getRepository(User::class); + $this->repo = $entityManager->getRepository(User::class); } diff --git a/tests/Services/EntityMergers/Mergers/PartMergerTest.php b/tests/Services/EntityMergers/Mergers/PartMergerTest.php index bf02744a..56c7712e 100644 --- a/tests/Services/EntityMergers/Mergers/PartMergerTest.php +++ b/tests/Services/EntityMergers/Mergers/PartMergerTest.php @@ -178,7 +178,9 @@ class PartMergerTest extends KernelTestCase //But the new lots, should be assigned to the target part and contain the same info $clone3 = $merged->getPartLots()->get(2); $clone4 = $merged->getPartLots()->get(3); + $this->assertInstanceOf(PartLot::class, $clone3); $this->assertSame($merged, $clone3->getPart()); + $this->assertInstanceOf(PartLot::class, $clone4); $this->assertSame($merged, $clone4->getPart()); } diff --git a/tests/Services/InfoProviderSystem/DTOtoEntityConverterTest.php b/tests/Services/InfoProviderSystem/DTOtoEntityConverterTest.php index 396969e2..6c933472 100644 --- a/tests/Services/InfoProviderSystem/DTOtoEntityConverterTest.php +++ b/tests/Services/InfoProviderSystem/DTOtoEntityConverterTest.php @@ -22,6 +22,7 @@ declare(strict_types=1); */ namespace App\Tests\Services\InfoProviderSystem; +use App\Entity\PriceInformations\Currency; use App\Entity\Attachments\AttachmentType; use App\Entity\Parts\ManufacturingStatus; use App\Services\InfoProviderSystem\DTOs\FileDTO; @@ -83,6 +84,7 @@ class DTOtoEntityConverterTest extends WebTestCase //For non-base currencies, a new currency entity is created $currency = $entity->getCurrency(); + $this->assertInstanceOf(Currency::class, $currency); $this->assertEquals($dto->currency_iso_code, $currency->getIsoCode()); } diff --git a/tests/Services/LabelSystem/BarcodeScanner/EIGP114BarcodeScanResultTest.php b/tests/Services/LabelSystem/BarcodeScanner/EIGP114BarcodeScanResultTest.php index d0ad8572..3a414997 100644 --- a/tests/Services/LabelSystem/BarcodeScanner/EIGP114BarcodeScanResultTest.php +++ b/tests/Services/LabelSystem/BarcodeScanner/EIGP114BarcodeScanResultTest.php @@ -53,7 +53,7 @@ class EIGP114BarcodeScanResultTest extends TestCase '4L' => 'US', '13Z' => 'Digi-Key', ]); - $this->assertEquals('digikey', $barcode->guessBarcodeVendor()); + $this->assertSame('digikey', $barcode->guessBarcodeVendor()); //Mouser barcode: $barcode = new EIGP114BarcodeScanResult([ @@ -66,7 +66,7 @@ class EIGP114BarcodeScanResultTest extends TestCase '1V' => 'Mouser', ]); - $this->assertEquals('mouser', $barcode->guessBarcodeVendor()); + $this->assertSame('mouser', $barcode->guessBarcodeVendor()); //Farnell barcode: $barcode = new EIGP114BarcodeScanResult([ @@ -79,7 +79,7 @@ class EIGP114BarcodeScanResultTest extends TestCase '3P' => 'Farnell', ]); - $this->assertEquals('element14', $barcode->guessBarcodeVendor()); + $this->assertSame('element14', $barcode->guessBarcodeVendor()); } public function testIsFormat06Code(): void @@ -104,7 +104,7 @@ class EIGP114BarcodeScanResultTest extends TestCase public function testParseFormat06Code(): void { $barcode = EIGP114BarcodeScanResult::parseFormat06Code("[)>\x1E06\x1DP596-777A1-ND\x1D1PXAF4444\x1DQ3\x1D10D1452\x1D1TBF1103\x1D4LUS\x1E\x04"); - $this->assertEquals([ + $this->assertSame([ 'P' => '596-777A1-ND', '1P' => 'XAF4444', 'Q' => '3', @@ -125,32 +125,32 @@ class EIGP114BarcodeScanResultTest extends TestCase '4L' => 'US', ]); - $this->assertEquals('596-777A1-ND', $barcode->customerPartNumber); - $this->assertEquals('XAF4444', $barcode->supplierPartNumber); - $this->assertEquals(3, $barcode->quantity); - $this->assertEquals('1452', $barcode->alternativeDateCode); - $this->assertEquals('BF1103', $barcode->lotCode); - $this->assertEquals('US', $barcode->countryOfOrigin); + $this->assertSame('596-777A1-ND', $barcode->customerPartNumber); + $this->assertSame('XAF4444', $barcode->supplierPartNumber); + $this->assertSame(3, $barcode->quantity); + $this->assertSame('1452', $barcode->alternativeDateCode); + $this->assertSame('BF1103', $barcode->lotCode); + $this->assertSame('US', $barcode->countryOfOrigin); } public function testDigikeyParsing(): void { $barcode = EIGP114BarcodeScanResult::parseFormat06Code("[)>\x1e06\x1dPQ1045-ND\x1d1P364019-01\x1d30PQ1045-ND\x1dK12432 TRAVIS FOSS P\x1d1K85732873\x1d10K103332956\x1d9D231013\x1d1TQJ13P\x1d11K1\x1d4LTW\x1dQ3\x1d11ZPICK\x1d12Z7360988\x1d13Z999999\x1d20Z0000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); - $this->assertEquals('digikey', $barcode->guessBarcodeVendor()); + $this->assertSame('digikey', $barcode->guessBarcodeVendor()); - $this->assertEquals('Q1045-ND', $barcode->customerPartNumber); - $this->assertEquals('364019-01', $barcode->supplierPartNumber); - $this->assertEquals(3, $barcode->quantity); - $this->assertEquals('231013', $barcode->dateCode); - $this->assertEquals('QJ13P', $barcode->lotCode); - $this->assertEquals('TW', $barcode->countryOfOrigin); - $this->assertEquals('Q1045-ND', $barcode->digikeyPartNumber); - $this->assertEquals('85732873', $barcode->digikeySalesOrderNumber); - $this->assertEquals('103332956', $barcode->digikeyInvoiceNumber); - $this->assertEquals('PICK', $barcode->digikeyLabelType); - $this->assertEquals('7360988', $barcode->digikeyPartID); - $this->assertEquals('999999', $barcode->digikeyNA); - $this->assertEquals('0000000000000000000000000000000000000000000000000000000000000000000000000000000000000', $barcode->digikeyPadding); + $this->assertSame('Q1045-ND', $barcode->customerPartNumber); + $this->assertSame('364019-01', $barcode->supplierPartNumber); + $this->assertSame(3, $barcode->quantity); + $this->assertSame('231013', $barcode->dateCode); + $this->assertSame('QJ13P', $barcode->lotCode); + $this->assertSame('TW', $barcode->countryOfOrigin); + $this->assertSame('Q1045-ND', $barcode->digikeyPartNumber); + $this->assertSame('85732873', $barcode->digikeySalesOrderNumber); + $this->assertSame('103332956', $barcode->digikeyInvoiceNumber); + $this->assertSame('PICK', $barcode->digikeyLabelType); + $this->assertSame('7360988', $barcode->digikeyPartID); + $this->assertSame('999999', $barcode->digikeyNA); + $this->assertSame('0000000000000000000000000000000000000000000000000000000000000000000000000000000000000', $barcode->digikeyPadding); } } diff --git a/tests/Services/LogSystem/TimeTravelTest.php b/tests/Services/LogSystem/TimeTravelTest.php index f353cc12..f0068778 100644 --- a/tests/Services/LogSystem/TimeTravelTest.php +++ b/tests/Services/LogSystem/TimeTravelTest.php @@ -47,7 +47,7 @@ class TimeTravelTest extends KernelTestCase $undeletedCategory = $this->service->undeleteEntity(Category::class, 100); $this->assertInstanceOf(Category::class, $undeletedCategory); - $this->assertEquals(100, $undeletedCategory->getId()); + $this->assertSame(100, $undeletedCategory->getId()); } public function testApplyEntry(): void @@ -65,8 +65,8 @@ class TimeTravelTest extends KernelTestCase $this->service->applyEntry($category, $logEntry); - $this->assertEquals('Old Category', $category->getName()); - $this->assertEquals('Old Comment', $category->getComment()); + $this->assertSame('Old Category', $category->getName()); + $this->assertSame('Old Comment', $category->getComment()); } public function testRevertEntityToTimestamp(): void diff --git a/tests/Services/UserSystem/PermissionSchemaUpdaterTest.php b/tests/Services/UserSystem/PermissionSchemaUpdaterTest.php index 120fe075..1e41474c 100644 --- a/tests/Services/UserSystem/PermissionSchemaUpdaterTest.php +++ b/tests/Services/UserSystem/PermissionSchemaUpdaterTest.php @@ -90,9 +90,9 @@ class PermissionSchemaUpdaterTest extends WebTestCase //Do an upgrade and afterward the move, add, and withdraw permissions should be set to ALLOW self::assertTrue($this->service->upgradeSchema($user, 1)); - self::assertEquals(PermissionData::ALLOW, $user->getPermissions()->getPermissionValue('parts_stock', 'move')); - self::assertEquals(PermissionData::ALLOW, $user->getPermissions()->getPermissionValue('parts_stock', 'add')); - self::assertEquals(PermissionData::ALLOW, $user->getPermissions()->getPermissionValue('parts_stock', 'withdraw')); + self::assertSame(PermissionData::ALLOW, $user->getPermissions()->getPermissionValue('parts_stock', 'move')); + self::assertSame(PermissionData::ALLOW, $user->getPermissions()->getPermissionValue('parts_stock', 'add')); + self::assertSame(PermissionData::ALLOW, $user->getPermissions()->getPermissionValue('parts_stock', 'withdraw')); } public function testUpgradeSchemaToVersion2(): void @@ -106,9 +106,9 @@ class PermissionSchemaUpdaterTest extends WebTestCase //After the upgrade all operations should be available under the name "projects" with the same values self::assertTrue($this->service->upgradeSchema($user, 2)); - self::assertEquals(PermissionData::ALLOW, $user->getPermissions()->getPermissionValue('projects', 'read')); - self::assertEquals(PermissionData::INHERIT, $user->getPermissions()->getPermissionValue('projects', 'edit')); - self::assertEquals(PermissionData::DISALLOW, $user->getPermissions()->getPermissionValue('projects', 'delete')); + self::assertSame(PermissionData::ALLOW, $user->getPermissions()->getPermissionValue('projects', 'read')); + self::assertSame(PermissionData::INHERIT, $user->getPermissions()->getPermissionValue('projects', 'edit')); + self::assertSame(PermissionData::DISALLOW, $user->getPermissions()->getPermissionValue('projects', 'delete')); } public function testUpgradeSchemaToVersion3(): void From e2735823a0c0e326f56544de34cd4569f84539b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Mon, 14 Jul 2025 21:57:27 +0200 Subject: [PATCH 10/10] Fixed tests for new PHPunit 11.5 --- phpunit.xml.dist | 5 +- rector.php | 2 +- .../ApplicationAvailabilityFunctionalTest.php | 2 +- ...erTest.php => AbstractAdminController.php} | 6 +- ...rTest.php => AttachmentTypeController.php} | 2 +- ...trollerTest.php => CategoryController.php} | 2 +- ...rollerTest.php => FootprintController.php} | 2 +- ...lerTest.php => LabelProfileController.php} | 2 +- ...lerTest.php => ManufacturerController.php} | 2 +- ...Test.php => MeasurementUnitController.php} | 2 +- ...ntrollerTest.php => ProjectController.php} | 2 +- ...erTest.php => StorelocationController.php} | 2 +- ...trollerTest.php => SupplierController.php} | 2 +- tests/Controller/RedirectControllerTest.php | 4 +- .../Filters/Constraints/FilterTraitTest.php | 2 +- tests/DatatablesAvailabilityTest.php | 2 +- tests/Doctrine/SQLiteRegexMiddlewareTest.php | 4 +- tests/Entity/Attachments/AttachmentTest.php | 2 +- tests/Entity/Parameters/PartParameterTest.php | 6 +- tests/Entity/UserSystem/UserTest.php | 4 +- .../Helpers/BBCodeToMarkdownConverterTest.php | 2 +- tests/Helpers/IPAnonymizerTest.php | 2 +- .../AttachmentPathResolverTest.php | 66 +++++++++---------- .../AttachmentURLGeneratorTest.php | 2 +- .../BuiltinAttachmentsFinderTest.php | 2 +- .../Attachments/FileTypeFilterToolsTest.php | 6 +- .../ImportExportSystem/EntityImporterTest.php | 2 +- .../DTOs/ParameterDTOTest.php | 4 +- .../Barcodes/BarcodeContentGeneratorTest.php | 4 +- .../LabelSystem/LabelTextReplacerTest.php | 4 +- .../AbstractElementProviderTest.php | 2 +- .../GlobalProvidersTest.php | 2 +- .../NamedElementProviderTest.php | 2 +- .../PartLotProviderTest.php | 2 +- .../PlaceholderProviders/PartProviderTest.php | 2 +- .../TimestampableElementProviderTest.php | 2 +- .../LabelSystem/SandboxedTwigFactoryTest.php | 4 +- tests/Services/Misc/FAIconGeneratorTest.php | 2 +- tests/Services/Misc/RangeParserTest.php | 4 +- .../Parameters/ParameterExtractorTest.php | 2 +- .../Services/Parts/PricedetailHelperTest.php | 2 +- .../UserSystem/PermissionManagerTest.php | 2 +- .../TFA/BackupCodeGeneratorTest.php | 4 +- tests/Twig/UserExtensionTest.php | 2 +- 44 files changed, 91 insertions(+), 94 deletions(-) rename tests/Controller/AdminPages/{AbstractAdminControllerTest.php => AbstractAdminController.php} (96%) rename tests/Controller/AdminPages/{AttachmentTypeControllerTest.php => AttachmentTypeController.php} (94%) rename tests/Controller/AdminPages/{CategoryControllerTest.php => CategoryController.php} (94%) rename tests/Controller/AdminPages/{FootprintControllerTest.php => FootprintController.php} (94%) rename tests/Controller/AdminPages/{LabelProfileControllerTest.php => LabelProfileController.php} (97%) rename tests/Controller/AdminPages/{ManufacturerControllerTest.php => ManufacturerController.php} (94%) rename tests/Controller/AdminPages/{MeasurementUnitControllerTest.php => MeasurementUnitController.php} (94%) rename tests/Controller/AdminPages/{ProjectControllerTest.php => ProjectController.php} (94%) rename tests/Controller/AdminPages/{StorelocationControllerTest.php => StorelocationController.php} (94%) rename tests/Controller/AdminPages/{SupplierControllerTest.php => SupplierController.php} (94%) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 762c1dcc..0a7c2dcb 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -19,10 +19,7 @@ - - - src - + diff --git a/rector.php b/rector.php index c45fab60..936b447e 100644 --- a/rector.php +++ b/rector.php @@ -37,7 +37,7 @@ return RectorConfig::configure() PHPUnitSetList::PHPUNIT_110, PHPUnitSetList::PHPUNIT_CODE_QUALITY, - + ]) ->withRules([ diff --git a/tests/ApplicationAvailabilityFunctionalTest.php b/tests/ApplicationAvailabilityFunctionalTest.php index 3f5a911e..d5bced49 100644 --- a/tests/ApplicationAvailabilityFunctionalTest.php +++ b/tests/ApplicationAvailabilityFunctionalTest.php @@ -53,7 +53,7 @@ class ApplicationAvailabilityFunctionalTest extends WebTestCase $this->assertTrue($client->getResponse()->isSuccessful(), 'Request not successful. Status code is '.$client->getResponse()->getStatusCode() . ' for URL '.$url); } - public function urlProvider(): ?Generator + public static function urlProvider(): ?Generator { //Homepage yield ['/']; diff --git a/tests/Controller/AdminPages/AbstractAdminControllerTest.php b/tests/Controller/AdminPages/AbstractAdminController.php similarity index 96% rename from tests/Controller/AdminPages/AbstractAdminControllerTest.php rename to tests/Controller/AdminPages/AbstractAdminController.php index ec858e4e..ed08a149 100644 --- a/tests/Controller/AdminPages/AbstractAdminControllerTest.php +++ b/tests/Controller/AdminPages/AbstractAdminController.php @@ -29,12 +29,12 @@ use Symfony\Component\Security\Core\Exception\AccessDeniedException; #[Group('slow')] #[Group('DB')] -abstract class AbstractAdminControllerTest extends WebTestCase +abstract class AbstractAdminController extends WebTestCase { protected static string $base_path = 'not_valid'; protected static string $entity_class = 'not valid'; - public function readDataProvider(): \Iterator + public static function readDataProvider(): \Iterator { yield ['noread', false]; yield ['anonymous', true]; @@ -99,7 +99,7 @@ abstract class AbstractAdminControllerTest extends WebTestCase $this->assertSame($read, !$client->getResponse()->isForbidden(), 'Permission Checking not working!'); } - public function deleteDataProvider(): \Iterator + public static function deleteDataProvider(): \Iterator { yield ['noread', false]; yield ['anonymous', false]; diff --git a/tests/Controller/AdminPages/AttachmentTypeControllerTest.php b/tests/Controller/AdminPages/AttachmentTypeController.php similarity index 94% rename from tests/Controller/AdminPages/AttachmentTypeControllerTest.php rename to tests/Controller/AdminPages/AttachmentTypeController.php index 0a5b0f6d..599a6f69 100644 --- a/tests/Controller/AdminPages/AttachmentTypeControllerTest.php +++ b/tests/Controller/AdminPages/AttachmentTypeController.php @@ -27,7 +27,7 @@ use App\Entity\Attachments\AttachmentType; #[Group('slow')] #[Group('DB')] -class AttachmentTypeControllerTest extends AbstractAdminControllerTest +class AttachmentTypeController extends AbstractAdminController { protected static string $base_path = '/en/attachment_type'; protected static string $entity_class = AttachmentType::class; diff --git a/tests/Controller/AdminPages/CategoryControllerTest.php b/tests/Controller/AdminPages/CategoryController.php similarity index 94% rename from tests/Controller/AdminPages/CategoryControllerTest.php rename to tests/Controller/AdminPages/CategoryController.php index 81a251b9..c1bac093 100644 --- a/tests/Controller/AdminPages/CategoryControllerTest.php +++ b/tests/Controller/AdminPages/CategoryController.php @@ -27,7 +27,7 @@ use App\Entity\Parts\Category; #[Group('slow')] #[Group('DB')] -class CategoryControllerTest extends AbstractAdminControllerTest +class CategoryController extends AbstractAdminController { protected static string $base_path = '/en/category'; protected static string $entity_class = Category::class; diff --git a/tests/Controller/AdminPages/FootprintControllerTest.php b/tests/Controller/AdminPages/FootprintController.php similarity index 94% rename from tests/Controller/AdminPages/FootprintControllerTest.php rename to tests/Controller/AdminPages/FootprintController.php index 64b4164e..7d617ba8 100644 --- a/tests/Controller/AdminPages/FootprintControllerTest.php +++ b/tests/Controller/AdminPages/FootprintController.php @@ -27,7 +27,7 @@ use App\Entity\Parts\Footprint; #[Group('slow')] #[Group('DB')] -class FootprintControllerTest extends AbstractAdminControllerTest +class FootprintController extends AbstractAdminController { protected static string $base_path = '/en/footprint'; protected static string $entity_class = Footprint::class; diff --git a/tests/Controller/AdminPages/LabelProfileControllerTest.php b/tests/Controller/AdminPages/LabelProfileController.php similarity index 97% rename from tests/Controller/AdminPages/LabelProfileControllerTest.php rename to tests/Controller/AdminPages/LabelProfileController.php index 02d294e5..838d872e 100644 --- a/tests/Controller/AdminPages/LabelProfileControllerTest.php +++ b/tests/Controller/AdminPages/LabelProfileController.php @@ -46,7 +46,7 @@ use PHPUnit\Framework\Attributes\Group; use App\Entity\LabelSystem\LabelProfile; use Symfony\Component\Security\Core\Exception\AccessDeniedException; -class LabelProfileControllerTest extends AbstractAdminControllerTest +class LabelProfileController extends AbstractAdminController { protected static string $base_path = '/en/label_profile'; protected static string $entity_class = LabelProfile::class; diff --git a/tests/Controller/AdminPages/ManufacturerControllerTest.php b/tests/Controller/AdminPages/ManufacturerController.php similarity index 94% rename from tests/Controller/AdminPages/ManufacturerControllerTest.php rename to tests/Controller/AdminPages/ManufacturerController.php index 577c19af..c2666f72 100644 --- a/tests/Controller/AdminPages/ManufacturerControllerTest.php +++ b/tests/Controller/AdminPages/ManufacturerController.php @@ -27,7 +27,7 @@ use App\Entity\Parts\Manufacturer; #[Group('slow')] #[Group('DB')] -class ManufacturerControllerTest extends AbstractAdminControllerTest +class ManufacturerController extends AbstractAdminController { protected static string $base_path = '/en/manufacturer'; protected static string $entity_class = Manufacturer::class; diff --git a/tests/Controller/AdminPages/MeasurementUnitControllerTest.php b/tests/Controller/AdminPages/MeasurementUnitController.php similarity index 94% rename from tests/Controller/AdminPages/MeasurementUnitControllerTest.php rename to tests/Controller/AdminPages/MeasurementUnitController.php index 4ebfad26..351f4e51 100644 --- a/tests/Controller/AdminPages/MeasurementUnitControllerTest.php +++ b/tests/Controller/AdminPages/MeasurementUnitController.php @@ -27,7 +27,7 @@ use App\Entity\Parts\MeasurementUnit; #[Group('slow')] #[Group('DB')] -class MeasurementUnitControllerTest extends AbstractAdminControllerTest +class MeasurementUnitController extends AbstractAdminController { protected static string $base_path = '/en/measurement_unit'; protected static string $entity_class = MeasurementUnit::class; diff --git a/tests/Controller/AdminPages/ProjectControllerTest.php b/tests/Controller/AdminPages/ProjectController.php similarity index 94% rename from tests/Controller/AdminPages/ProjectControllerTest.php rename to tests/Controller/AdminPages/ProjectController.php index b0a353ae..1de4bf52 100644 --- a/tests/Controller/AdminPages/ProjectControllerTest.php +++ b/tests/Controller/AdminPages/ProjectController.php @@ -28,7 +28,7 @@ use App\Entity\ProjectSystem\Project; #[Group('slow')] #[Group('DB')] -class ProjectControllerTest extends AbstractAdminControllerTest +class ProjectController extends AbstractAdminController { protected static string $base_path = '/en/project'; protected static string $entity_class = Project::class; diff --git a/tests/Controller/AdminPages/StorelocationControllerTest.php b/tests/Controller/AdminPages/StorelocationController.php similarity index 94% rename from tests/Controller/AdminPages/StorelocationControllerTest.php rename to tests/Controller/AdminPages/StorelocationController.php index 42e57bc5..fee06c67 100644 --- a/tests/Controller/AdminPages/StorelocationControllerTest.php +++ b/tests/Controller/AdminPages/StorelocationController.php @@ -27,7 +27,7 @@ use App\Entity\Parts\StorageLocation; #[Group('slow')] #[Group('DB')] -class StorelocationControllerTest extends AbstractAdminControllerTest +class StorelocationController extends AbstractAdminController { protected static string $base_path = '/en/store_location'; protected static string $entity_class = StorageLocation::class; diff --git a/tests/Controller/AdminPages/SupplierControllerTest.php b/tests/Controller/AdminPages/SupplierController.php similarity index 94% rename from tests/Controller/AdminPages/SupplierControllerTest.php rename to tests/Controller/AdminPages/SupplierController.php index 3a147576..3549eb4b 100644 --- a/tests/Controller/AdminPages/SupplierControllerTest.php +++ b/tests/Controller/AdminPages/SupplierController.php @@ -27,7 +27,7 @@ use App\Entity\Parts\Supplier; #[Group('slow')] #[Group('DB')] -class SupplierControllerTest extends AbstractAdminControllerTest +class SupplierController extends AbstractAdminController { protected static string $base_path = '/en/supplier'; protected static string $entity_class = Supplier::class; diff --git a/tests/Controller/RedirectControllerTest.php b/tests/Controller/RedirectControllerTest.php index af322c43..ac2776e5 100644 --- a/tests/Controller/RedirectControllerTest.php +++ b/tests/Controller/RedirectControllerTest.php @@ -51,7 +51,7 @@ class RedirectControllerTest extends WebTestCase $this->userRepo = $this->em->getRepository(User::class); } - public function urlMatchDataProvider(): \Iterator + public static function urlMatchDataProvider(): \Iterator { yield ['/', true]; yield ['/part/2/info', true]; @@ -79,7 +79,7 @@ class RedirectControllerTest extends WebTestCase $this->assertSame($expect_redirect, $response->isRedirect()); } - public function urlAddLocaleDataProvider(): \Iterator + public static function urlAddLocaleDataProvider(): \Iterator { //User locale, original target, redirect target yield ['de', '/', '/de/']; diff --git a/tests/DataTables/Filters/Constraints/FilterTraitTest.php b/tests/DataTables/Filters/Constraints/FilterTraitTest.php index c2ec5905..e1e459d5 100644 --- a/tests/DataTables/Filters/Constraints/FilterTraitTest.php +++ b/tests/DataTables/Filters/Constraints/FilterTraitTest.php @@ -41,7 +41,7 @@ class FilterTraitTest extends TestCase $this->assertFalse($this->useHaving); } - public function isAggregateFunctionStringDataProvider(): iterable + public static function isAggregateFunctionStringDataProvider(): iterable { yield [false, 'parts.test']; yield [false, 'attachments.test']; diff --git a/tests/DatatablesAvailabilityTest.php b/tests/DatatablesAvailabilityTest.php index 9e4e7f15..dad61be3 100644 --- a/tests/DatatablesAvailabilityTest.php +++ b/tests/DatatablesAvailabilityTest.php @@ -79,7 +79,7 @@ class DatatablesAvailabilityTest extends WebTestCase $this->assertJson($client->getResponse()->getContent()); } - public function urlProvider(): ?\Generator + public static function urlProvider(): ?\Generator { //Part lists yield ['/category/1/parts']; diff --git a/tests/Doctrine/SQLiteRegexMiddlewareTest.php b/tests/Doctrine/SQLiteRegexMiddlewareTest.php index 6278cc54..67410f76 100644 --- a/tests/Doctrine/SQLiteRegexMiddlewareTest.php +++ b/tests/Doctrine/SQLiteRegexMiddlewareTest.php @@ -29,7 +29,7 @@ use PHPUnit\Framework\TestCase; class SQLiteRegexMiddlewareTest extends TestCase { - public function regexpDataProvider(): \Generator + public static function regexpDataProvider(): \Generator { yield [1, 'a', 'a']; yield [0, 'a', 'b']; @@ -48,7 +48,7 @@ class SQLiteRegexMiddlewareTest extends TestCase $this->assertSame($expected, SQLiteRegexExtensionMiddlewareDriver::regexp($pattern, $value)); } - public function fieldDataProvider(): \Generator + public static function fieldDataProvider(): \Generator { // Null cases diff --git a/tests/Entity/Attachments/AttachmentTest.php b/tests/Entity/Attachments/AttachmentTest.php index d878a689..00a68d7d 100644 --- a/tests/Entity/Attachments/AttachmentTest.php +++ b/tests/Entity/Attachments/AttachmentTest.php @@ -75,7 +75,7 @@ class AttachmentTest extends TestCase $this->assertEmpty($attachment->getFilename()); } - public function subClassesDataProvider(): \Iterator + public static function subClassesDataProvider(): \Iterator { yield [AttachmentTypeAttachment::class, AttachmentType::class]; yield [CategoryAttachment::class, Category::class]; diff --git a/tests/Entity/Parameters/PartParameterTest.php b/tests/Entity/Parameters/PartParameterTest.php index aec471cb..64550eee 100644 --- a/tests/Entity/Parameters/PartParameterTest.php +++ b/tests/Entity/Parameters/PartParameterTest.php @@ -47,7 +47,7 @@ use PHPUnit\Framework\TestCase; class PartParameterTest extends TestCase { - public function valueWithUnitDataProvider(): \Iterator + public static function valueWithUnitDataProvider(): \Iterator { yield ['1', 1.0, '']; yield ['1 V', 1.0, 'V']; @@ -55,7 +55,7 @@ class PartParameterTest extends TestCase yield ['1.23 V', 1.23, 'V']; } - public function formattedValueDataProvider(): \Iterator + public static function formattedValueDataProvider(): \Iterator { yield ['Text Test', null, null, null, 'V', 'Text Test']; yield ['10.23 V', null, 10.23, null, 'V', '']; @@ -68,7 +68,7 @@ class PartParameterTest extends TestCase yield ['10.23 V (9 V ... 11 V) [Test]', 9, 10.23, 11, 'V', 'Test']; } - public function formattedValueWithLatexDataProvider(): \Iterator + public static function formattedValueWithLatexDataProvider(): \Iterator { yield ['Text Test', null, null, null, 'V', 'Text Test']; yield ['10.23 $\mathrm{V}$', null, 10.23, null, 'V', '']; diff --git a/tests/Entity/UserSystem/UserTest.php b/tests/Entity/UserSystem/UserTest.php index bc4dec2d..a4349e1d 100644 --- a/tests/Entity/UserSystem/UserTest.php +++ b/tests/Entity/UserSystem/UserTest.php @@ -47,7 +47,7 @@ class UserTest extends TestCase $this->assertSame('John (@username)', $user->getFullName(true)); } - public function googleAuthenticatorEnabledDataProvider(): \Iterator + public static function googleAuthenticatorEnabledDataProvider(): \Iterator { yield [null, false]; yield ['', false]; @@ -62,7 +62,7 @@ class UserTest extends TestCase $this->assertSame($expected, $user->isGoogleAuthenticatorEnabled()); } - #[RequiresPhpunit('8')] + //#[RequiresPhpunit('8')] public function testSetBackupCodes(): void { $user = new User(); diff --git a/tests/Helpers/BBCodeToMarkdownConverterTest.php b/tests/Helpers/BBCodeToMarkdownConverterTest.php index ad29f959..9506cba4 100644 --- a/tests/Helpers/BBCodeToMarkdownConverterTest.php +++ b/tests/Helpers/BBCodeToMarkdownConverterTest.php @@ -35,7 +35,7 @@ class BBCodeToMarkdownConverterTest extends TestCase $this->converter = new BBCodeToMarkdownConverter(); } - public function dataProvider(): \Iterator + public static function dataProvider(): \Iterator { yield ['[b]Bold[/b]', '**Bold**']; yield ['[i]Italic[/i]', '*Italic*']; diff --git a/tests/Helpers/IPAnonymizerTest.php b/tests/Helpers/IPAnonymizerTest.php index 24994c49..e16368eb 100644 --- a/tests/Helpers/IPAnonymizerTest.php +++ b/tests/Helpers/IPAnonymizerTest.php @@ -29,7 +29,7 @@ use PHPUnit\Framework\TestCase; class IPAnonymizerTest extends TestCase { - public function anonymizeDataProvider(): \Generator + public static function anonymizeDataProvider(): \Generator { yield ['127.0.0.0', '127.0.0.23']; yield ['2001:db8:85a3::', '2001:0db8:85a3:0000:0000:8a2e:0370:7334']; diff --git a/tests/Services/Attachments/AttachmentPathResolverTest.php b/tests/Services/Attachments/AttachmentPathResolverTest.php index b304e645..69658e13 100644 --- a/tests/Services/Attachments/AttachmentPathResolverTest.php +++ b/tests/Services/Attachments/AttachmentPathResolverTest.php @@ -70,19 +70,19 @@ class AttachmentPathResolverTest extends WebTestCase $this->assertNull($this->service->parameterToAbsolutePath('/./this/one/too')); } - public function placeholderDataProvider(): \Iterator + public static function placeholderDataProvider(): \Iterator { //We need to do initialization (again), as dataprovider is called before setUp() self::bootKernel(); - $this->projectDir_orig = realpath(self::$kernel->getProjectDir()); - $this->projectDir = str_replace('\\', '/', $this->projectDir_orig); - $this->media_path = $this->projectDir.'/public/media'; - $this->footprint_path = $this->projectDir.'/public/img/footprints'; - yield ['%FOOTPRINTS%/test/test.jpg', $this->footprint_path.'/test/test.jpg']; - yield ['%FOOTPRINTS%/test/', $this->footprint_path.'/test/']; - yield ['%MEDIA%/test', $this->media_path.'/test']; - yield ['%MEDIA%', $this->media_path]; - yield ['%FOOTPRINTS%', $this->footprint_path]; + $projectDir_orig = realpath(self::$kernel->getProjectDir()); + $projectDir = str_replace('\\', '/', $projectDir_orig); + $media_path = $projectDir.'/public/media'; + $footprint_path = $projectDir.'/public/img/footprints'; + yield ['%FOOTPRINTS%/test/test.jpg', $footprint_path.'/test/test.jpg']; + yield ['%FOOTPRINTS%/test/', $footprint_path.'/test/']; + yield ['%MEDIA%/test', $media_path.'/test']; + yield ['%MEDIA%', $media_path]; + yield ['%FOOTPRINTS%', $footprint_path]; //Footprints 3D are disabled yield ['%FOOTPRINTS_3D%', null]; //Check that invalid pathes return null @@ -99,25 +99,25 @@ class AttachmentPathResolverTest extends WebTestCase yield ['%FOOTPRINTS%/0\..\test', null]; } - public function realPathDataProvider(): \Iterator + public static function realPathDataProvider(): \Iterator { //We need to do initialization (again), as dataprovider is called before setUp() self::bootKernel(); - $this->projectDir_orig = realpath(self::$kernel->getProjectDir()); - $this->projectDir = str_replace('\\', '/', $this->projectDir_orig); - $this->media_path = $this->projectDir.'/public/media'; - $this->footprint_path = $this->projectDir.'/public/img/footprints'; - yield [$this->media_path.'/test/img.jpg', '%MEDIA%/test/img.jpg']; - yield [$this->media_path.'/test/img.jpg', '%BASE%/data/media/test/img.jpg', true]; - yield [$this->footprint_path.'/foo.jpg', '%FOOTPRINTS%/foo.jpg']; - yield [$this->footprint_path.'/foo.jpg', '%FOOTPRINTS%/foo.jpg', true]; + $projectDir_orig = realpath(self::$kernel->getProjectDir()); + $projectDir = str_replace('\\', '/', $projectDir_orig); + $media_path = $projectDir.'/public/media'; + $footprint_path = $projectDir.'/public/img/footprints'; + yield [$media_path.'/test/img.jpg', '%MEDIA%/test/img.jpg']; + yield [$media_path.'/test/img.jpg', '%BASE%/data/media/test/img.jpg', true]; + yield [$footprint_path.'/foo.jpg', '%FOOTPRINTS%/foo.jpg']; + yield [$footprint_path.'/foo.jpg', '%FOOTPRINTS%/foo.jpg', true]; //Every kind of absolute path, that is not based with our placeholder dirs must be invald yield ['/etc/passwd', null]; yield ['C:\\not\\existing.txt', null]; //More than one placeholder is not allowed - yield [$this->footprint_path.'/test/'.$this->footprint_path, null]; + yield [$footprint_path.'/test/'.$footprint_path, null]; //Path must begin with path - yield ['/not/root'.$this->footprint_path, null]; + yield ['/not/root'.$footprint_path, null]; } #[DataProvider('placeholderDataProvider')] @@ -132,23 +132,23 @@ class AttachmentPathResolverTest extends WebTestCase $this->assertSame($expected, $this->service->realPathToPlaceholder($param, $old_method)); } - public function germanFootprintPathdDataProvider(): ?\Generator + public static function germanFootprintPathdDataProvider(): ?\Generator { self::bootKernel(); - $this->projectDir_orig = realpath(self::$kernel->getProjectDir()); - $this->projectDir = str_replace('\\', '/', $this->projectDir_orig); - $this->footprint_path = $this->projectDir.'/public/img/footprints'; + $projectDir_orig = realpath(self::$kernel->getProjectDir()); + $projectDir = str_replace('\\', '/', $projectDir_orig); + $footprint_path = $projectDir.'/public/img/footprints'; - yield [$this->footprint_path. '/Active/Diodes/THT/DIODE_P600.png', '%FOOTPRINTS%/Aktiv/Dioden/Bedrahtet/DIODE_P600.png']; - yield [$this->footprint_path . '/Passive/Resistors/THT/Carbon/RESISTOR-CARBON_0207.png', '%FOOTPRINTS%/Passiv/Widerstaende/Bedrahtet/Kohleschicht/WIDERSTAND-KOHLE_0207.png']; - yield [$this->footprint_path . '/Optics/LEDs/THT/LED-GREEN_3MM.png', '%FOOTPRINTS%/Optik/LEDs/Bedrahtet/LED-GRUEN_3MM.png']; - yield [$this->footprint_path . '/Passive/Capacitors/TrimmerCapacitors/TRIMMER_CAPACITOR-RED_TZ03F.png', '%FOOTPRINTS%/Passiv/Kondensatoren/Trimmkondensatoren/TRIMMKONDENSATOR-ROT_TZ03F.png']; - yield [$this->footprint_path . '/Active/ICs/TO/IC_TO126.png', '%FOOTPRINTS%/Aktiv/ICs/TO/IC_TO126.png']; - yield [$this->footprint_path . '/Electromechanics/Switches_Buttons/RotarySwitches/ROTARY_SWITCH_DIP10.png', '%FOOTPRINTS%/Elektromechanik/Schalter_Taster/Drehschalter/DREHSCHALTER_DIP10.png']; - yield [$this->footprint_path . '/Electromechanics/Connectors/DINConnectors/SOCKET_DIN_MAB_4.png', '%FOOTPRINTS%/Elektromechanik/Verbinder/Rundsteckverbinder/BUCHSE_DIN_MAB_4.png']; + yield [$footprint_path. '/Active/Diodes/THT/DIODE_P600.png', '%FOOTPRINTS%/Aktiv/Dioden/Bedrahtet/DIODE_P600.png']; + yield [$footprint_path . '/Passive/Resistors/THT/Carbon/RESISTOR-CARBON_0207.png', '%FOOTPRINTS%/Passiv/Widerstaende/Bedrahtet/Kohleschicht/WIDERSTAND-KOHLE_0207.png']; + yield [$footprint_path . '/Optics/LEDs/THT/LED-GREEN_3MM.png', '%FOOTPRINTS%/Optik/LEDs/Bedrahtet/LED-GRUEN_3MM.png']; + yield [$footprint_path . '/Passive/Capacitors/TrimmerCapacitors/TRIMMER_CAPACITOR-RED_TZ03F.png', '%FOOTPRINTS%/Passiv/Kondensatoren/Trimmkondensatoren/TRIMMKONDENSATOR-ROT_TZ03F.png']; + yield [$footprint_path . '/Active/ICs/TO/IC_TO126.png', '%FOOTPRINTS%/Aktiv/ICs/TO/IC_TO126.png']; + yield [$footprint_path . '/Electromechanics/Switches_Buttons/RotarySwitches/ROTARY_SWITCH_DIP10.png', '%FOOTPRINTS%/Elektromechanik/Schalter_Taster/Drehschalter/DREHSCHALTER_DIP10.png']; + yield [$footprint_path . '/Electromechanics/Connectors/DINConnectors/SOCKET_DIN_MAB_4.png', '%FOOTPRINTS%/Elektromechanik/Verbinder/Rundsteckverbinder/BUCHSE_DIN_MAB_4.png']; //Leave english pathes untouched - yield [$this->footprint_path . '/Passive/Capacitors/CAPACITOR_CTS_A_15MM.png', '%FOOTPRINTS%/Passive/Capacitors/CAPACITOR_CTS_A_15MM.png']; + yield [$footprint_path . '/Passive/Capacitors/CAPACITOR_CTS_A_15MM.png', '%FOOTPRINTS%/Passive/Capacitors/CAPACITOR_CTS_A_15MM.png']; } #[DataProvider('germanFootprintPathdDataProvider')] diff --git a/tests/Services/Attachments/AttachmentURLGeneratorTest.php b/tests/Services/Attachments/AttachmentURLGeneratorTest.php index 7816f697..e9e6d992 100644 --- a/tests/Services/Attachments/AttachmentURLGeneratorTest.php +++ b/tests/Services/Attachments/AttachmentURLGeneratorTest.php @@ -39,7 +39,7 @@ class AttachmentURLGeneratorTest extends WebTestCase self::$service = self::getContainer()->get(AttachmentURLGenerator::class); } - public function dataProvider(): \Iterator + public static function dataProvider(): \Iterator { yield ['/public/test.jpg', 'test.jpg']; yield ['/public/folder/test.jpg', 'folder/test.jpg']; diff --git a/tests/Services/Attachments/BuiltinAttachmentsFinderTest.php b/tests/Services/Attachments/BuiltinAttachmentsFinderTest.php index 569d84f9..80c699ac 100644 --- a/tests/Services/Attachments/BuiltinAttachmentsFinderTest.php +++ b/tests/Services/Attachments/BuiltinAttachmentsFinderTest.php @@ -44,7 +44,7 @@ class BuiltinAttachmentsFinderTest extends WebTestCase self::$service = self::getContainer()->get(BuiltinAttachmentsFinder::class); } - public function dataProvider(): \Iterator + public static function dataProvider(): \Iterator { //No value should return empty array yield ['', [], []]; diff --git a/tests/Services/Attachments/FileTypeFilterToolsTest.php b/tests/Services/Attachments/FileTypeFilterToolsTest.php index 73002371..1b85eaeb 100644 --- a/tests/Services/Attachments/FileTypeFilterToolsTest.php +++ b/tests/Services/Attachments/FileTypeFilterToolsTest.php @@ -36,7 +36,7 @@ class FileTypeFilterToolsTest extends WebTestCase self::$service = self::getContainer()->get(FileTypeFilterTools::class); } - public function validateDataProvider(): \Iterator + public static function validateDataProvider(): \Iterator { yield ['', true]; //Empty string is valid @@ -55,7 +55,7 @@ class FileTypeFilterToolsTest extends WebTestCase yield ['.png .jpg .gif', false]; } - public function normalizeDataProvider(): \Iterator + public static function normalizeDataProvider(): \Iterator { yield ['', '']; yield ['.jpeg,.png,.gif', '.jpeg,.png,.gif']; @@ -69,7 +69,7 @@ class FileTypeFilterToolsTest extends WebTestCase yield ['png, .gif, .png,', '.png,.gif']; } - public function extensionAllowedDataProvider(): \Iterator + public static function extensionAllowedDataProvider(): \Iterator { yield ['', 'txt', true]; yield ['', 'everything_should_match', true]; diff --git a/tests/Services/ImportExportSystem/EntityImporterTest.php b/tests/Services/ImportExportSystem/EntityImporterTest.php index 8f7d1004..7c6f4d5d 100644 --- a/tests/Services/ImportExportSystem/EntityImporterTest.php +++ b/tests/Services/ImportExportSystem/EntityImporterTest.php @@ -174,7 +174,7 @@ EOT; $this->assertSame($longName, $errors[0]['entity']->getName()); } - public function formatDataProvider(): \Iterator + public static function formatDataProvider(): \Iterator { yield ['csv', 'csv']; yield ['csv', 'CSV']; diff --git a/tests/Services/InfoProviderSystem/DTOs/ParameterDTOTest.php b/tests/Services/InfoProviderSystem/DTOs/ParameterDTOTest.php index 4bc9f5c6..4c4e9bfe 100644 --- a/tests/Services/InfoProviderSystem/DTOs/ParameterDTOTest.php +++ b/tests/Services/InfoProviderSystem/DTOs/ParameterDTOTest.php @@ -29,7 +29,7 @@ use PHPUnit\Framework\TestCase; class ParameterDTOTest extends TestCase { - public function parseValueFieldDataProvider(): \Generator + public static function parseValueFieldDataProvider(): \Generator { //Text value yield [ @@ -132,7 +132,7 @@ class ParameterDTOTest extends TestCase ]; } - public function parseValueIncludingUnitDataProvider(): \Generator + public static function parseValueIncludingUnitDataProvider(): \Generator { //Text value yield [ diff --git a/tests/Services/LabelSystem/Barcodes/BarcodeContentGeneratorTest.php b/tests/Services/LabelSystem/Barcodes/BarcodeContentGeneratorTest.php index ecaa8bf5..69458734 100644 --- a/tests/Services/LabelSystem/Barcodes/BarcodeContentGeneratorTest.php +++ b/tests/Services/LabelSystem/Barcodes/BarcodeContentGeneratorTest.php @@ -58,14 +58,14 @@ class BarcodeContentGeneratorTest extends KernelTestCase $this->service = self::getContainer()->get(BarcodeContentGenerator::class); } - public function Barcode1DDataProvider(): \Iterator + public static function Barcode1DDataProvider(): \Iterator { yield ['P0000', Part::class]; yield ['L0000', PartLot::class]; yield ['S0000', StorageLocation::class]; } - public function Barcode2DDataProvider(): \Iterator + public static function Barcode2DDataProvider(): \Iterator { yield ['/scan/part/0', Part::class]; yield ['/scan/lot/0', PartLot::class]; diff --git a/tests/Services/LabelSystem/LabelTextReplacerTest.php b/tests/Services/LabelSystem/LabelTextReplacerTest.php index 4af74275..346d1bab 100644 --- a/tests/Services/LabelSystem/LabelTextReplacerTest.php +++ b/tests/Services/LabelSystem/LabelTextReplacerTest.php @@ -71,7 +71,7 @@ class LabelTextReplacerTest extends WebTestCase $this->target->setComment('P Comment'); } - public function handlePlaceholderDataProvider(): \Iterator + public static function handlePlaceholderDataProvider(): \Iterator { yield ['Part 1', '[[NAME]]']; yield ['P Description', '[[DESCRIPTION]]']; @@ -83,7 +83,7 @@ class LabelTextReplacerTest extends WebTestCase yield ['Test [[NAME]]', 'Test [[NAME]]', 'Test [[NAME]]']; } - public function replaceDataProvider(): \Iterator + public static function replaceDataProvider(): \Iterator { yield ['Part 1', '[[NAME]]']; yield ['TestPart 1', 'Test[[NAME]]']; diff --git a/tests/Services/LabelSystem/PlaceholderProviders/AbstractElementProviderTest.php b/tests/Services/LabelSystem/PlaceholderProviders/AbstractElementProviderTest.php index 4e902862..fb917b82 100644 --- a/tests/Services/LabelSystem/PlaceholderProviders/AbstractElementProviderTest.php +++ b/tests/Services/LabelSystem/PlaceholderProviders/AbstractElementProviderTest.php @@ -64,7 +64,7 @@ class AbstractElementProviderTest extends WebTestCase }; } - public function dataProvider(): \Iterator + public static function dataProvider(): \Iterator { yield ['123', '[[ID]]']; } diff --git a/tests/Services/LabelSystem/PlaceholderProviders/GlobalProvidersTest.php b/tests/Services/LabelSystem/PlaceholderProviders/GlobalProvidersTest.php index 6f41e057..d74bb215 100644 --- a/tests/Services/LabelSystem/PlaceholderProviders/GlobalProvidersTest.php +++ b/tests/Services/LabelSystem/PlaceholderProviders/GlobalProvidersTest.php @@ -62,7 +62,7 @@ class GlobalProvidersTest extends WebTestCase $this->target = new Part(); } - public function dataProvider(): \Iterator + public static function dataProvider(): \Iterator { yield ['Part-DB', '[[INSTALL_NAME]]']; yield ['anonymous', '[[USERNAME]]']; diff --git a/tests/Services/LabelSystem/PlaceholderProviders/NamedElementProviderTest.php b/tests/Services/LabelSystem/PlaceholderProviders/NamedElementProviderTest.php index 2e333c13..c5efc768 100644 --- a/tests/Services/LabelSystem/PlaceholderProviders/NamedElementProviderTest.php +++ b/tests/Services/LabelSystem/PlaceholderProviders/NamedElementProviderTest.php @@ -67,7 +67,7 @@ class NamedElementProviderTest extends WebTestCase }; } - public function dataProvider(): \Iterator + public static function dataProvider(): \Iterator { yield ['This is my Name', '[[NAME]]']; } diff --git a/tests/Services/LabelSystem/PlaceholderProviders/PartLotProviderTest.php b/tests/Services/LabelSystem/PlaceholderProviders/PartLotProviderTest.php index 8826ddcf..5aa8f1bd 100644 --- a/tests/Services/LabelSystem/PlaceholderProviders/PartLotProviderTest.php +++ b/tests/Services/LabelSystem/PlaceholderProviders/PartLotProviderTest.php @@ -86,7 +86,7 @@ class PartLotProviderTest extends WebTestCase $this->target->setOwner($user); } - public function dataProvider(): \Iterator + public static function dataProvider(): \Iterator { yield ['unknown', '[[LOT_ID]]']; yield ['Lot description', '[[LOT_NAME]]']; diff --git a/tests/Services/LabelSystem/PlaceholderProviders/PartProviderTest.php b/tests/Services/LabelSystem/PlaceholderProviders/PartProviderTest.php index 01cad822..7af936cd 100644 --- a/tests/Services/LabelSystem/PlaceholderProviders/PartProviderTest.php +++ b/tests/Services/LabelSystem/PlaceholderProviders/PartProviderTest.php @@ -87,7 +87,7 @@ class PartProviderTest extends WebTestCase $this->target->setComment('Bold *Italic*'); } - public function dataProvider(): \Iterator + public static function dataProvider(): \Iterator { yield ['Node 2.1', '[[CATEGORY]]']; yield ['Node 2 → Node 2.1', '[[CATEGORY_FULL]]']; diff --git a/tests/Services/LabelSystem/PlaceholderProviders/TimestampableElementProviderTest.php b/tests/Services/LabelSystem/PlaceholderProviders/TimestampableElementProviderTest.php index 8af988f7..a72f06df 100644 --- a/tests/Services/LabelSystem/PlaceholderProviders/TimestampableElementProviderTest.php +++ b/tests/Services/LabelSystem/PlaceholderProviders/TimestampableElementProviderTest.php @@ -75,7 +75,7 @@ class TimestampableElementProviderTest extends WebTestCase }; } - public function dataProvider(): \Iterator + public static function dataProvider(): \Iterator { \Locale::setDefault('en'); yield ['1/1/00, 12:00 AM', '[[LAST_MODIFIED]]']; diff --git a/tests/Services/LabelSystem/SandboxedTwigFactoryTest.php b/tests/Services/LabelSystem/SandboxedTwigFactoryTest.php index 26ba131e..32317435 100644 --- a/tests/Services/LabelSystem/SandboxedTwigFactoryTest.php +++ b/tests/Services/LabelSystem/SandboxedTwigFactoryTest.php @@ -62,7 +62,7 @@ class SandboxedTwigFactoryTest extends WebTestCase $this->service = self::getContainer()->get(SandboxedTwigFactory::class); } - public function twigDataProvider(): \Iterator + public static function twigDataProvider(): \Iterator { yield [' {% for i in range(1, 3) %} {{ part.id }} @@ -95,7 +95,7 @@ class SandboxedTwigFactoryTest extends WebTestCase ']; } - public function twigNotAllowedDataProvider(): \Iterator + public static function twigNotAllowedDataProvider(): \Iterator { yield ['{% block test %} {% endblock %}']; yield ['{% deprecated test %}']; diff --git a/tests/Services/Misc/FAIconGeneratorTest.php b/tests/Services/Misc/FAIconGeneratorTest.php index f5c30b72..1aec5d02 100644 --- a/tests/Services/Misc/FAIconGeneratorTest.php +++ b/tests/Services/Misc/FAIconGeneratorTest.php @@ -42,7 +42,7 @@ class FAIconGeneratorTest extends WebTestCase $this->service = self::getContainer()->get(FAIconGenerator::class); } - public function fileExtensionDataProvider(): \Iterator + public static function fileExtensionDataProvider(): \Iterator { yield ['pdf', 'fa-file-pdf']; yield ['jpeg','fa-file-image']; diff --git a/tests/Services/Misc/RangeParserTest.php b/tests/Services/Misc/RangeParserTest.php index 71c412cb..084ca80b 100644 --- a/tests/Services/Misc/RangeParserTest.php +++ b/tests/Services/Misc/RangeParserTest.php @@ -58,7 +58,7 @@ class RangeParserTest extends WebTestCase $this->service = self::getContainer()->get(RangeParser::class); } - public function dataProvider(): \Iterator + public static function dataProvider(): \Iterator { yield [[], '']; yield [[], ' ']; @@ -82,7 +82,7 @@ class RangeParserTest extends WebTestCase yield [[], '1, 2, test', true]; } - public function validDataProvider(): \Iterator + public static function validDataProvider(): \Iterator { yield [true, '']; yield [true, ' ']; diff --git a/tests/Services/Parameters/ParameterExtractorTest.php b/tests/Services/Parameters/ParameterExtractorTest.php index 8c6e7df1..d0b8fed0 100644 --- a/tests/Services/Parameters/ParameterExtractorTest.php +++ b/tests/Services/Parameters/ParameterExtractorTest.php @@ -57,7 +57,7 @@ class ParameterExtractorTest extends WebTestCase $this->service = self::getContainer()->get(ParameterExtractor::class); } - public function emptyDataProvider(): \Iterator + public static function emptyDataProvider(): \Iterator { yield ['']; yield [' ']; diff --git a/tests/Services/Parts/PricedetailHelperTest.php b/tests/Services/Parts/PricedetailHelperTest.php index b9c5e72b..5d9bd351 100644 --- a/tests/Services/Parts/PricedetailHelperTest.php +++ b/tests/Services/Parts/PricedetailHelperTest.php @@ -44,7 +44,7 @@ class PricedetailHelperTest extends WebTestCase $this->service = self::getContainer()->get(PricedetailHelper::class); } - public function maxDiscountAmountDataProvider(): ?\Generator + public static function maxDiscountAmountDataProvider(): ?\Generator { $part = new Part(); yield [$part, null, 'Part without any orderdetails failed!']; diff --git a/tests/Services/UserSystem/PermissionManagerTest.php b/tests/Services/UserSystem/PermissionManagerTest.php index 3082e3d8..478202f4 100644 --- a/tests/Services/UserSystem/PermissionManagerTest.php +++ b/tests/Services/UserSystem/PermissionManagerTest.php @@ -92,7 +92,7 @@ class PermissionManagerTest extends WebTestCase $this->group->method('getParent')->willReturn($parent_group); } - public function getPermissionNames(): \Iterator + public static function getPermissionNames(): \Iterator { //List some permission names yield ['parts']; diff --git a/tests/Services/UserSystem/TFA/BackupCodeGeneratorTest.php b/tests/Services/UserSystem/TFA/BackupCodeGeneratorTest.php index 83f39cae..2b6c22d1 100644 --- a/tests/Services/UserSystem/TFA/BackupCodeGeneratorTest.php +++ b/tests/Services/UserSystem/TFA/BackupCodeGeneratorTest.php @@ -47,7 +47,7 @@ class BackupCodeGeneratorTest extends TestCase new BackupCodeGenerator(4, 10); } - public function codeLengthDataProvider(): \Iterator + public static function codeLengthDataProvider(): \Iterator { yield [6]; yield [8]; @@ -62,7 +62,7 @@ class BackupCodeGeneratorTest extends TestCase $this->assertMatchesRegularExpression("/^([a-f0-9]){{$code_length}}\$/", $generator->generateSingleCode()); } - public function codeCountDataProvider(): \Iterator + public static function codeCountDataProvider(): \Iterator { yield [2]; yield [8]; diff --git a/tests/Twig/UserExtensionTest.php b/tests/Twig/UserExtensionTest.php index 21009f5e..235d39c1 100644 --- a/tests/Twig/UserExtensionTest.php +++ b/tests/Twig/UserExtensionTest.php @@ -37,7 +37,7 @@ class UserExtensionTest extends WebTestCase $this->service = self::getContainer()->get(UserExtension::class); } - public function removeLocaleFromPathDataSet(): ?\Generator + public static function removeLocaleFromPathDataSet(): ?\Generator { yield ['/', '/de/']; yield ['/test', '/de/test'];