Apache NetBeans (Incubating)

Wednesday September 26, 2018

PHPStan Support

Hi all. Today, we will show you about PHPStan integration which will be available in the next NetBeans version i.e. NetBeans 10 as a new code analysis feature. If you have already used other code analysis features(e.g. Code Sniffer), you should be able to use this with similar way soon.

Options

First of all, let's set the Options (Tools > Options > PHP > Code Analysis > PHPStan). You can set a script path, a configuration file path and a level. At least you have to set the PHPStan script path to "PHPStan". If you don't set "Configuration" path, the configuration file of project root directory would be used.

Nb10-php-phpstan-support-options.png

Inspect project/directory/file

Then, let's inspect a project/direcoty/file using PHPStan. Please click "Source > Inspect...". The inspect dialog is shown.

Nb10-php-phpstan-support-inspect-dialog.png

Please choose "Scope" which you would like to inspect and PHPStan as "Configuration". The files are inspected when you click the "inspect" button. Finally, The results are shown in the inspector window after the inspection is done.

Nb10-php-phpstan-support-results.png

That's all for today. As always, please test it. You can download a development version from Jenkins Build. If you find some issues or enhancements, please report them to JIRA (Components: php - Code). Thanks.

Comments:

good

Posted by hendryjullius on September 26, 2018 at 06:36 AM UTC #

Great job Junichi!

Posted by Tomáš Myšík on September 26, 2018 at 07:14 PM UTC #

Tomas, definitely, thanks to your existing code, of course :)

Posted by Junichi Yamamoto on September 26, 2018 at 09:20 PM UTC #

Wow, brilliant !

Posted by Petru on September 26, 2018 at 11:39 PM UTC #

Great job! Brilliant!! Jack G.

Posted by Jack on September 28, 2018 at 01:22 PM UTC #

Post a Comment:
Comments are closed for this entry.

Calendar

Search

Hot Blogs (today's hits)

Tag Cloud

Categories

Feeds

Links

Navigation