Skip to content

About

A sonar-scanner for PHP using composer

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

php-sonar-scanner

Description

A sonar-scanner for PHP using composer.

On the hunt for a Sonar scanner which is provided by composer, I didn’t found any library which was working or had the current version of the scanner. So I decided to write a new library.

The library is tested with Windows and Windows with Cygwin, so it will (hopefully) work with Linux also. Unfortunately I am not able to test the library with MacOs. So let me know, if and what is not working.

Configuration

Please read the configuration.

Usage

Analysis with Sonarcloud

Including sonar-project.properties located in the project root.

composer c-sonar

Generating test coverage and the Sonarcloud analysis

Including sonar-project.properties located in the project root.

composer c-sonar-full

Calling the vendor binary

Unix / Linux

src/bin/sonar-scanner -d project.settings=<path-to-sonar-project.properties> [other options]
src/bin/sonar-scanner-debug -d project.settings=<path-to-sonar-project.properties> [other options]

Windows

src\bin\sonar-scanner.bat -d project.settings=<path-to-sonar-project.properties> [other options]
src\bin\sonar-scanner-debug.bat -d project.settings=<path-to-sonar-project.properties> [other options]

Additional Information

Reference

(c) 2026 by Oliver Glowa

About

A sonar-scanner for PHP using composer

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages