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 1.12.4 and fix test #6318

Merged
merged 2 commits into from
Sep 20, 2024
Merged

Bump to PHPStan 1.12.4 and fix test #6318

merged 2 commits into from
Sep 20, 2024

Conversation

samsonasik
Copy link
Member

@samsonasik samsonasik commented Sep 20, 2024

Bump to PHPStan 1.12.4 seems cause error in tests:

2) Rector\Tests\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedCallRector\Php80Test::test with data set #1 ('/Users/samsonasik/www/rector-...hp.inc')
Failed on fixture file "abs_return_int.php.inc"
Failed asserting that string matches format description.
--- Expected
+++ Actual
@@ @@
 
 final class AbsReturnInt
 {
-    function aa(int $param): int
+    function aa(int $param): float|int
     {
         return abs($param);
     }

/Users/samsonasik/www/rector-src/src/Testing/PHPUnit/AbstractRectorTestCase.php:249
/Users/samsonasik/www/rector-src/src/Testing/PHPUnit/AbstractRectorTestCase.php:165
/Users/samsonasik/www/rector-src/rules-tests/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedCallRector/Php80Test.php:16

I will check if it fixable or just follow the change as is.

@samsonasik
Copy link
Member Author

Fixed 🎉 with use selectFromArgs() 5e7bde2

@samsonasik
Copy link
Member Author

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

@samsonasik samsonasik merged commit 3c50a47 into main Sep 20, 2024
36 checks passed
@samsonasik samsonasik deleted the bump-phpstan-1124 branch September 20, 2024 01:58
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.

1 participant