Download the PHP package jbzoo/ci-report-converter without Composer

On this page you can find all versions of the php package jbzoo/ci-report-converter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ci-report-converter

JBZoo / CI-Report-Converter

CI Coverage Status Psalm Coverage Psalm Level CodeFactor
Stable Version Total Downloads Docker Pulls Dependents GitHub License

Why?

I believe you are familiar with the huge zoo of various utilities for testing, checking code standards, linters etc. It's really often the output of utilities is not supported in popular CI systems (TeamCity, GitHub, etc...). I guess you are lucky if the utility saves the error report in the junit.xml format, because it works pretty fine with almost all modern dev software.

But... My experience tells me it's the exception rather than the rule. For example, I really like the good old phpmd utility (perhaps you have another right opinion about the benefits. At least, it's just an example). It doesn't integrate well with TeamCity/PhpStorm/GitHub. Everytime I spend a lot of time looking for results in the logs. Though I really want to see instant and well-printed error report.

Therefore, I developed a converter that changes the report format for deep integration with CI systems and JetBrain IDEs.

Well... It may seem to you it's a useless thing, and your favorite super tool works fine in TeamCity/PhpStorm. Just take a look at the examples below.

Installing

Using as GitHub Action

Action allows you to convert error reports to the GitHub Annotations format

Example GitHub Action workflow

Available Directions

At the moment, converting of reports works with

Also, you can follow metrics around your code in TeamCity via teamcity:stats

Help description in terminal

Converting

Custom Metrics in TeamCity

To clarify the use of the method, take a look at the examples and screenshots below, please.

Examples

JetBrains IDE (IntelliJ IDEA, PhpStorm, WebStorm, etc)

One of the unique features of the tool is converting reports to a unit test format compatible with JetBrains IDE and TeamCity. The following examples show how to use JetBrains IDE UI to display any kind of style issues. Yeah, I know that the integration is not the cleanest, and it's not super beautiful. However, this code/screenshots demonstrate the usability of the approach.

NOTE: I believe that coding style issues have the same level of severity as any other sort of errors. Therefore, I prefer to use the same workflow to check the quality of the code as I do with regular PHPUnit tests. It's like "just one click!" Also, you will have the awesome bonus - navigating the project and gives the most detailed information about errors.

The general idea is pretty simple:

In the next example we will see how to integrate JetBrains IDE UI with Code Sniffer deeply. I use PHPcs just as example. This is the most popular linter in PHP. However, the approach is independent of the programming language or unit testing framework.

What happens under the hood. Also, see source file as ready-to-use examples.

Mess Detector (phpmd-json)

Screenshot ![PHPmd in JetBrains PhpStorm](.github/assets/phpstorm-phpmd.png)

Magic Number Detector (phpmnd)

Screenshot ![PHPmd in JetBrains PhpStorm](.github/assets/phpstorm-phpmnd.png)

Copy/Paste Detector (pmd-cpd)

Screenshot ![PHPcpd in JetBrains PhpStorm](.github/assets/phpstorm-phpcpd.png)

PHPStan (checkstyle)

Screenshot ![PHPstan in JetBrains PhpStorm](.github/assets/phpstorm-phpstan.png)

Psalm (psalm-json)

Screenshot ![PHP Psalm in JetBrains PhpStorm](.github/assets/phpstorm-psalm.png)

Phan (checkstyle)

Screenshot ![PHP Psalm in JetBrains PhpStorm](.github/assets/phpstorm-phan.png)

TeamCity - Style Issue As Failed Unit test

Use the option --output-format=tc-tests to convert any style report to unit test format in TeamCity

TeamCity - Style Issue As Code Inspections

Use the option --output-format=tc-inspections to convert any style report to unit test format in TeamCity

TeamCity - Reported Statistic Values

Example in TeamCity

Example in TeamCity

Example in TeamCity

Example in TeamCity

shell ./vendor/bin/phpmetrics ./src --report-violations="./build/phpmetrics-report.xml" ./ci-report-converter.phar teamcity:stats --input-format="phpmetrics-xml" --input-file="./build/phpmetrics-report.xml"

GitHub Actions

You can find a lot of life examples here and see real examples in YML file

GitLab CI

Use the option --output-format=gitlab-json to convert the report to Gitlab JSON format.

Als, see how to implemente GitLab Custom Report

Use tool as SDK to generate reports

Also, you can use source of tool as SDK for reports in your tools/project.

PS: More examples are coming soon.

JUnit.xml (API)

GitHub Actions (API)

Contributing

License

MIT

See Also


All versions of ci-report-converter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-dom Version *
ext-simplexml Version *
ext-hash Version *
jbzoo/data Version ^7.1
jbzoo/utils Version ^7.1
jbzoo/cli Version ^7.1.8
jbzoo/markdown Version ^7.0
symfony/console Version >=6.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jbzoo/ci-report-converter contains the following files

Loading the files please wait ....