Skip to content

Bump to PHPStan ^2.1.48#7971

Merged
samsonasik merged 2 commits intomainfrom
bump-to-phpstan-2148
Apr 16, 2026
Merged

Bump to PHPStan ^2.1.48#7971
samsonasik merged 2 commits intomainfrom
bump-to-phpstan-2148

Conversation

@samsonasik
Copy link
Copy Markdown
Member

@samsonasik samsonasik commented Apr 16, 2026

PHPStan 2.1.48 just released:

https://github.com/phpstan/phpstan/releases/tag/2.1.48

it seems it cause unit test error:

Time: 00:46.102, Memory: 562.00 MB

There were 2 failures:

1) Rector\Tests\TypeDeclarationDocblocks\Rector\ClassMethod\DocblockReturnArrayFromDirectArrayInstanceRector\DocblockReturnArrayFromDirectArrayInstanceRectorTest::test#11 with data ('/Users/samsonasik/www/rector-...hp.inc')
Failed on fixture file "override_bare_array.php.inc"
Failed asserting that string matches format description.
--- Expected
+++ Actual
@@ @@
 namespace Rector\Tests\TypeDeclarationDocblocks\Rector\ClassMethod\DocblockReturnArrayFromDirectArrayInstanceRector\Fixture;
 
 /**
- * @return array<string, bool[]>
+ * @return array<string, array<int, bool>>
  */
 function overrideBareArray()
 {

/Users/samsonasik/www/rector-src/src/Testing/PHPUnit/AbstractRectorTestCase.php:253
/Users/samsonasik/www/rector-src/src/Testing/PHPUnit/AbstractRectorTestCase.php:163
/Users/samsonasik/www/rector-src/rules-tests/TypeDeclarationDocblocks/Rector/ClassMethod/DocblockReturnArrayFromDirectArrayInstanceRector/DocblockReturnArrayFromDirectArrayInstanceRectorTest.php:16

2) Rector\Tests\TypeDeclarationDocblocks\Rector\ClassMethod\DocblockReturnArrayFromDirectArrayInstanceRector\DocblockReturnArrayFromDirectArrayInstanceRectorTest::test#8 with data ('/Users/samsonasik/www/rector-...hp.inc')
Failed on fixture file "false_and_true.php.inc"
Failed asserting that string matches format description.
--- Expected
+++ Actual
@@ @@
 namespace Rector\Tests\TypeDeclarationDocblocks\Rector\ClassMethod\DocblockReturnArrayFromDirectArrayInstanceRector\Fixture;
 
 /**
- * @return array<string, bool[]>
+ * @return array<string, array<int, bool>>
  */
 function FalseAndTrue()
 {

/Users/samsonasik/www/rector-src/src/Testing/PHPUnit/AbstractRectorTestCase.php:253
/Users/samsonasik/www/rector-src/src/Testing/PHPUnit/AbstractRectorTestCase.php:163
/Users/samsonasik/www/rector-src/rules-tests/TypeDeclarationDocblocks/Rector/ClassMethod/DocblockReturnArrayFromDirectArrayInstanceRector/DocblockReturnArrayFromDirectArrayInstanceRectorTest.php:16

FAILURES!

Ref https://github.com/rectorphp/rector-src/actions/runs/24496436243/job/71592378978?pr=7971#step:5:106

I will look into it and patch it.

@samsonasik
Copy link
Copy Markdown
Member Author

Fixed with update test fixtures 29378e8 👍

@samsonasik
Copy link
Copy Markdown
Member Author

All green 🎉 @TomasVotruba I am merging it ;)

@samsonasik samsonasik merged commit 05371b7 into main Apr 16, 2026
61 checks passed
@samsonasik samsonasik deleted the bump-to-phpstan-2148 branch April 16, 2026 07:00
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