PHPStan has supported what is called declaration-site variance for a long time. An example you might be familiar with is the infamous @template-covariant. And although not as often useful, it also has a contravariant counterpart.
When writing custom rules for PHPStan, developers can either return plain strings or RuleError instances.
“Access to an undefined property Foo::$x” is one of the most common errors you will encounter when running PHPStan. Here are all the ways you can solve it.
PHPStan’s website is statically generated thanks to this stack:
I’ve been looking forward to implementing and releasing the ideas present in PHPStan 1.10 for a long time.
This one is for developers of custom rules and other extension types. PHPStan can be extended by writing your own code.