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)450.1k↓41.9%3[1 PRs](https://github.com/matheusab-soft/rector-html-output-formatter/pulls)MITPHPPHP ^7.2|^8.0CI passing

Since May 16Pushed 10mo 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 2d 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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5NzE3NTksIm5iZiI6MTc4Mjk3MTQ1OSwicGF0aCI6Ii8zNzUwNTMwLzQwOTMzNTc5My05YWU3NjdkMC0zOTljLTQ3YzUtOTljZS01NDkxYTJlZWJmM2UucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDcwMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA3MDJUMDU1MDU5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OGUwMzI2YWEyNmM4Y2U3ZDVlMTlhNjVkN2Q1MWM5ODM4NTUwMzZlMGJlNDVmNmJmOWI4MDI5YjViNGIxYjQyOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.wpCQdpy5TkieCG0JPViwYWYFt9r7cXepUQ_vruviak4)](https://private-user-images.githubusercontent.com/3750530/409335793-9ae767d0-399c-47c5-99ce-5491a2eebf3e.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5NzE3NTksIm5iZiI6MTc4Mjk3MTQ1OSwicGF0aCI6Ii8zNzUwNTMwLzQwOTMzNTc5My05YWU3NjdkMC0zOTljLTQ3YzUtOTljZS01NDkxYTJlZWJmM2UucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDcwMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA3MDJUMDU1MDU5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OGUwMzI2YWEyNmM4Y2U3ZDVlMTlhNjVkN2Q1MWM5ODM4NTUwMzZlMGJlNDVmNmJmOWI4MDI5YjViNGIxYjQyOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.wpCQdpy5TkieCG0JPViwYWYFt9r7cXepUQ_vruviak4)

[![image](https://private-user-images.githubusercontent.com/3750530/409335999-9509596f-f46c-46cd-b5ad-cd04257a5d2f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5NzE3NTksIm5iZiI6MTc4Mjk3MTQ1OSwicGF0aCI6Ii8zNzUwNTMwLzQwOTMzNTk5OS05NTA5NTk2Zi1mNDZjLTQ2Y2QtYjVhZC1jZDA0MjU3YTVkMmYucG5nP1gtQW16L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M3MWQ3YTAwYjgxN2VkYWE5OGNkMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.edkeZZsp9a4loF0Gdk1j02PV_EKC7wKjoEwZId8DgnM)

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance49

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

445d 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

[driftingly/rector-laravel

Rector upgrades rules for Laravel Framework

1.2k15.4M735](/packages/driftingly-rector-laravel)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[worksome/coding-style

Worksomes coding style

49814.9k66](/packages/worksome-coding-style)[ergebnis/rector-rules

Provides rules for rector/rector.

10245.6k51](/packages/ergebnis-rector-rules)[filament/upgrade

Upgrade Filament v4 code to Filament v5.

101.9M188](/packages/filament-upgrade)[sylius/sylius-rector

Rector upgrades rules for Sylius

10908.8k105](/packages/sylius-sylius-rector)

PHPackages © 2026

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