Internal mixin class incorrectly generating method.internalClass errors
Bug report
PestPHP uses functions from a mixin that is @internal. PHPStan is now flagging those method calls with method.internalClass errors despite the base class not being internal.
Example code:
\expect($value)
->toBeArray()
->toHaveCount(3)
->toHaveKey('capacity')
->toHaveKey('space')
->toHaveKey('spaces');
Each method call here is now throwing:
Call to method toHaveKey() of internal class Pest\Mixins\Expectation from outside its root namespace Pest.
The playground link is a smaller version of this.
Code snippet that reproduces the problem
https://phpstan.org/r/30b85dca-0c3c-4013-aa2f-f742ccd0753e
Expected output
No errors
Did PHPStan help you today? Did it make you happy in any way?
No response
Not sure about this, same reasoning as in https://github.com/phpstan/phpstan/issues/13021#issuecomment-2886080434
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.