PHP is nothing like compiled languages. If you make a mistake, the program will crash when the line of code with the mistake is executed. When testing a PHP application, whether manually or automatically, developers spend a lot of their time discovering mistakes that wouldn’t even compile in other languages, leaving less time for testing actual business logic.

PHPStan is a popular static analyser focused on finding bugs in your code. By leveraging the strength of PHP type system further enhanced in PHPStan itself, developers can create robust applications and discover bugs early in the development process. The aid the tool provides during refactoring is also indispensable.

In this workshop, the attendees will learn how to install, configure and run PHPStan, and also receive tips how to write code so that PHPStan can be as powerful as possible. They will also be able to write their own PHPStan rules and extensions.

Comments

Comments are closed.

Loved this tutorial going into PHPStan. Even having used PHPStan for years, I learned new things. Hearing the inside reasons about why things are the way they are was helpful. I appreciated time on the keyboard to work on leveling up, trying out new rules and higher levels. Thank you!

Marc at 00:00 on 19 Mar 2024

Talk was mostly about hidden settings to tune the strictness of the analyser.
This in combination with several packages could give you the most optimal results... Or not, because turning it all up to "11" is also not a good idea.

Good explanation and very useful

It was a very interesting workshop that covers some basic but also deep insights about how to get more out of PHPStan.