The Plan to Support PHP 8.1

November 25, 2021 · 1 min read

For the past few years PHPStan always had support for the latest PHP version on day one, and I considered a matter of pride to achieve that.

Today marks the new PHP 8.1 release that contains a lot of cool new features which I’m really excited about. Unfortunately, unlike the past releases, PHPStan isn’t fully ready for them yet. This is because the whole fall season I’ve been really busy with the massive PHPStan 1.0 release.

So what’s the current situation? Since 1.0 PHPStan was able to run on PHP 8.1 without triggering any deprecations or other issues, but you couldn’t take advantage of the new PHP 8.1 features.

PHPStan 1.1 brought support for the native never type, pure intersection types, and tentative return types.

PHPStan 1.2 brought support for new in initializers, first-class callables, and the array_is_list() function.

PHPStan 1.3 brought support for enums.

PHPStan 1.4 brought support for readonly properties.

PHPStan 1.6 updated changed function signatures. As of this release, PHP 8.1 is fully supported!

Do you like PHPStan and use it every day? Consider supporting further development of PHPStan on GitHub Sponsors. I’d really appreciate it!

© 2016–2024 Ondřej Mirtes