SARIF PHP Converters

May 4, 2026 · View on GitHub

StandWithUkraine GitHub Discussions

ReleasesBranchPHPPackagistLicenseDocumentation
Stable v1.0.xBranch 1.0Minimum PHP Version)Stable Version 1.0License 1.0Documentation 1.0
Stable v1.1.xBranch 1.1Minimum PHP Version)Stable Version 1.1License 1.1Documentation 1.1
Stable v1.2.xBranch 1.2Minimum PHP Version)Stable Version 1.2License 1.2Documentation 1.2
Stable v1.3.xBranch 1.3Minimum PHP Version)Stable Version 1.3License 1.3Documentation 1.3
Stable v1.4.xBranch 1.4Minimum PHP Version)Stable Version 1.4License 1.4Documentation 1.4
Stable v1.5.xBranch 1.5Minimum PHP Version)Stable Version 1.5License 1.5Documentation 1.5
Stable v1.6.xBranch 1.6Minimum PHP Version)Stable Version 1.6License 1.6Documentation 1.6

Introduction

SARIF, the Static Analysis Results Interchange Format, defines a standard format for the output of static analysis tools. It is a powerful and sophisticated format suited to the needs of a wide variety of tools.

There are a lot of PHP project that do Static Code Analysis, but few of them support the SARIF format.

You can consider to be lucky when they provide at least the checkstyle or junit format.

This library may be considered as a producer on sarif report format, for these projects that did not support yet natively.

Features at a glance

  • A Console Tool to allow conversion from checkstyle format to sarif, if your application does not support custom reporting class.
  • Add sarif output format support to your application, if you accept to load on fly, any custom reporting class.

Comparison by project on output formats

ProjectVersionSARIFCheckstyleJUnitCodeClimate
GitLab
GitHubOutput Format Support
Composer Dependency Analyser1.6.xjunit
Composer2.4.xtable,plain,json,summary
Easy-Coding-Standard12.3.xconsole,json,junit,checkstyle,gitlab
Mago1.xgithub,gitlab,json,checkstyle,emacs,sarif, ...
Phan5.5.1text,csv,json,checkstyle,codeclimate,pylint,html,github
PHP CodeSniffer3.10.xjson,checkstyle,junit
PHP-CS-Fixer3.59.xcheckstyle,gitlab,json,junit
PHPInsights2.11.xconsole,json,checkstyle,codeclimate,github-action
PHPLint9.4.x(✅)console,json,junit,checkstyle,(sarif)
PHP Mess Detector2.15.xxml,text,html,json,github,gitlab,sarif,checkstyle
PHPStan2.0.x(✅)table,raw,checkstyle,json,junit,github,gitlab,teamcity,(sarif)
Rector2.0.xconsole,json,junit,gitlab,github
Twig-CS-Fixer3.0.xnull,text,checkstyle,junit,github

Legend :

  • ✅ indicate that support to the format is available
  • (✅) indicate that support to the format is optional
  • ❌ indicate that support to the format is not yet available

Documentation

All the documentation is available on website, generated from the docs folder.