Skip to content

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Dec 3, 2022

closes phpstan/phpstan#2759

expected test failure without the src/ change:

2) PHPStan\Rules\Methods\CallStaticMethodsRuleTest::testCallStaticMethods
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
 328: Call to static method doFoo() on an unknown class CallStaticMethods\TraitWithStaticMethod.
     💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
 344: Call to an undefined static method static(CallStaticMethods\CallWithStatic)::nonexistent().
+352: Static call to instance method DOMDocument::loadHTML().
 '

/Users/staabm/workspace/phpstan-src/src/Testing/RuleTestCase.php:153
/Users/staabm/workspace/phpstan-src/tests/PHPStan/Rules/Methods/CallStaticMethodsRuleTest.php:40

@ondrejmirtes ondrejmirtes merged commit 66dc2ad into phpstan:1.9.x Dec 4, 2022
@ondrejmirtes
Copy link
Member

Thank you.

@staabm staabm deleted the loadhtml branch December 4, 2022 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Static usage of DOMDocument::loadHTML is causing a false-positive rule failure
2 participants