Skip to content

Bump dev dependencies, PHPUnit 13 - #976

Merged
TomasVotruba merged 1 commit into
mainfrom
bump-dev-deps
Jul 30, 2026
Merged

Bump dev dependencies, PHPUnit 13#976
TomasVotruba merged 1 commit into
mainfrom
bump-dev-deps

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

composer update + vendor/bin/jack raise-to-installed, with PHPUnit taken from 11.5 to 13.

 "require-dev": {
-    "phpunit/phpunit": "^11.5",
+    "phpunit/phpunit": "^13.2",
-    "rector/jack": "^0.5",
+    "rector/jack": "^1.0",
-    "symplify/easy-coding-standard": "^13.1",
+    "symplify/easy-coding-standard": "^13.2",
-    "symplify/phpstan-rules": "^14.10",
+    "symplify/phpstan-rules": "^14.12",
 }

This one is not optional anymore - rector-src now requires sebastian/diff ^9 (rectorphp/rector-src#8220), which PHPUnit 11.5 cannot satisfy, so composer update fails on main as it stands.

One removed attribute took out 47 tests

PrePromotedTest pins a php version below constructor promotion:

$rectorConfig->phpVersion(PhpVersionFeature::TYPED_PROPERTIES);

That was safe because the class ran in its own process. PHPUnit 13 dropped RunClassInSeparateProcess in favour of the plural form, so the attribute silently stopped applying and the pinned version leaked into every test that ran after it - 47 fixtures lost their promoted constructors:

-    public function __construct(private readonly SomeService $someService)
+    private SomeService $someService;
+    public function __construct(SomeService $someService)
     {
+        $this->someService = $someService;
     }
-use PHPUnit\Framework\Attributes\RunClassInSeparateProcess;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

-#[RunClassInSeparateProcess]
+#[RunTestsInSeparateProcesses]

PHPStan catches the removal too - Attribute class PHPUnit\Framework\Attributes\RunClassInSeparateProcess does not exist.

Run composer update and vendor/bin/jack raise-to-installed.

PHPUnit 13 removed the RunClassInSeparateProcess attribute, which
kept the pinned php version of PrePromotedTest from leaking into
every later test.
@TomasVotruba
TomasVotruba merged commit 8f1570c into main Jul 30, 2026
7 checks passed
@TomasVotruba
TomasVotruba deleted the bump-dev-deps branch July 30, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant