Tuning PHPStan to Maximum Strictness - Ondřej Mirtes

Take your PHP code to the next level by tuning PHPStan to maximum strictness, enabling strict rules to identify errors and typos, and customizing rules for specific projects or libraries.

Key takeaways
  • Tuning PHPStan to Maximum Strictness
  • Strict rules can be enabled to identify errors and typos
  • Default behavior is not to report errors on mixed types
  • Options can be enabled for stricter analysis, such as bleeding edge mode
  • Custom rules can be created for specific projects or libraries
  • PHPStan’s default is to consider code as correct
  • Stricter rules can be enabled to report errors on missing type hints
  • Level nine is considered extremely strict and can break some consistent state
  • Link to github link for custom rule creation