Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to PHPStan 2.1.2 and fix test #6689

Merged
merged 8 commits into from
Jan 22, 2025
Merged

Bump to PHPStan 2.1.2 and fix test #6689

merged 8 commits into from
Jan 22, 2025

Conversation

samsonasik
Copy link
Member

On PHPStan 2.1.2, it seems unit test got error:

There was 1 failure:

1) Rector\Tests\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector\NullToStrictStringFuncCallArgRectorTest::test with data set #13 ('/home/runner/work/rector-src/...hp.inc')
Failed on fixture file "skip_always_string_if_else_dom_element.php.inc"
Failed asserting that string matches format description.
--- Expected
+++ Actual
@@ @@
         $dom->loadHTML($html);
         $titleElement = $dom->getElementsByTagName('title')->item(0);
         if ($titleElement?->nodeValue !== null) {
-            return trim($titleElement->nodeValue);
+            return trim((string) $titleElement->nodeValue);

This PR try to fix it.

@samsonasik
Copy link
Member Author

Fixed 🎉

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I am merging it ;)

@samsonasik samsonasik merged commit 4a954af into main Jan 22, 2025
40 checks passed
@samsonasik samsonasik deleted the bump-phpstan-212 branch January 22, 2025 03:24
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.

2 participants