Skip to content

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Oct 15, 2025

Fixes

------ ----------------------------------------------------------------------- 
  Line   tests/Rules/PHPUnit/DataProviderDataRuleTest.php                       
 ------ ----------------------------------------------------------------------- 
  24     Parameter #1 $rules of class PHPStan\Testing\CompositeRule             
         constructor expects array<PHPStan\Rules\Rule<PhpParser\Node>>, array{  
         PHPStan\Rules\PHPUnit\DataProviderDataRule,                            
         PHPStan\Rules\Methods\CallMethodsRule} given.                          
         🪪  argument.type                                                      
         💡  Template type TNodeType on class PHPStan\Rules\Rule is not         
         covariant. Learn more: https://phpstan.org/blog/whats-up-with-templat  
         e-covariant                                                            
 ------ ----------------------------------------------------------------------- 

in phpstan/phpstan-phpunit#238

@ondrejmirtes
Copy link
Member

This fixes the problem but it's a hack 😊 I just forced the rules array type with @var.

@staabm staabm deleted the cov branch October 16, 2025 09:48
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