You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
assertStringStartsWith after assertNotEmpty fails #231
assertStringStartsWith after assertNotEmpty fails with error "Parameter #1 $prefix of method PHPUnit\Framework\Assert::assertStringStartsWith() expects non-empty-string', while the string cannot be empty due to the assertNotEmpty call.
Activity
ondrejmirtes commentedon May 23, 2025
Can't reproduce the problem: https://phpstan.org/r/91888ed1-d67f-4749-9d9c-a617da10722b
Please show the output of
vendor/bin/phpstan diagnose.ondrejmirtes commentedon May 23, 2025
I get the problem now, phpstan-phpunit has a special type-specifying extension that doesn't work for strings:
phpstan-phpunit/src/Type/PHPUnit/Assert/AssertTypeSpecifyingExtensionHelper.php
Lines 168 to 177 in d35895e
staabm commentedon Oct 29, 2025
I was not able to reproduce the issue, but I think phpstan/phpstan-src#4473 will have fixed it in case its still relevant
staabm commentedon Nov 15, 2025
@gisostallenberg please double check whether this issue still reproduces on the latest release
github-actions commentedon Mar 13, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.