File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments