ollily / php-sonar-scanner
A sonar-scanner for PHP using composer
Requires
- php: >=8.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-29 16:57:44 UTC
README
Table of ContentsDescription
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
-
Composer Commands - New commands for composer
Reference
(c) 2026 by Oliver Glowa