PHPStan 2.0 Released

  • 247 Views
  • 1 Like
  • 1 min read

It’s been over three years since PHPStan 1.0 came out, and the progress has been incredible. With 176 releases since then, it’s clear this tool isn’t slowing down. PHPStan 2.0 is here with smarter features, better performance, and tighter checks to make PHP development more reliable and efficient. Let’s break down the highlights of what’s new.

  • Level 10 -Identifies more mixed type issues, catching explicitly-typed and implicitly-typed mixed values for stricter and safer code.

  • List types for cleaner arrays - Introduces the list type for arrays with sequential integer keys, simplifying array handling and improving code clarity.

  • Massive memory usage reduction - Cuts memory consumption by up to 70%, speeding up analysis and resolving CI memory issues in large projects.

  • Smarter PHPDoc validation - Cross-checks @var PHPDoc tags with actual code types to eliminate inaccuracies and encourage better documentation practices.

  • Improved caching - Removes unnecessary caches, saving disk space and simplifying analysis processes. Depending on the project size, you may notice a significant reduction in disk space usage.

Check out the detailed 2.0.0 release notes to explore all the new features and changes. Follow the upgrade guide if you want to move from PHPStan 1.0 to 2.0.

 Join Our Monthly Newsletter

Get the latest news and popular articles to your inbox every month

We never send SPAM nor unsolicited emails

0 Comments

Leave a Reply

Your email address will not be published.

Replying to the message: View original

Hey visitor! Unlock access to featured articles, remove ads and much more - it's free.