Repository navigation
2.1.0
Read all about this release on PHPStan's blog!
Major new features 馃殌
- Support for PHP 8.4's property hooks (RFC)
- Support for PHP 8.4's asymmetric visibility (RFC)
- Support for PHP 8.4's
#[Deprecated]attribute (RFC)
Bleeding edge 馃敧
If you want to see the shape of things to come and adopt bleeding edge features early, you can include this config file in your project's phpstan.neon:
includes:
- vendor/phpstan/phpstan/conf/bleedingEdge.neon
Of course, there are no backwards compatibility guarantees when you include this file. The behaviour and reported errors can change in minor versions with this file included. Learn more
Improvements 馃敡
- Readonly classes cannot be combined with
#[AllowDynamicProperties](#3738), #12281, thanks @staabm! - Check trait attributes (#3738), thanks @staabm!
- Named argument detection is scope-PHP version dependent (#3662), thanks @staabm!
- Improve loose comparison on integer (#3748), #12317, #12312, thanks @staabm!
- Improve loose comparison on union type (#3750), thanks @staabm!
- AccessStaticPropertiesRule - fixed blindspot about
parent::(phpstan/phpstan-src@41837b4)
Bugfixes 馃悰
Internals 馃攳
- Attributes rules use
In*Nodevirtual nodes for more precise Scope phpstan/phpstan-src@90e48fa) - Remove duplicated PHPDoc from InternalScopeFactory classes (#3761), thanks @herndlm!
- Scope: use
Scope::getConstantinstead (#3666), thanks @staabm!