Blog
Blog
All Articles(https://phpstan.org/blog)
Releases(https://phpstan.org/blog/releases)
Guides(https://phpstan.org/blog/guides)
Other(https://phpstan.org/blog/other)
Other Sections
RSS(https://phpstan.org/rss.xml)
Sponsor PHPStan!(https://phpstan.org/sponsor)
Introducing PHPStan Pro—Save Your Keystrokes and Get More Productive!
September 29, 2020 · 7 min read
I’m really excited to show everyone what I’ve been working on for the past 9 months. It’s a new product aimed to enhance user experience when using PHPStan. I want to challenge a common presumption that developer tools like PHPStan are usually constrained to CLI, limiting their visual side, and possible interactions.
With PHPStan Pro you’ll be able to sift through reported errors much faster.
Web UI for browsing errors #
When you launch PHPStan Pro by adding --pro flag to the analyse command, it will automatically open your web browser with its user interface:
Instead of scrolling through a textual output of errors on the command line, you’ll get a beautiful interactive UI that allows you to go back and forth between files, and see the surrounding code. This is especially nice if you have a large number of errors.
Developers are also often slowed down by having to pull up the error location in their IDE manually – by searching for the file name and jumping to a specific line. PHPStan Pro will do that for you when you click this icon:
What’s important to mention in this day and age of privacy nightmares and data leaks is that PHPStan Pro runs locally on the client and no information about the analysed code is transmitted to a server.
PHPStan Pro can also show you ignored errors, right where they’d be reported if they weren’t ignored:
Continuous analysis (watch mode) #
Once you fix all the found errors and achieve Error Zero(https://twitter.com/OndrejMirtes/status/1301760838144004098), PHPStan Pro keeps running in the background, watching files, and re-running analysis each time it detects a change. There’s a loading indicator in the lower right corner for that:
Continuous analysis reflects and supports my preferred workflow when developing applications: when I realize that I have to pass an additional new value through multiple layers of a codebase, I start by changing method signatures – renaming them, adding parameters, changing return typehints. After that, I run PHPStan which essentially gives me a todo list of places to fix. But running PHPStan several times a minute to get instant feedback can become tedious. Having a persistent window that refreshes automatically and gives me an up-to-date view of the project is much nicer.
Pricing #
I want to address the elephpant(https://elephpant.me/) in the room. As the name suggests, PHPStan Pro is a paid add-on for the free open-source PHPStan project.
I believe that successful open-source projects should have a business model behind them so that their creators can justify spending time on their development.
As PHPStan gets more popular and more complex, it takes a lot of time every day to just stay on top of new issues, let alone work on something new and innovative. That’s why I’m creating something that people would only get if they pay for it, so I can work on PHPStan full-time and maybe even hire other developers to help me out. I’m in this for the long haul.
By paying for PHPStan Pro, you’re supporting the development of both open-source PHPStan and PHPStan Pro.