• Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 11.0
    • Fix Version/s: 12.1
    • Component/s: php - Code Analysis
    • Labels:


      Answering the call to help identify NetBeans features that are no longer working properly.

      Since Composer has become widespread, most of the tools are now installed as projects dependencies, not global. Yet NetBeans generally only allows to specify global paths to these tools via Options. When different projects use different versions of these tools, one global path doesn't suffice anymore as it may work with some projects, but not the others.

      One notable exception is PHPUnit that currently allows per-project configuration, although it is called 'Use custom PHPUnit script' while nowadays it's really a must to set this option for each project.

      By default, paths to these tools should be detected from the project's composer file (perhaps by making these plug-ins dependent on the Composer service/plug-in that will do the common work?). An option to specify the path manually on per-project basis would be nice too for edge cases, but not really necessary. Other configuration options should be made available to per-project basis as well.

      In my work, I only use some of the plug-ins, but I think the above issue applies to most of them.

      There are also some specific issues with Code Analysis plug-ins which I wasn't able to run properly:

      PHPStan single file inspection (Source / Inspect...): If there's no error, it opens the Inspector tab, but it's blank, perhaps it should say something like "no errors". If there is an error (I can see the output XML in the Output window), the Inspect dialog doesn't go away and there is an exception reported:

      	at org.netbeans.modules.php.analysis.PHPStanAnalyzerImpl.doAnalyze(
      	at org.netbeans.modules.php.analysis.PHPStanAnalyzerImpl.analyze(
      	at org.netbeans.modules.analysis.RunAnalysis$1$1.doRunAnalyzer(
      	at org.netbeans.modules.analysis.RunAnalysis$1$
      	at org.openide.util.RequestProcessor$
      	at org.netbeans.modules.openide.util.GlobalLookup.execute(
      	at org.openide.util.lookup.Lookups.executeWith(
      [catch] at org.openide.util.RequestProcessor$

      Code Sniffer detects the installed coding standards, but it doesn't offer any means to specify one directly, and it doesn't detect the one that is used in my project. Perhaps it has to do with the fact that it's not a global tool, so there's no option or need to configure coding standards in the same way as one would if the tool was installed globally. In my project it is included as a part of a Phing build and includes a command line option pointing to the coding standard in use.

      This looks like it should be split to more sub-issues.


          Issue Links



              • Assignee:
                Kacer Tomáš Procházka
                czukowski Czukowski
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: