Skip to content

Commit 38dd381

Browse files
phpstan-botclaude
authored andcommitted
Shorten setUp() comments in type unit tests
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 375fa8b commit 38dd381

4 files changed

Lines changed: 12 additions & 22 deletions

File tree

tests/PHPStan/Type/Accessory/HasPropertyTypeTest.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@ class HasPropertyTypeTest extends PHPStanTestCase
2727
#[Override]
2828
protected function setUp(): void
2929
{
30-
// Re-register the default (runtime) container as the global static reflection
31-
// provider before every test. Without this, a container configured with a
32-
// different PhpVersion - registered by another test (e.g. through its data
33-
// provider) - can leak in and make the version-dependent Closure data set
34-
// below flaky. See https://github.com/phpstan/phpstan/issues/14860
30+
// Pin the runtime container so a foreign PhpVersion leaked by another test
31+
// can't flake the version-dependent Closure data set below.
32+
// See https://github.com/phpstan/phpstan/issues/14860
3533
self::getContainer();
3634
}
3735

tests/PHPStan/Type/Generic/GenericObjectTypeTest.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,9 @@ class GenericObjectTypeTest extends PHPStanTestCase
3636
#[Override]
3737
protected function setUp(): void
3838
{
39-
// Re-register the default (runtime) container as the global static reflection
40-
// provider before every test. Without this, a container configured with a
41-
// different PhpVersion - registered by another test - can leak in and make the
42-
// version-dependent data sets (which depend on the reflected, version-specific
43-
// variance of built-in generics) flaky.
44-
// See https://github.com/phpstan/phpstan/issues/14860
39+
// Pin the runtime container so a foreign PhpVersion leaked by another test
40+
// can't flake the version-dependent data sets (reflected variance of built-in
41+
// generics). See https://github.com/phpstan/phpstan/issues/14860
4542
self::getContainer();
4643
}
4744

tests/PHPStan/Type/ObjectTypeTest.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,9 @@ class ObjectTypeTest extends PHPStanTestCase
5555
#[Override]
5656
protected function setUp(): void
5757
{
58-
// Re-register the default (runtime) container as the global static reflection
59-
// provider before every test. Without this, a container configured with a
60-
// different PhpVersion - registered by another test - can leak in and make the
61-
// version-dependent Closure data sets (which depend on whether dynamic
62-
// properties are still allowed) flaky.
63-
// See https://github.com/phpstan/phpstan/issues/14860
58+
// Pin the runtime container so a foreign PhpVersion leaked by another test
59+
// can't flake the version-dependent Closure data sets (dynamic-property
60+
// handling). See https://github.com/phpstan/phpstan/issues/14860
6461
self::getContainer();
6562
}
6663

tests/PHPStan/Type/TypeCombinatorTest.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,9 @@ class TypeCombinatorTest extends PHPStanTestCase
7777
#[Override]
7878
protected function setUp(): void
7979
{
80-
// Re-register the default (runtime) container as the global static reflection
81-
// provider before every test. Without this, a container configured with a
82-
// different PhpVersion - registered by another test - can leak in and make the
83-
// version-dependent data sets (e.g. dynamic-property handling of final classes)
84-
// flaky. See https://github.com/phpstan/phpstan/issues/14860
80+
// Pin the runtime container so a foreign PhpVersion leaked by another test
81+
// can't flake the version-dependent data sets (dynamic-property handling of
82+
// final classes). See https://github.com/phpstan/phpstan/issues/14860
8583
self::getContainer();
8684
}
8785

0 commit comments

Comments
 (0)