PHPackages                             matheusab/rector-html-output-formatter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. matheusab/rector-html-output-formatter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

matheusab/rector-html-output-formatter
======================================

HTML Output Formatter for the Rector PHP Library.

1.4.1(1y ago)443.2k—2.8%3[1 PRs](https://github.com/matheusab-soft/rector-html-output-formatter/pulls)MITPHPPHP ^7.2|^8.0CI passing

Since May 16Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/matheusab-soft/rector-html-output-formatter)[ Packagist](https://packagist.org/packages/matheusab/rector-html-output-formatter)[ RSS](/packages/matheusab-rector-html-output-formatter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (14)Used By (0)

Install
=======

[](#install)

`composer require --dev matheusab/rector-html-output-formatter`

Usage
=====

[](#usage)

Configure it in your `rector.php`, where the `exportedFilePathPrefix` argument is the path to the exported report. Example:

```
return static function (RectorConfig $rectorConfig): void {
    $rectorConfig->singleton(HtmlOutputFormatter::class, HtmlOutputFormatter::class);
    $rectorConfig->tag(HtmlOutputFormatter::class, OutputFormatterInterface::class);
    $rectorConfig
        ->when(HtmlOutputFormatter::class)
        ->needs('$exportedFilePathPrefix')
        ->give(__DIR__ . '/rector-report');
```

> Since v1.1, a custom report template can also be used: see [Using a custom report template](#using-a-custom-report-template)

Generating a report
===================

[](#generating-a-report)

After configuring it, you can generate it with Rector's `process` command by setting `--output-format=html`.

Example:

```
vendor/bin/rector process --dry-run --output-format=html

```

Using a custom report template
==============================

[](#using-a-custom-report-template)

When configuring `RectorConfig`, a custom report template can be used. Example:

`rector.php`:

```
$rectorConfig
    ->when(HtmlOutputFormatter::class)
    ->needs('$customReportTemplatePath')
    ->give(__DIR__ . '/custom_template.php');
```

You may use the following variables on the template:

VariableDescription`$errorsJson`an array with the following keys:
`changed_files`: an array of file names
 `file_diffs`: an array of files with the following shape:
 \* `'file => string`
\* `'diff' => string`
\* `'applied_rectors' => string[]``$diffOccurrences`a map where
`key`: applied rector
`value`: number of occurencesExamples
--------

[](#examples)

- [Default template](src/template/main.php)
- [A simple template used for testing purposes](tests/custom_template.php)

Generated report screenshots
============================

[](#generated-report-screenshots)

[![image](https://private-user-images.githubusercontent.com/3750530/409335793-9ae767d0-399c-47c5-99ce-5491a2eebf3e.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzQ2ODA2MDMsIm5iZiI6MTc3NDY4MDMwMywicGF0aCI6Ii8zNzUwNTMwLzQwOTMzNTc5My05YWU3NjdkMC0zOTljLTQ3YzUtOTljZS01NDkxYTJlZWJmM2UucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDMyOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjAzMjhUMDY0NTAzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MmMyZGUyNTU4NjkxMDJiMDhkNTMzOTg0ZjdhY2NlZjFhNmU0NzcyN2U1NWVmOGZiM2QxN2NmZWY4OGU5MDFmMiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.v6kEvhVeD2UD_7oboBpjew8OtbKH5xHR_0XOjXNTnug)](https://private-user-images.githubusercontent.com/3750530/409335793-9ae767d0-399c-47c5-99ce-5491a2eebf3e.png?jwt=eyJ0eXAiOiJKV1QiLCJhb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etter than 91% of packages

Maintenance53

Moderate activity, may be stable

Popularity35

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~63 days

Recently: every ~23 days

Total

12

Last Release

398d ago

Major Versions

0.4 → 1.02024-09-20

PHP version history (3 changes)0.1PHP ^7.0

0.2PHP ^7.0|^8.0

0.3PHP ^7.2|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/d9af9e9345c228ef48cfeee577498377843a0005a88fac9eb0de562abb567a00?d=identicon)[matheusab](/maintainers/matheusab)

---

Top Contributors

[![matheusab](https://avatars.githubusercontent.com/u/3750530?v=4)](https://github.com/matheusab "matheusab (58 commits)")[![hfig](https://avatars.githubusercontent.com/u/29371182?v=4)](https://github.com/hfig "hfig (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![Focus3D](https://avatars.githubusercontent.com/u/1816969?v=4)](https://github.com/Focus3D "Focus3D (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/matheusab-rector-html-output-formatter/health.svg)

```
[![Health](https://phpackages.com/badges/matheusab-rector-html-output-formatter/health.svg)](https://phpackages.com/packages/matheusab-rector-html-output-formatter)
```

###  Alternatives

[frosh/shopware-rector

Shopware specific Rector

47394.3k5](/packages/frosh-shopware-rector)[codeigniter4/devkit

Development toolkit for CodeIgniter libraries and projects

68187.1k82](/packages/codeigniter4-devkit)[quartetcom/static-analysis-kit

Strict and modern kit to optimise the codebase defensively.

144.3k5](/packages/quartetcom-static-analysis-kit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
