Code coverage 0% for PHP project

Hi Chaps, recently we upgraded our app softwares from ubuntu 16.04 to 20.04, php 7.2 to 8.1 and symfony. 3.4 to 5.4. After that Sonar cloud doesn’t shows coverage part. Always it shows 0.0%. When i saw the sonarcloud dashboard, It shows 2 warnings on my desired branch. I attached here for your reference.

1 . Failed to resolve 140 file path(s) in PHPUnit tests junit.xml report. Nothing is imported related to file(s):

  1. Failed to resolve 184 file path(s) in PHPUnit coverage clover.xml report. Nothing is imported related to file(s):

My sonarproject properties are,

sonar.host.url=https://sonarcloud.io
sonar.organization=xxxx
sonar.projectKey=xxxxx
sonar.projectName=xxxx
sonar.sources=src
sonar.tests=tests
sonar.exclusions=/*.js,/DataFixtures/,/Resources/,/Repository/,/PHPUnit/,tests/
sonar.cpd.exclusions=/Controller/,/Entity/
sonar.language=php
sonar.sourceEncoding=UTF-8

sonar.php.tests.reportPath=build/logs/junit.xml

sonar.php.coverage.reportPaths=build/logs/clover.xml.

ALM used - Github Could any one help me on this? Thanks a lot

Hey there.

If it was working before but changed with the upgrade, the best thing you could do would be compare a coverage report under the previous conditions to the coverage report that’s being produced now, and see if anything has changed (particularly around the file paths being reported)