Skip to content

Random failling phpstan-src test-suite #13494

@staabm

Description

@staabm

Bug report

as we already discussed and see sometimes in some PR the test-suite is failling randomly sometimes.

locally I just just got this error:

There was 1 error:

1) PHPStan\Rules\Pure\PureMethodRuleTest::testImpureAssignRef
PHPStan\ShouldNotHappenException: Internal error.

/Users/m.staab/Documents/GitHub/phpstan-src/src/Reflection/ReflectionProvider/DummyReflectionProvider.php:24
/Users/m.staab/Documents/GitHub/phpstan-src/src/Reflection/Dummy/DummyPropertyReflection.php:31
/Users/m.staab/Documents/GitHub/phpstan-src/src/Type/MixedType.php:419
/Users/m.staab/Documents/GitHub/phpstan-src/src/Type/MixedType.php:411
/Users/m.staab/Documents/GitHub/phpstan-src/src/Rules/Properties/PropertyReflectionFinder.php:125
/Users/m.staab/Documents/GitHub/phpstan-src/src/Rules/Properties/PropertyReflectionFinder.php:94
/Users/m.staab/Documents/GitHub/phpstan-src/src/Analyser/MutatingScope.php:2278
/Users/m.staab/Documents/GitHub/phpstan-src/src/Analyser/MutatingScope.php:813
/Users/m.staab/Documents/GitHub/phpstan-src/src/Analyser/MutatingScope.php:2775
/Users/m.staab/Documents/GitHub/phpstan-src/src/Analyser/NodeScopeResolver.php:2474
/Users/m.staab/Documents/GitHub/phpstan-src/src/Analyser/NodeScopeResolver.php:5627
/Users/m.staab/Documents/GitHub/phpstan-src/src/Analyser/NodeScopeResolver.php:2442
/Users/m.staab/Documents/GitHub/phpstan-src/src/Analyser/NodeScopeResolver.php:900
/Users/m.staab/Documents/GitHub/phpstan-src/src/Analyser/NodeScopeResolver.php:406
/Users/m.staab/Documents/GitHub/phpstan-src/src/Analyser/NodeScopeResolver.php:755
/Users/m.staab/Documents/GitHub/phpstan-src/src/Analyser/NodeScopeResolver.php:406
/Users/m.staab/Documents/GitHub/phpstan-src/src/Analyser/NodeScopeResolver.php:1001
/Users/m.staab/Documents/GitHub/phpstan-src/src/Analyser/NodeScopeResolver.php:406
/Users/m.staab/Documents/GitHub/phpstan-src/src/Analyser/NodeScopeResolver.php:947
/Users/m.staab/Documents/GitHub/phpstan-src/src/Analyser/NodeScopeResolver.php:336
/Users/m.staab/Documents/GitHub/phpstan-src/src/Analyser/FileAnalyser.php:247
/Users/m.staab/Documents/GitHub/phpstan-src/src/Analyser/Analyser.php:83
/Users/m.staab/Documents/GitHub/phpstan-src/src/Testing/RuleTestCase.php:249
/Users/m.staab/Documents/GitHub/phpstan-src/src/Testing/RuleTestCase.php:149
/Users/m.staab/Documents/GitHub/phpstan-src/tests/PHPStan/Rules/Pure/PureMethodRuleTest.php:182

which IMO reveals we have race conditions in ReflectionProviderStaticAccessor

Code snippet that reproduces the problem

No response

Expected output

no random test-suite errors

Did PHPStan help you today? Did it make you happy in any way?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions