From 6a96aed654fa139348751f6932acb6d20a2fb94d Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Mon, 15 Dec 2025 11:48:43 +0000 Subject: [PATCH] feat: adds `phpunit@12.5` support --- composer.json | 10 +++++----- rector.php | 4 ++-- src/Pest.php | 2 +- src/Plugins/Help.php | 1 + .../Help/visual_snapshot_of_help_command_output.snap | 4 +++- .../visual_snapshot_of_help_command_output.snap | 2 +- tests/Visual/Parallel.php | 2 +- 7 files changed, 14 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index ddc8aeef..e2514f05 100644 --- a/composer.json +++ b/composer.json @@ -18,19 +18,19 @@ ], "require": { "php": "^8.3.0", - "brianium/paratest": "^7.14.2", + "brianium/paratest": "^7.16.0", "nunomaduro/collision": "^8.8.3", "nunomaduro/termwind": "^2.3.3", "pestphp/pest-plugin": "^4.0.0", "pestphp/pest-plugin-arch": "^4.0.0", "pestphp/pest-plugin-mutate": "^4.0.1", - "pestphp/pest-plugin-profanity": "^4.2.0", - "phpunit/phpunit": "^12.4.4", + "pestphp/pest-plugin-profanity": "^4.2.1", + "phpunit/phpunit": "^12.5.3", "symfony/process": "^7.4.0|^8.0.0" }, "conflict": { "filp/whoops": "<2.18.3", - "phpunit/phpunit": ">12.4.4", + "phpunit/phpunit": ">12.5.3", "sebastian/exporter": "<7.0.0", "webmozart/assert": "<1.11.0" }, @@ -58,7 +58,7 @@ "pestphp/pest-dev-tools": "^4.0.0", "pestphp/pest-plugin-browser": "^4.1.1", "pestphp/pest-plugin-type-coverage": "^4.0.3", - "psy/psysh": "^0.12.15" + "psy/psysh": "^0.12.17" }, "minimum-stability": "dev", "prefer-stable": true, diff --git a/rector.php b/rector.php index 3ec9fb23..de460955 100644 --- a/rector.php +++ b/rector.php @@ -2,10 +2,10 @@ declare(strict_types=1); -use Rector\CodingStyle\Rector\FunctionLike\FunctionLikeToFirstClassCallableRector; use Rector\Config\RectorConfig; use Rector\TypeDeclaration\Rector\ClassMethod\NarrowObjectReturnTypeRector; use Rector\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector; +use Rector\CodingStyle\Rector\ArrowFunction\ArrowFunctionDelegatingCallToFirstClassCallableRector; return RectorConfig::configure() ->withPaths([ @@ -14,7 +14,7 @@ return RectorConfig::configure() ->withSkip([ __DIR__.'/src/Plugins/Parallel/Paratest/WrapperRunner.php', ReturnNeverTypeRector::class, - FunctionLikeToFirstClassCallableRector::class, + ArrowFunctionDelegatingCallToFirstClassCallableRector::class, NarrowObjectReturnTypeRector::class, ]) ->withPreparedSets( diff --git a/src/Pest.php b/src/Pest.php index 87c9c7d0..be8e6d71 100644 --- a/src/Pest.php +++ b/src/Pest.php @@ -6,7 +6,7 @@ namespace Pest; function version(): string { - return '4.1.6'; + return '4.2.0'; } function testDirectory(string $file = ''): string diff --git a/src/Plugins/Help.php b/src/Plugins/Help.php index 89a47b66..049d119e 100644 --- a/src/Plugins/Help.php +++ b/src/Plugins/Help.php @@ -99,6 +99,7 @@ final readonly class Help implements HandlesArguments { $helpReflection = new PHPUnitHelp; + // @phpstan-ignore-next-line $content = (fn (): array => $this->elements())->call($helpReflection); $content['Configuration'] = [...[[ diff --git a/tests/.pest/snapshots/Visual/Help/visual_snapshot_of_help_command_output.snap b/tests/.pest/snapshots/Visual/Help/visual_snapshot_of_help_command_output.snap index ce4d6375..54d75c94 100644 --- a/tests/.pest/snapshots/Visual/Help/visual_snapshot_of_help_command_output.snap +++ b/tests/.pest/snapshots/Visual/Help/visual_snapshot_of_help_command_output.snap @@ -1,5 +1,5 @@ - Pest Testing Framework 4.1.6. + Pest Testing Framework 4.2.0. USAGE: pest [options] @@ -27,6 +27,7 @@ --pr .... Output to standard output tests with the given pull request number --pull-request Output to standard output tests with the given pull request number (alias for --pr) --retry Run non-passing tests first and stop execution upon first error or failure + --all .................... Ignore test selection from XML configuration file --list-suites ................................... List available test suites --testsuite [name] ......... Only run tests from the specified test suite(s) --exclude-testsuite [name] .. Exclude tests from the specified test suite(s) @@ -138,6 +139,7 @@ --only-summary-for-coverage-text Option for code coverage report in text format: only show summary --show-uncovered-for-coverage-text Option for code coverage report in text format: show uncovered files --coverage-xml [dir] . Write code coverage report in XML format to directory + --exclude-source-from-xml-coverage Exclude [source] element from code coverage report in XML format --warm-coverage-cache ........................... Warm static analysis cache --coverage-filter [dir] ........... Include [dir] in code coverage reporting --path-coverage .......... Report path coverage in addition to line coverage diff --git a/tests/.pest/snapshots/Visual/Version/visual_snapshot_of_help_command_output.snap b/tests/.pest/snapshots/Visual/Version/visual_snapshot_of_help_command_output.snap index 5963ed17..74ee35dc 100644 --- a/tests/.pest/snapshots/Visual/Version/visual_snapshot_of_help_command_output.snap +++ b/tests/.pest/snapshots/Visual/Version/visual_snapshot_of_help_command_output.snap @@ -1,3 +1,3 @@ - Pest Testing Framework 4.1.6. + Pest Testing Framework 4.2.0. diff --git a/tests/Visual/Parallel.php b/tests/Visual/Parallel.php index f70c2826..93d2059d 100644 --- a/tests/Visual/Parallel.php +++ b/tests/Visual/Parallel.php @@ -16,7 +16,7 @@ $run = function () { test('parallel', function () use ($run) { expect($run('--exclude-group=integration')) - ->toContain('Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 39 todos, 26 skipped, 1178 passed (2790 assertions)') + ->toContain('Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 39 todos, 26 skipped, 1177 passed (2790 assertions)') ->toContain('Parallel: 3 processes'); })->skipOnWindows();