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.

Just bring your laptop with PHP 7.1+ and Composer installed.


Comments are closed.

It was great, we got a walkthrough from zero to hero, with a lot of details and explanations.
At the end i had a PR ready to start using PHPStan in the company project CI pipeline, and i had a good idea of how to build new rules for PHPStan.

Lot's of examples, working with attendees. There was no particular problems with the workshop, maybe some more examples to be done by attendees on some repo (like for example simple repo prepared to with tasks to fix or simply complete)

MG at 18:09 on 15 Nov 2019

Great talk :)

Good presentation, many useful information. Tip for next workshop - you can prepare example project, and everyone on workshop can you the same code. Custom projects have different quality, so if everyone work on the same code we can discuss occurred problems. For example you can prepare project and we can fixing bugs that we can reach "No erros" message on max PHPStan level

Great to work on real examples. I liked to write my own rules. The only cons was the last part about extensions, which for me was the hardest one (not often work with reflections) and I was already tired.

Ondřej gave an amazing workshop about PHPStan. In the first part, he invited us to test it in our own projects, going by each level and explain how it works.

The second part is composed of a series of explanations on how to build new rules, as well, how to write extensions to PHPStan.

Nice to mention that we helped one attendee to create a new rule to PHPStan: and also give the steps for a new one.