SonarQube PHP
  1. SonarQube PHP
  2. SONARPHP-74

PHP Plugin doesn't recognise reuseReports as a valid option for sonar.dynamicAnalysis

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 0.3
    • Fix Version/s: 0.4
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      1

      Description

      Embedded error: 'sonar.dynamicAnalysis' doesn't map to a Boolean object
      The value reuseReports can't be converted to a Boolean object
      
      ...
      
      Caused by: org.apache.commons.configuration.ConversionException: 'sonar.dynamicAnalysis' doesn't map to a Boolean object
      	at org.apache.commons.configuration.AbstractConfiguration.getBoolean(AbstractConfiguration.java:682)
      	at org.sonar.plugins.php.phpunit.PhpUnitConfiguration.<init>(PhpUnitConfiguration.java:96)}}
      

      See attached pastie for a full stack trace of the problem.

      I'm seeing this error when running analisys on a Java project so I'm not sure if there are two bugs here? Should the PHP analyser run for Java projects?

      If I set dynamicAnalysis to "false" I don't see the error but then I lose code coverage results in Sonar for this build. This might be another bug so when this one is fixed, I'll test again and I can raise another if it's still happening.

        Activity

        Hide
        Akram Ben Aissi added a comment - - edited

        Fixed on commit 3146.
        There was a conception issue on how configuration is instanciated in the php plugin: Configuration was instanciated even if the project was not php.
        This has been fixed and now the shouldExecuteOnProject method of the sensors does not require AbstractPhpPluginConfiguration to be instanciated.

        Show
        Akram Ben Aissi added a comment - - edited Fixed on commit 3146. There was a conception issue on how configuration is instanciated in the php plugin: Configuration was instanciated even if the project was not php. This has been fixed and now the shouldExecuteOnProject method of the sensors does not require AbstractPhpPluginConfiguration to be instanciated.
        Hide
        elmandour omar added a comment -

        Like mentionned in this post(it is not me) - this issue is NOT fixed.

        Im using sonar 2.8 in two seperate installations, try to update plugins and system just in case and everything is up to date.

        The first version without the php plugin works fine the second with the last one (0.4) doesnt work. Im getting the same error mesage mentionned by the reporter.

        PLEASE reopen it

        Show
        elmandour omar added a comment - Like mentionned in this post (it is not me) - this issue is NOT fixed. Im using sonar 2.8 in two seperate installations, try to update plugins and system just in case and everything is up to date. The first version without the php plugin works fine the second with the last one (0.4) doesnt work. Im getting the same error mesage mentionned by the reporter. PLEASE reopen it
        Hide
        Evgeny Mandrikov added a comment -

        Omar, instead of reopening we prefer creation of a new issue, so could you please do this with "Affects Version=PHP-0.4" ?

        Show
        Evgeny Mandrikov added a comment - Omar, instead of reopening we prefer creation of a new issue, so could you please do this with "Affects Version=PHP-0.4" ?
        Hide
        Akram Ben Aissi added a comment -

        Hi Omar,
        indeed, what you describe is another issue. As stated by Stuart who opened the issue.
        Fixing this issue was about the fact that when specifiying reuseReport option, the PHP plugin was crashing the analysis even it was not a PHP project.
        This issue precisely is fixed.

        For the other part, which is the support of the reuseReport option, another option must be created.

        Show
        Akram Ben Aissi added a comment - Hi Omar, indeed, what you describe is another issue. As stated by Stuart who opened the issue. Fixing this issue was about the fact that when specifiying reuseReport option, the PHP plugin was crashing the analysis even it was not a PHP project. This issue precisely is fixed. For the other part, which is the support of the reuseReport option, another option must be created.
        Hide
        Markus Maier added a comment -

        Still happens to me in PHP-0.4, only the line number has changed from 96 to 102:

        ...
        Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar
        	at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)
        	at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)
        	at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)
        	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        	... 19 more
        Caused by: org.apache.commons.configuration.ConversionException: 'sonar.dynamicAnalysis' doesn't map to a Boolean object
        	at org.apache.commons.configuration.AbstractConfiguration.getBoolean(AbstractConfiguration.java:682)
        	at org.sonar.plugins.php.phpunit.PhpUnitConfiguration.<init>(PhpUnitConfiguration.java:102)
        
        Show
        Markus Maier added a comment - Still happens to me in PHP-0.4, only the line number has changed from 96 to 102: ... Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118) at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65) at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: org.apache.commons.configuration.ConversionException: 'sonar.dynamicAnalysis' doesn't map to a Boolean object at org.apache.commons.configuration.AbstractConfiguration.getBoolean(AbstractConfiguration.java:682) at org.sonar.plugins.php.phpunit.PhpUnitConfiguration.<init>(PhpUnitConfiguration.java:102)

          People

          • Assignee:
            Akram Ben Aissi
            Reporter:
            Anonymous
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: