rquadling / phpstan-junit
PHPStan JUnit 错误报告器
v0.4.4
2021-11-11 19:08 UTC
Requires
- php: ~7.0.0
- ext-dom: *
- phpstan/phpstan-shim: 0.9.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.15
- phpunit/phpunit: *
README
免责声明
本库中的代码高度(并且我指的是非常非常高度)基于mavimo/phpstan-junit中的工作。我无法强调这里的工作有多么重要。这几乎是一个直接的复制!
此分支的主要目的是允许JUnit错误报告器在PHP 7.0以及phpstan/phpstan-shim:0.9.2上运行,因为这是我当前的用例。
范围
本项目的主要范围是创建可以轻松集成到Jenkins或其他使用此信息的工具中的JUnit格式的错误报告。
如何使用它
安装
您需要将此库作为开发依赖项包含到项目中。
composer require --dev rquadling/phpstan-junit
您需要将适当的服务条目添加到项目根目录下的phpstan.neon
文件中
services: errorFormatter.junit: class: RQuadling\PHPStan\ErrorFormatter\JunitErrorFormatter
生成JUnit报告
您可以使用--errorFormat junit
生成JUnit报告,例如
vendor/bin/phpstan --configuration phpstan.neon --errorFormat junit --level max --no-progress --no-interaction analyse SOURCE_CODE_DIR
贡献
欢迎贡献,但此分支除PHP 7.0与PHPStan-shim v0.9.2之外,不需要用于其他任何目的。如果您有任何贡献,我当然会考虑它们。但如果是为了提到的版本之外的版本,那么最好是查看Mavimo的版本。