Skip to content

Bump to PHPStan ^2.1.48 - #7971

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

samsonasik merged 2 commits into
mainfrom
bump-to-phpstan-2148

Conversation

@samsonasik

@samsonasik samsonasik commented Apr 16, 2026 •

Copy link
Copy Markdown
Member

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
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant